https://github.com/anmamuncoder/django-authentication-system
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
https://github.com/anmamuncoder/django-authentication-system
celery chache django django-redis django-rest-framework docker email-verification graphql-api postgresql redis rest-api throttle
Last synced: 5 months ago
JSON representation
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
- Host: GitHub
- URL: https://github.com/anmamuncoder/django-authentication-system
- Owner: anmamuncoder
- Created: 2025-11-02T06:02:19.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2025-11-29T15:48:23.000Z (7 months ago)
- Last Synced: 2025-11-30T04:44:01.174Z (7 months ago)
- Topics: celery, chache, django, django-redis, django-rest-framework, docker, email-verification, graphql-api, postgresql, redis, rest-api, throttle
- Language: Python
- Homepage:
- Size: 122 KB
- Stars: 0
- Watchers: 0
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 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
```sh
sudo docker compose -f docker-compose-dev.yml build
```
Builds all service images defined in compose (web, db, redis, worker).
2) Apply database migrations
```sh
sudo docker compose -f docker-compose-dev.yml run --rm web python manage.py migrate
```
Creates/updates database schema in the Postgres container.
3) Start the stack
```sh
sudo docker compose -f docker-compose-dev.yml up
```
Starts web, db, redis, and the Celery worker (logs stream in the foreground).
4) Create an admin user (optional)
```sh
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
```sh
sudo docker compose -f docker-compose-dev.yml build
```
Build or rebuild images after changing dependencies or Dockerfile.
### Make migrations
```sh
sudo docker compose -f docker-compose-dev.yml run --rm web python manage.py makemigrations
```
Generates new migration files from your model changes.
### Migrate
```sh
sudo docker compose -f docker-compose-dev.yml run --rm web python manage.py migrate
```
Applies pending migrations to the database.
### Run project
```sh
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
```sh
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
```sh
sudo docker compose -f docker-compose-dev.yml run --rm web
```
Run any ad‑hoc manage.py or shell command in the web container.
## Common tasks
- Create superuser
```sh
sudo docker compose -f docker-compose-dev.yml run --rm web python manage.py createsuperuser
```
- Run tests (pytest)
```sh
sudo docker compose -f docker-compose-dev.yml run --rm web pytest -q
```
- Django shell
```sh
sudo docker compose -f docker-compose-dev.yml run --rm web python manage.py shell
```
- Collect static files (if needed)
```sh
sudo docker compose -f docker-compose-dev.yml run --rm web python manage.py collectstatic --noinput
```
- Stop services
```sh
sudo docker compose -f docker-compose-dev.yml down
```
- Stop and remove volumes (DB reset)
```sh
sudo docker compose -f docker-compose-dev.yml down -v
```