Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/adilmohak/dj-chat
A Django and htmx project. A fully functional chat app contains group and private or one-on-one chat using websockets and channels.
https://github.com/adilmohak/dj-chat
channels chat chat-app django django-project group-chat htmx htmx-app one-on-one-chat private-chat redis redis-server websocket websockets
Last synced: 18 days ago
JSON representation
A Django and htmx project. A fully functional chat app contains group and private or one-on-one chat using websockets and channels.
- Host: GitHub
- URL: https://github.com/adilmohak/dj-chat
- Owner: adilmohak
- License: mit
- Created: 2023-07-16T08:17:15.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-08-16T06:10:22.000Z (over 1 year ago)
- Last Synced: 2024-05-21T01:55:10.783Z (6 months ago)
- Topics: channels, chat, chat-app, django, django-project, group-chat, htmx, htmx-app, one-on-one-chat, private-chat, redis, redis-server, websocket, websockets
- Language: Python
- Homepage:
- Size: 3.66 MB
- Stars: 22
- Watchers: 1
- Forks: 9
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# dj-chat | A `django` and `htmx` chat application
Fully functional chat app built with `django` and `htmx` with the power of `websockets` and `channels`. The app also uses other production-level packages, such as:- channels, redis, django-allauth, django-crispy-forms, django-select2, etc.
> The main goal of this project is to show how django and htmx can be used to build a fully functional high quality application.
> Bootstrap5 is used to design the UI with custom styles.### Demo video: https://youtu.be/l1j8yyEc9Us
![Screenshot 2023-08-10 155117](https://github.com/adilmohak/dj-chat/assets/60693922/db5c8628-36ef-446e-ae21-7d5f7a99adf5)
# Current features:
- **Private Messaging System:** Users can engage in private one-on-one chat conversations, known as threads.
- **Group Chat and Discussion Rooms:** The application supports group chat functionality, allowing users to participate in discussion rooms centered around specific topics.
- **User Authentication and Management:** Users can log in, log out, sign up, and manage(reset/change) their passwords.
- **Chat History Management:** Users can clear the chat history within a room, providing them with control over their chat environment.
- **Chat Deletion:** Users have the ability to delete entire chat conversations, offering a way to remove outdated or irrelevant discussions.
- **Sorting Options:** The discussions can be sorted based on trending topics, newest additions, or oldest discussions, enabling users to find relevant conversations efficiently.
- **Pagination and Infinite Scrolling:** The application utilizes pagination with infinite scrolling, allowing users to navigate through discussions seamlessly without page reloads. Messages inside private rooms are fetched automatically on the user scrolls up.
- **Recent Room Display:** Users can easily view their recent chat rooms, making it convenient to access frequently visited discussions.
- **Multicast Messaging:** Users can send messages to multiple recipients simultaneously.
- **Dynamic Room Creation and Update:** Users can create and update discussion rooms in real-time without the need to navigate away from the current page.
- **Real-time Discussion Search:** The application performs live discussion searches as users type, eliminating the need for page reloads and providing instant results.
- **Invitation Functionality:** Users can invite others to join a discussion room without interrupting their ongoing participation in the conversation.
- **Message Notifications:** Users have the option to mute or unmute message notifications, controlling their visibility and managing distractions.# Prerequisites:
> The following programs are required to run the project
- [Any Python-3 version](https://www.python.org/downloads/)
- [Redis](https://redis.io/download/)
- [PostgreSQL database](https://www.postgresql.org/download/)# Installation
- First Clone the repo with `git clone https://github.com/adilmohak/dj-chat.git`
- Create and activate a python virtual environment
- `pip install -r requirements.txt`
- Create a `.env` file inside the root directory (Same directory where `manage.py` is located)
- Inside your `.env` file put the following variables
```
DB_NAME=[NAME_OF_YOUR_DB]
DB_USER=[DB_USERNAME]
DB_PASSWORD=[DB_PASSWORD]
DB_HOST=localhost
DB_PORT=[DB_PORT]
```- `python manage.py makemigrations`
- `python manage.py migrate`
- `redis-server`
> The above command will start the redis server
- `python manage.py runserver`
- Last but not least, go to this address http://127.0.0.1:8000
# Connect with me
### Show your support by ⭐️ this project