A real-time chat application built with Django, Django Channels, and Next.js.
- Each server belong to a category
- Channels belong to servers (server can have multiple channels)
- User who creates a server is server owner
- Users can send messages in channels
- User authentication and registration
- Real-time messaging
- Server owner can create and manage channels, servers, and users (kick, ban)
- Responsive design for mobile and desktop
- Frontend: Next.js, React, TypeScript, Tailwind CSS and Redux
- Backend: Django, Django Channels, Django REST Framework
- Database: PostgreSQL (Neon for production, docker for dev)
- Message broker: Redis (Redis cloud for production, docker for dev)
- Cloud Storage: Cloudflare R2 for file uploads
- Deployment: Django Backend on DigitalOcean, Next.js Frontend on Vercel
- Node.js (LTS version)
- Python (LTS version)
- Docker and Docker Compose (if run locally)
-
Clone the repository
git clone https://github.com/nevalearntocode/dj_chat.git
-
Install frontend dependencies
cd frontend npm install -
Set up environment variables
- Create
.env.localfile in frontend and.env.devfile backend directory. - Follow the .env.example files in frontend and backend directory.
- Create
- Frontend: Run
npm run devin the frontend directory. - Backend: Run
docker compose up --buildin the backend directory.
- The following Github repo is a guide to how to deploy the application with separate PostgreSQL database and Redis service.
- Deployment guide
- Notes: I'm using Uvicorn instead of Daphne and Next.js Frontend instead of Fullstack Django. Please refer to the guide as you see fit.









