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