Skip to content

AbhayParasharhere/Event-Management-API

Repository files navigation

Event Management API

A RESTful backend API for managing events, user enrollment, and authentication — built with Django REST Framework, Dockerized with PostgreSQL, and shipped with GitHub Actions CI for automated testing and linting.

Python Django PostgreSQL Docker


What It Does

A production-structured Django REST Framework API with full user authentication, event management, and enrollment workflows. Built with a Dockerized PostgreSQL database, custom user model, and GitHub Actions CI pipeline for automated testing and linting on every push.

Endpoints

Module Functionality
User API Registration, login, token authentication, custom user model
Event API Create, list, and manage events — organized event listing feature
Enrollment API Enroll users into events, manage enrollment records
Core Shared models, migrations, management commands

Tech Stack

Layer Technology
Framework Django REST Framework (Python)
Database PostgreSQL (via Docker service)
Containerization Docker + Docker Compose (Python Alpine image)
CI/CD GitHub Actions — automated test + lint on every push
Auth Token authentication (DRF built-in)
Code Quality Flake8 linting

Project Structure

Event-Management-API/
├── app/
│   ├── app/              # Django project config (settings, urls, wsgi, asgi)
│   ├── core/             # Shared models, migrations, management commands
│   │   └── tests/        # Unit tests
│   ├── enrollment/       # Enrollment API
│   ├── event/            # Event API
│   └── user/             # User API + token auth
├── .flake8               # Linting config
├── db.sqlite3            # Dev database
└── manage.py

Key Implementation Details

  • Custom user model — extended Django's AbstractUser for flexible auth
  • Token authentication — endpoint returns auth token on login; used to secure all protected routes
  • Docker Compose setupapp service waits for db service to be ready via custom wait_for_db management command before running migrations
  • PostgreSQL via Docker — psycopg2 installed via Alpine dependencies in Dockerfile; db environment variables configured in Compose
  • GitHub Actions CI — runs flake8 linting and full test suite on every push; wait_for_db integrated into workflow run process

Getting Started

git clone https://github.com/AbhayParasharhere/Event-Management-API.git
cd Event-Management-API

# Run with Docker (recommended)
docker-compose up --build

# The app service waits for PostgreSQL to be ready, then migrates and starts
# API available at http://localhost:8000

Without Docker:

python -m venv venv
source venv/bin/activate
pip install -r requirements.txt
python manage.py migrate
python manage.py runserver

Purpose

Built to learn production backend patterns — specifically Docker + PostgreSQL setup, DRF token auth, custom user models, and CI/CD with GitHub Actions. This project directly preceded my co-op at Input Logic Canada, where I built a Django REST Framework API solo under a real client deadline (90% satisfaction rating, 20% reduction in setup time).


Related Projects

About

An API created using Django Rest Framework to help in organising and managing events. Django REST Framework event management API — token auth, custom user model, Docker + PostgreSQL, GitHub Actions CI. Production backend patterns built before Input Logic co-op.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors