Software Architecture & Security

E-Commerce Backend API with Node.js, Express, and PostgreSQL

Overview: A full-featured e-commerce backend API built with Node.js, Express.js, and PostgreSQL. This project demonstrates enterprise-grade API design, database modeling, authentication, and payment integration patterns used in modern online retail platforms.

Tech Stack: Node.js, Express.js, PostgreSQL, bcrypt, JWT, Stripe API, Jest, Docker

Key Features: User authentication with JWT and bcrypt, product management with categories and inventory tracking, order management with status tracking, Stripe payment processing, cart and checkout flow, role-based access control for admin users, RESTful API design with input validation, automated testing with Jest and Supertest, Docker containerization.

Architecture: The system uses a three-layer architecture with routes, controllers, and services. The database schema includes users, products, categories, orders, order_items, and payments tables with proper foreign key relationships, CHECK constraints, and indexes on frequently queried columns.

Database Schema: users (id, email, password_hash, full_name, role, created_at), products (id, category_id, name, description, price, stock, status, created_at), categories (id, name, slug, parent_id), orders (id, user_id, status, total, created_at), order_items (id, order_id, product_id, quantity, price, created_at), payments (id, order_id, stripe_payment_id, amount, status, created_at).

← Previous Testing Your API With Jest and Supertest Next → Real-Time Chat with WebSocket Support