A real-time chat application built with Django, Django Channels, Redis, and PostgreSQL. This application supports multiple chat rooms, real-time messaging, image sharing, and message history with infinite scroll.
- Real-time Chat: WebSocket-based real-time messaging using Django Channels
- Room Management: Create and manage multiple chat rooms
- Image Sharing: Send and receive images in chat
- Message History: Scroll up to load previous messages (infinite scroll)
- User Authentication: Secure user authentication and authorization
- Public/Private Rooms: Support for both public and private chat rooms
- Responsive UI: Modern, user-friendly interface with templates
- RESTful API: Complete REST API for integration
- Docker Support: Fully containerized with Docker for easy deployment
- Docker and Docker Compose
- Git
This project includes three Docker environments:
Run the development environment:
docker-compose -f docker/environments/development/docker-compose.dev.yml up --buildSuperuser info:
- supser user : admin
- password : admin123
Access the application:
- Application: http://127.0.0.1:8000/api/room/v1/rooms/list/
- Public room: http://127.0.0.1:8000/api/room/v1/chat/
- Admin Panel: http://localhost:8000/admin
Run the staging environment:
docker-compose -f docker/environments/staging/docker-compose.staging.yml up --buildRun the production environment:
docker-compose -f docker/environments/production/docker-compose.prod.yml up --buildThe application is built with:
- Backend: Django 4.x + Django REST Framework
- Real-time: Django Channels + Redis
- Database: PostgreSQL
- WebSockets: ASGI with Daphne
- Containerization: Docker + Docker Compose
For detailed documentation, please visit the docs directory:
- Complete Documentation Index
- Models Documentation
- Templates Documentation
- API Documentation
- User Guide
- Project Structure
- Docker & Technical Guide
- Clone the repository:
git clone <repository-url>
cd ChatPage- Create environment file:
cp .env.examples /docker/environments/development/.env.dev-
Update the
.envfile with your configuration -
Run the development environment:
docker-compose -f docker/environments/development/docker-compose.dev.yml up --build- Access the application at http://127.0.0.1:8000/api/room/v1/rooms/list/
- Django: Web framework
- Django REST Framework: API development
- Django Channels: WebSocket support
- Redis: Channel layer backend
- PostgreSQL: Database
- Docker: Containerization
- Nginx: Reverse proxy (production)
This project is licensed under the MIT License.
Contributions are welcome! Please feel free to submit a Pull Request.
For support, please open an issue in the repository.