A modern backend architecture showcasing clean engineering practices, robust CI/CD automation, and cloud-ready deployment using Docker and GitHub Actions.
This repository demonstrates full-cycle backend development — from RESTful API design and authentication to automated testing, containerization, and continuous integration pipelines.
It’s structured to serve as both a production-ready backend template and a portfolio development piece.
- ⚙️ Modular Node.js + Express API with scalable architecture
- 🧩 MVC pattern using controllers, middleware, and models
- 🧠 Drizzle ORM for type-safe and elegant database access
- 🧰 Comprehensive CI/CD pipelines via GitHub Actions
- 🧪 Automated testing powered by Jest & Supertest
- 🧹 Code quality enforcement using ESLint + Prettier
- 🐳 Dockerized environment for consistent dev and production builds
- ☁️ DockerHub integration for seamless image deployment
- 🔒 Security-focused middleware with Helmet, JWT & Zod validation
- 🧾 Documentation-first approach with clear prerequisites and setup guides
- Node.js + Express.js — Production-ready REST API foundation
- Drizzle ORM — Type-safe SQL toolkit for PostgreSQL or MySQL
- JWT (jsonwebtoken) — Secure token-based authentication
- bcrypt — Hashes and verifies passwords securely
- Zod — Schema validation for requests (e.g. sign-up, login forms)
- Winston — Configurable logging with transport support
- Helmet — HTTP header hardening for security
- Morgan — Request logging middleware
- CORS — Cross-Origin Resource Sharing support
- cookie-parser — Cookie handling for authentication and sessions
- Jest — Unit and integration testing framework
- Supertest — HTTP assertions for testing API endpoints
- ESLint + Prettier — Code linting and consistent formatting
- Docker — Containerization for environment consistency
- Docker Compose — Dev & Prod configuration separation
- GitHub Actions — Automated CI/CD pipelines
- DockerHub — Continuous delivery for container images
lint-and-format.yml— ESLint + Prettier checks for consistent code styletests.yml— Runs Jest + Supertest tests and publishes coveragedocker-build-and-push.yml— Builds the Docker image and pushes to DockerHub
| Stage | Tooling | Outcome |
|---|---|---|
| Lint & Format | ESLint, Prettier | Enforced code quality & style |
| Test & Coverage | Jest, Supertest | Regressions caught early, coverage tracked |
| Build & Package | Docker | Reproducible, portable image |
| Publish | DockerHub | Image available for deployments |
- Clean layering: routes → controllers → services → models
- Validation: Zod-based schemas for safe request parsing
- Security: Helmet, JWT auth middleware, CORS, cookie-parser
- Logging: Winston logger with transports and log levels
- Config & Observability: Environment-based configuration and centralized logging
- Migrations: Drizzle SQL + metadata tracking (
drizzle/) - Developer ergonomics: ESLint, Prettier, shell scripts for dev/prod workflows
- Scalability: Modular service layer and reusable middleware
| Package | Purpose |
|---|---|
| express | Core web framework |
| drizzle-orm | Type-safe database ORM |
| jsonwebtoken (JWT) | Auth middleware for token validation |
| bcrypt | Secure password hashing |
| zod | Validation schema for signup/login |
| helmet | Security headers |
| morgan | HTTP request logger |
| cors | Cross-origin resource sharing |
| cookie-parser | Cookie parsing & management |
| winston | Structured logging |
| jest | Testing framework |
| supertest | API endpoint testing |
Follow Prerequisites.md