This is a real-time chat application built using the Django(DRF) (HTML, CSS, React, Django Rest framework) stack. The app uses WebSockets for real-time communication between clients and the server.
- Features
- Prerequisites
- Installation
- Running the Application
- Technologies Used
- Screenshots
- Contributing
- License
- User authentication with JSON Web Tokens
- Real-time chat with WebSockets
- Create new chat rooms for Private message and Group message
- Send and receive messages in real time
- View the list of all users
- View the history of previous messages
- send files in chatroom
- user online or offline or typing message other user can see.
- user profile management.
- Python == 3.11.7
- Django == 4.0
- Redis server or you can use direct in-memory database ( comment redis server and uncomment memory database from settings.py
- node == 20.9.0
- npm == 10.1.0
- React
-
Clone the repository:
git clone https://github.com/krishna2808/chat-app.git cd chat-app
-
Install the dependencies for both the frontend and backend:
cd frontend && npm install npm start
-
Install the dependencies for the backend:
python3 -m venv venv source venv/bin/activate #Linux (activated venv) cd backend pip install -r requirements.txt python manage.py makemigrations python manage.py migrate # note if it will not proper migration then makemigrations and migrate with manually app sudo apt-get install redis-server # note if you don't want to use redis then in-memory database for development environment. sudo systemctl restart redis-server
-
Start the backend server:
cd backend python manage.py runserver -
In a separate terminal, start the frontend application:
cd frontend npm start -
Open your browser and navigate to
http://localhost:3000to see the application in action.
- Sqlite: Database for storing data
- Django Rest Framework: Drf framework for building REST APIs
- React: Library for building user interfaces
- WebSockets channel: Real-time communication between client and server
- JWT: Authentication using JSON Web Tokens
- Redis server: Redis server for Websocket.
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
This project is licensed under the MIT License.
