05project
ecommerce-api
A REST API for e-commerce platforms: catalog, cart, orders and JWT authentication.
- Year
- 2024
- Type
- Open source
- Tech stack
- Node.jsExpressMongoDB
About the project
A complete e-commerce backend: catalog, cart, orders and JWT authentication, structured the way I build production APIs — documented, versioned and testable.
Gallery
- 01
The challenge
Commerce backends fail at the edges: race conditions in carts, order state machines and auth rules that differ for customers, managers and admins.
- 02
The solution
A REST API with an explicit order state machine, transactional cart operations, role-based JWT auth and OpenAPI documentation for every endpoint.
- 03
The result
A backend a frontend team can build against without asking questions — documented, versioned and covered by integration tests on the money paths.
Key features
- 01Order state machineExplicit transitions from cart to delivered — invalid states are unrepresentable.
- 02Role-based authCustomer, manager and admin scopes enforced at the route layer with JWT.
- 03Documented contractAn OpenAPI spec plus a runnable request collection for instant onboarding.
My role
- API design and implementation
- Node.js + Express + MongoDB
- Integration tests on critical flows
Related service
REST & GraphQL APIsMore projects
Build something similar
↗cloud-os
2026An experimental web-based cloud operating system — a desktop-like environment running in the browser.
PHPJavaScript
nextjs-fullstack-template
2026A production-ready full-stack Next.js starter with TypeScript — the boilerplate I reuse to ship new products fast.
Next.jsTypeScript