Skip to content

Germinari1/Chattfy

Repository files navigation

Chattfy

Chattfy is a real-time chat web application developed with Django. It uses web sockets to allow real-time smooth communications between two or more users via a persistent web connection. Moreover, HTMX is used and contributes to a smooth experience by allowing partial page updates in real-time. Here's what the main page of the app looks like (which displays an example of chat rooms with multiple users, even though private messaging is also supported):

Chattfy's group chat

Quick Start and Requirements

You can follow these steps to start the application:

  1. Clone the repository
git clone https://github.com/Germinari1/Chattfy.git
  1. If you want to (even though this is optional), you can set up a virtual environment:
python -m venv venv
source venv/bin/activate  # On Windows use `venv\Scripts\activate`
  1. Install dependencies. Chattfy has the following requirements:
Django
pillow
django-cleanup
django-allauth
django-htmx

An easy way to install those is by running the following command in your terminal:

pip install -r requirements.txt
  1. Set up the database:
python manage.py migrate
  1. Create a superuser:
python manage.py createsuperuser
  1. Run the development server:
python manage.py runserver
  1. Access the application. Open your web browser and navigate to http://localhost:8000
  2. Detail: after you create an account in the app, do the following (for the reason explained in the next section): go to the Django admin page > select the table "email addresses" and manually verify your email address. Now you`re good to go!

Features and details

It is worth noting that by downloading the repository as it is, you will only be able to run it in development mode. If you look at settings.py, you'll notice that some lines of code (most commented out) actually have the structure of a production environment configuration (such as setting up a database and connecting to external services), so one could actually deploy the application by creating a .env file with the correct URLs (for instance, a URL provided by Railway if you decided to deploy the application with Redis), uncommenting the lines which take care of the related settings, and adding any extras you'd like.
Now, it's time to learn about some features that Chattfy offers:

  • Real-time chat with a group of users
  • Real-time chat with a specific user (private messaging)
  • Text messages and file uploads (PDFs, images, GIFs, etc) are supported
  • A chatroom admin can change the room`s name, kick out members, and delete the room
  • It is possible to customize your profile's description, picture, and display name
  • Web sockets and HTMX allow for a smooth experience, in which there are no frequent page reloads

Contributing

Ideas for enhancement and new features are welcome, so feel free to initiate pull requests.

About

A real time chat web application with Django and web sockets

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors