Welcome to the Live Chat Application built using Django! This project provides real-time messaging functionality, allowing users to engage in live conversations.
- Real-time messaging with multiple users
- Authentication and user registration
- Chat room creation and management
- Persistent chat history
- Notifications for new messages
- Responsive design, optimized for mobile and desktop
- Secure and scalable backend
- Django 4.2.16 – Backend framework
- Django Channels – Enables real-time communication via WebSockets
- Redis – Used as the message broker for WebSocket handling
- HTML5/CSS3/JavaScript – Frontend technologies
- SQLite (or other database options) – Data storage
- Docker (Optional) – For containerization and easy deployment
Ensure you have the following installed:
- Python 3.9+
- Django 4.2.16+
- Redis (for WebSocket handling)
- Docker (Optional)
-
Clone the repository:
git clone https://github.com/your-username/live-chat-django.git cd live-chat-django
-
Create a virtual environment:
python -m venv venv source venv/bin/activate # On Windows use `venv\Scripts\activate`
-
Install the dependencies:
pip install -r requirements.txt
-
Set up the database:
Run the migrations to set up the initial database schema.
python manage.py migrate
-
Start the Redis server:
Ensure Redis is running for WebSocket handling.
redis-server
-
Run the development server:
Start the Django development server to view the app in your browser.
python manage.py runserver
After running the server, open your web browser and navigate to:
http://127.0.0.1:8000/
- Register or log in to create an account.
- Join an existing chat room or create a new one.
- Start chatting in real-time with other users!
- Messages are stored and can be viewed even after logging out.
You can also run this application using Docker for easy deployment.
-
Build and run the application with Docker:
docker-compose up --build
-
Visit the app at
http://localhost:8000/
in your browser.
Contributions to the project are welcome! Feel free to:
- Fork the repository.
- Create a new branch.
- Make your changes and submit a pull request.
If you encounter any issues or have suggestions, please open an issue.
- Django framework
- Django Channels for WebSocket handling
- Redis for real-time messaging
- All contributors to this project