The Message API is a Django-based application designed to facilitate communication between users by allowing them to send messages to each other. It utilizes MySQL as the database management system.
- User Authentication: Users can register, login, and authenticate themselves to send and receive messages.
- Message Sending: Authenticated users can send messages to other users.
- Message Retrieval: Users can retrieve messages sent to them.
- Message History: Users can view their message history.
- Database Integration: Utilizes MySQL to store user information and messages.
To get started with the Message API, follow these steps:
-
Installation: Clone the repository from GitHub:
git clone https://github.com/yourusername/message-api.git
-
Database Setup: Set up MySQL database and configure database settings in Django settings file.
-
Environment Setup: Create a virtual environment and install dependencies from requirements.txt:
virtualenv venv source venv/bin/activate pip install -r requirements.txt
-
Database Migration: Run database migrations to create necessary tables:
python manage.py makemigrations python manage.py migrate
-
Run Server: Start the Django development server:
python manage.py runserver
-
API Documentation: Explore the API endpoints and their usage through the provided documentation.
For detailed documentation on available endpoints and their usage, refer to the API documentation provided within the project or visit /api/docs/
after running the server.
The database schema includes tables for users and messages. Here's a simplified representation:
-
User Table:
- id (Primary Key)
- username
- password
-
Message Table:
- id (Primary Key)
- sender_id (Foreign Key to User)
- receiver_id (Foreign Key to User)
- content
- timestamp
Contributions are welcome! Feel free to open issues or pull requests for any improvements, bug fixes, or new features.
This project is licensed under the MIT License - see the LICENSE file for details.
Feel free to customize this README according to your project's specific details and requirements.