A backend and DevOps learning project that simulates a real-world school management system. It started as a simple SQLite prototype and evolved into a Dockerized Flask API connected to Azure Database for PostgreSQL, complete with automated CI/CD and test coverage reporting.
Watch a Flask REST API in action, deployed on Azure Web App with Docker, using ACR for images, Azure PostgreSQL for data, and Nginx to hide the long Azure URL behind a simple endpoint...
π Watch the Demo
See how Terraform provisions the same Azure backend (PostgreSQL + Web App) declaratively, replacing manual portal clicks with versioned, repeatable code. This demo covers terraform plan, apply, and real-time validation in the Azure Portal.
β οΈ Not used in production
The live School Management API is deployed via GitHub Actions + Docker + GHCR, not Terraform.
This setup is ephemeral β created for demo and destroyed afterward.
- Architecture Overview: High-level system design and data flow
- DevOps Practices: CI/CD setup, Docker use, Azure integration
- Learning Notes: Key lessons, decisions, and trade-offs from the project
I built this project to gain real backend engineering experience beyond tutorials β focusing on how systems evolve from local development to cloud deployment.
- Design clean, modular REST APIs for multiple entities
- Implement CRUD + archiving logic to preserve data history
- Write maintainable and testable backend logic
- Practice containerization using multi-stage Docker builds
- Build automated CI/CD pipelines for linting, testing, and coverage reporting
- Deploy to the cloud with Azure Database for PostgreSQL
- Continuous integration via GitHub Actions
- Ruff for formatting and linting
- Pytest for unit and integration testing
- Coverage reports automatically posted in pull requests
- Exposes RESTful endpoints for students, instructors, courses, enrollments, and more
- Supports full CRUD + soft-delete (archive) logic
- Uses PostgreSQL (Dockerized locally, Azure-managed in production)
- Fully containerized for consistent deployment
- Includes automated tests for routes and business logic
This project is designed to simulate real development and deployment environments:
| Environment | Description |
|---|---|
| Local (Direct) | Run Flask API with your local Python env and PostgreSQL. Fastest for debugging. |
| Local (Dockerized) | Use Docker Compose to spin up Flask API + PostgreSQL. Reproducible, isolated environment. |
| Production (Azure) | Deployed Flask API connected to Azure Database for PostgreSQL. Provides reliability, backups, scalability. |
# Install dependencies
pip install -r requirements.txt
# Run app
python run.py(Optionally, install PostgreSQL locally and configure your .env.)
make up # start API + DB containers via Docker Compose
./api_client.sh read students
make down # stop containers
make down V=1 # clear volumes if needed- Deploy Docker image via ACR to Azure Web App
- Connect to Azure Database for PostgreSQL
- Update environment variables and run init scripts (
scripts/init_azure_db.sh)
Includes a helper Bash script api_client.sh to simplify testing via command line.
./api_client.sh read students
./api_client.sh create instructors
./api_client.sh archive courses| Resource | GET | POST | PUT | PATCH (Archive) |
|---|---|---|---|---|
| Students | β | β | β | β |
| Instructors | β | β | β | β |
| Courses | β | β | β | β |
| Enrollments | β | β | β | β |
| Programs | β | β | β | β |
| Departments | β | β | β | β |
| Assignments | β | β | β | β |
| Terms | β | β | β | β |
This project evolved from a simple CRUD API into a production-ready backend with:
- Dockerized PostgreSQL
- Automated CI/CD
- Cloud deployment on Azure
It represents a practical journey through backend design, DevOps practices, and system evolution β the way real-world services grow.