This is a full-stack web application that allows users to register, log in, and perform various actions such as posting articles, viewing articles, deleting their own articles, updating their profiles, and viewing other user profiles. The backend is built using Django and Django REST Framework, while the frontend can be developed using React.js.
- Register: Create a new account.
- Login/Logout: Secure authentication using Django's user model.
- Update Profile: Update user information such as bio, occupation, and profile image.
- View Profile: View your own or other users' profiles.
- Search Profiles: Search for other user profiles by username.
- Post Article: Create a new article with a title, description, and optional image.
- Read Articles: View a list of articles posted by all users.
- Delete Article: Delete your own articles.
- Update Article: Update your own articles.
- Check Article Author Profile: View the author's profile directly from the article.
- Django
- Django REST Framework
- SQLite (default, replaceable with PostgreSQL/MySQL)
- Django Media Files for handling image uploads
- React.js with Tailwind CSS (or any preferred CSS framework)
POST /api/register/- Register a new user.POST /api/token/- Login to get a token.
GET /user/profile/- View your profile.PUT /user/profile/<str:username>/- Update your profile.
GET /api/allarticle/- Get a list of all articles.POST /api/allarticle/- Create a new article.GET /api/allarticle/<id>/- View a single article.DELETE /api/allarticle/<id>/- Delete your own article.
GET /user/profile/- Search All profiles.GET /user/profile/<str:username>/- Search for profiles by username.
- Clone the repository:
git clone https://github.com/rajivkr8207/Article-Management-System.git cd Article-Management-System - Create a virtual environment and activate it:
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
- Install the dependencies:
pip install -r requirements.txt
- Run the migrations:
python manage.py migrate
- Start the development server:
python manage.py runserver
- Navigate to the frontend directory:
cd frontend - Install the dependencies:
npm install
- Start the development server:
npm run dev
- Register a new user or log in using an existing account.
- Post articles with a title, description, and optional image.
- Browse and read articles.
- Update your profile with bio, occupation, and a profile picture.
- Search for other user profiles and view their articles.
backend/: The main directory for the backend project.users: Handles user authentication and profile management.Article: Manages article creation, reading, and updating.media: Stores uploaded profile pictures and article images.
src/components/: Contains reusable React components.src/pages/: Contains page-level components such as Login, Register, Profile, etc.src/context/: Context API for global state management.