Skip to content

Enterprise-grade REST API @ GraphQL API with comprehensive authentication system, real-time inventory management, and subscription-based access control. Features include user registration with OTP verification, password reset workflows, profile management, WebSocket-powered live updates, inventory sharing between users, subscription tiers, and inte

Notifications You must be signed in to change notification settings

anmamuncoder/django-authentication-system

Repository files navigation

django-authentication-system

A Django-based authentication service with a Dockerized dev setup (PostgreSQL + Redis + Celery). Use the commands below to build, run, and manage your local environment quickly.

Prerequisites

  • Docker and Docker Compose installed
  • A .env file in the project root (see Environment variables below)

Quick start

  1. Build images
sudo docker compose -f docker-compose-dev.yml build

Builds all service images defined in compose (web, db, redis, worker).

  1. Apply database migrations
sudo docker compose -f docker-compose-dev.yml run --rm web python manage.py migrate

Creates/updates database schema in the Postgres container.

  1. Start the stack
sudo docker compose -f docker-compose-dev.yml up

Starts web, db, redis, and the Celery worker (logs stream in the foreground).

  1. Create an admin user (optional)
sudo docker compose -f docker-compose-dev.yml run --rm web python manage.py createsuperuser

Interactive prompt to create a Django superuser for admin login.

Docker commands (with brief explanations)

Build

sudo docker compose -f docker-compose-dev.yml build

Build or rebuild images after changing dependencies or Dockerfile.

Make migrations

sudo docker compose -f docker-compose-dev.yml run --rm web python manage.py makemigrations

Generates new migration files from your model changes.

Migrate

sudo docker compose -f docker-compose-dev.yml run --rm web python manage.py migrate

Applies pending migrations to the database.

Run project

sudo docker compose -f docker-compose-dev.yml up

Brings up all services (web, db, redis, worker). Add -d to run in the background.

Install packages

sudo docker compose -f docker-compose-dev.yml run --rm web pip install package_name

Installs a Python package inside the web container. Remember to pin it in requirements.txt and rebuild.

Other commands

sudo docker compose -f docker-compose-dev.yml run --rm web <your_command_here>

Run any ad‑hoc manage.py or shell command in the web container.

Common tasks

  • Create superuser

     sudo docker compose -f docker-compose-dev.yml run --rm web python manage.py createsuperuser
  • Run tests (pytest)

     sudo docker compose -f docker-compose-dev.yml run --rm web pytest -q
  • Django shell

     sudo docker compose -f docker-compose-dev.yml run --rm web python manage.py shell
  • Collect static files (if needed)

     sudo docker compose -f docker-compose-dev.yml run --rm web python manage.py collectstatic --noinput
  • Stop services

     sudo docker compose -f docker-compose-dev.yml down
  • Stop and remove volumes (DB reset)

     sudo docker compose -f docker-compose-dev.yml down -v

About

Enterprise-grade REST API @ GraphQL API with comprehensive authentication system, real-time inventory management, and subscription-based access control. Features include user registration with OTP verification, password reset workflows, profile management, WebSocket-powered live updates, inventory sharing between users, subscription tiers, and inte

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •