A modern, full-featured Django chat application with OTP-based authentication, email verification, and a premium UI built with Tailwind CSS and Alpine.js.
- Custom user model with email and phone authentication
- OTP verification for signup and password reset (via email)
- Secure password validation and reset
- Profile completion and editing
- Real-time chat (Channels, WebSockets)
- Responsive, modern UI (Tailwind CSS, Alpine.js)
- Admin panel for user and chat management
- Cloudinary integration for profile pictures
- Python 3.10+
- Django 5.2+
- Channels
- Redis (for Channels layer)
- Tailwind CSS
- Cloudinary account (for image uploads)
- SMTP email credentials (for OTP)
-
Clone the repository:
git clone https://github.com/yashwantkr002/ChatApp.git cd ChatApp -
Create and activate a virtual environment:
python -m venv env env\Scripts\activate # On Windows # or source env/bin/activate # On Linux/Mac
-
Install dependencies:
pip install -r requirements.txt
-
Configure environment variables:
- Copy
.env.exampleto.envand fill in your secrets:SECRET_KEY,EMAIL_HOST_USER,EMAIL_HOST_PASSWORD,CLOUDINARY_CLOUD_NAME,CLOUDINARY_API_KEY,CLOUDINARY_API_SECRET
- Copy
-
Apply migrations:
python manage.py makemigrations python manage.py migrate
-
Create a superuser:
python manage.py createsuperuser
-
Run the development server:
python manage.py runserver
-
Start Redis (for Channels):
- Make sure Redis is running on
localhost:6379.
- Make sure Redis is running on
-
Access the app:
- Visit http://127.0.0.1:8000/
ChatApp/- Django project settingschat/- Chat app (models, views, consumers)user/- User app (custom user, authentication, profile)templates/- HTML templatestheme/- Tailwind CSS config and static filesenv/- Python virtual environment
SECRET_KEY=your-django-secret-key
EMAIL_HOST_USER=your-email@gmail.com
EMAIL_HOST_PASSWORD=your-app-password
CLOUDINARY_CLOUD_NAME=your-cloudinary-cloud-name
CLOUDINARY_API_KEY=your-cloudinary-api-key
CLOUDINARY_API_SECRET=your-cloudinary-api-secret
MIT
Author: yashwantkr002
For questions or contributions, open an issue or pull request on GitHub.