/chatapp

This is simple Django group-based chat application. We are using `channels[daphne]` library with `InMemoryChannelLayer` channel layer for async communication, Also `djangorestframework` for the REST APIs.

Primary LanguageJavaScriptMIT LicenseMIT

Chat-app

Django chat application. It is simple group based chat application. We are using channels[daphne] library with InMemoryChannelLayer channel layer for async communication, Also djangorestframework for the REST APIs. In the Frontend we are using Jquery library.

Demo

Features

  • Django web application framework
  • PostgreSQL database

Included Packages and Tools 🛠️

  • Coverage: Test coverage tool
  • Ruff: Linter
  • Black: Code formatter

Requirements 📋


Getting Started 🏁

  1. Clone the repository:

    git clone https://github.com/jitender0514/chatapp.git
  2. Change directory into the project:

    cd chatapp
  3. Copy the env.example file to .env and update the values as needed:

    • For Linux/macOS:
      cp env.example .env
    • For Windows (Command Prompt):
       Copy-Item -Path env.example -Destination .env

How to Setup

Development Prerequisites

  1. Create a virtual environment:

    python -m venv ENV
  2. Activate the virtual environment:

    source ENV/bin/activate
  3. (Optional) Install the development requirements specific to your IDE for enhanced functionality and support [Use Make command for easy setup].

    pip install -r backend/requirements/requirements.dev.txt
  4. Build the image and run the container:

    • If buildkit is not enabled, enable it and build the image:

      DOCKER_BUILDKIT=1 COMPOSE_DOCKER_CLI_BUILD=1 docker-compose -f docker-compose.yml up --build -d
    • If buildkit is enabled, build the image:

      docker-compose -f docker-compose.yml up --build -d
    • Or, use the shortcut (RECOMMENDED For easy setup)

      make build-dev

You can now access the application at http://localhost:8000. The development environment allows for immediate reflection of code changes.


Shortcuts [Recommended for easy setup] 🔑

This project includes several shortcuts to streamline the development process:

  • Create migrations:

    make make-migrations
  • Run migrations:

    make migrate
  • Run the linter:

    make lint
  • Run the formatter:

    make format
  • Run the tests:

    make test
  • Create a super user:

    make super-user
  • Build and run dev environment:

    make build-dev
  • Build and run prod environment:

    make build-prod