PhiloChat is a real-time chat application built with Django and Django Channels. It allows users to engage in private and group chats using WebSockets for seamless communication. The project is containerized using Docker for easy deployment and comes with PostgreSQL and Redis integration.
- User Authentication: Custom user model with profile pictures and bios.
- Group Chat: Users can create and join group chats.
- Private Messaging: One-on-one chat functionality.
- WebSockets Support: Real-time messaging using Django Channels.
- Redis for Channels Layer: Enhances scalability and performance.
- PostgreSQL Database: Used as the primary database.
- Docker Support: Easily set up the development environment using
docker-compose
.
git clone https://github.com/Hr-ArshA/Philochat.git
cd philochat
Copy the sample .env-sample
file and rename it to .env
:
cp .env-sample .env
Modify the .env
file with your database credentials and secret keys.
Using Python Virtual Environment
python -m venv venv
source venv/bin/activate # On Windows use `venv\Scripts\activate`
pip install -r requirements.txt
python manage.py migrate
python manage.py createsuperuser
Follow the prompts to create an admin user.
docker-compose up --build
This will start:
- PostgreSQL Database
- Redis Cache
- Django Server
If you prefer running the project without Docker:
python manage.py runserver
The app will be accessible at http://127.0.0.1:8000/
.
- Visit the homepage to enter a chat room.
- Enter a chat room name and start chatting.
- Messages will be broadcasted in real-time using WebSockets.
/philochat
│-- account/ # User authentication and profile management
│-- chat/ # Chat application (models, views, consumers)
│-- config/ # Django project settings
│-- templates/ # HTML templates for UI
│-- docker-compose.yml # Docker configuration
│-- manage.py # Django management script
│-- requirements.txt # Dependencies
│-- .env-sample # Sample environment variables
- Django: Web framework
- Django Channels: WebSockets support
- PostgreSQL: Database
- Redis: Caching and Channels Layer
- Docker: Containerization
- Bootstrap: Frontend styling
- WebSockets: Real-time messaging
This project is licensed under the MIT License. See the LICENSE
file for details.
- Fork the repository
- Create a new branch (
git checkout -b feature-branch
) - Commit your changes (
git commit -m "Added a new feature"
) - Push to the branch (
git push origin feature-branch
) - Open a Pull Request
For any issues or feature requests, feel free to open an issue or reach out:
📧 E-mail: a_sh1379@yahoo.com 🔗 GitHub: https://github.com/Hr-ArshA
Enjoy chatting with PhiloChat! 🚀