Relate is a web application demonstrating authentication and CRUD functionality, allowing users to register, log in, create, update, and delete blog posts. The backend is built with Django and Django REST Framework, while the frontend is developed using React.
- User authentication (register, login, logout)
- CRUD operations for blogs (create, read, update, delete)
- User-specific blogs: Each blog post is associated with the user who created it.
- Markdown editor for writing and formatting blog content
- Backend: Django, Django REST Framework
- Frontend: React, Context API
- Database: MySQL
- Authentication: JWT (JSON Web Tokens)
- Markdown Editor: For rich text formatting of blog content
-
Authentication:
POST /api/register: Register a new userPOST /api/login: Log in an existing userPOST /api/logout: Log out the authenticated user
-
Blog:
GET /api/blogs: List all blogs (authenticated)POST /api/blogs: Create a new blog (authenticated)GET /api/blogs/<id>: Retrieve a specific blog (authenticated)PUT /api/blogs/<id>: Update a specific blog (authenticated)DELETE /api/blogs/<id>: Delete a specific blog (authenticated)
(Add a diagram that visually represents your API endpoints, e.g., using a tool like Lucidchart or Canva)
(Add a visual representation of your database schema, including tables for users, blogs, etc.)
-
Clone the Repository:
git clone https://github.com/yourusername/relate.git cd relate -
Backend Setup:
- Install Python dependencies:
pip install -r requirements.txt
- Set up MySQL database:
- Create a database in MySQL.
- Update database settings in
settings.py.
- Run migrations:
python manage.py migrate
- Start the Django server:
python manage.py runserver
- Install Python dependencies:
-
Frontend Setup:
- Navigate to the frontend directory:
cd frontend - Install Node dependencies:
npm install
- Start the React development server:
npm start
- Navigate to the frontend directory:
-
Access the Application:
- Visit
http://localhost:3000in your browser.
- Visit
This project is licensed under the MIT License. See the LICENSE file for details.
(Include guidelines on how others can contribute, and a list of current contributors.)
-
API Endpoints Diagram: Use tools like Canva, Lucidchart, or Excalidraw to create a visual representation of your API endpoints and how they connect.
-
Database Model: Use tools like DBDiagram, Draw.io, or similar to showcase your database schema.
-
License: Include the text of the license you are using, like MIT, Apache 2.0, or GNU GPL.
-
Contributors: Add a section with guidelines on how to contribute to the project, such as forking the repo, creating pull requests, or joining discussions.