Skip to content

loboganng/Delivery_API

Repository files navigation

Delivery_API — Full-Stack Delivery Management API

Delivery_API is a production-ready REST API built with Node.js, Express, and TypeScript. Features JWT multi-role authentication (admin and client), delivery status tracking, and comprehensive logging. Perfect showcase of scalable backend development patterns.

Node.js TypeScript Express PostgreSQL

Table of Contents

Features

  • JWT Multi-Role Authentication: Role-based permissions for admin and client.
  • Full CRUD: Deliveries with status tracking (pending, in transit, delivered).
  • Robust Validation: Zod schemas with custom error messages and type safety.
  • Database: Prisma ORM + PostgreSQL (optimized schema, migrations).
  • Containerization: Docker and docker-compose for local/cloud deployment.
  • Unit Tests: Jest with high coverage and realistic mocks.
  • Production Patterns: Custom middleware, global error handling, rate limiting.

Tech Stack

Backend Database DevOps Testing
Node.js, Express, TypeScript Prisma + PostgreSQL Docker Jest
Zod (Validation) ESLint

Quick Start

Prerequisites

  • Node.js 20+
  • Docker & Docker Compose
  • PostgreSQL (via Docker)

1. Clone & Install

git clone https://github.com/yourusername/Delivery_API.git
cd Delivery_API
npm install

2. Database setup

Prisma migration

npx prisma migrate dev
npx prisma generate

3. Docker

docker-compose up -d

4. Run server

npm run dev  # http://localhost:3333
# or
npm run test  # Tests
npm run lint  # Code quality

About

In this project I'll be creating a API for a delivery service app. The app will have different user roles (Sale and Customer), using authentication and authorization. The will also have delivery status (processing, shipped and delivered), and it'll also register the movement of the product, e.g. if the products has left for delivery.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors