joshriang
← Back to portfolio

Web & frontend·JavaScript·Published

Next Redis Starter

netlab-store is the Module 6 case-study template: a Next.js 14 App Router frontend and an Express API over PostgreSQL in a Turbo workspace, with the whole thing deployable to Vercel as one service. The interesting part is the deployment shape: vercel.json rewrites /api/* to the Express entry point and everything else to the frontend, so one domain serves both without CORS or a second project. The backend is layered routes to controllers to services to models, with Knex and pg underneath, covering auth, items, users, transactions and reports, plus a request logger, an error handler and Zod-style validators at the edge. seed.sql creates the schema and sample users, items and transactions so a fresh clone has a working store in one psql call, and a Postman collection documents the routes. This is scaffolding I wrote to be reused, so the routes and schema are meant to be read before they are extended.

Date
2026
Main stack
JavaScript
Code
github ↗
01
02
  • Vercel rewrites with a single /api/* prefix let a monorepo deploy as one origin, which removes CORS and cookie-scope problems before they start.
  • Seed SQL has to be safe to run twice; a demo template that explodes on the second psql call is worse than one with no seed at all.
  • Layering routes to controllers to services to models pays off the moment one item lookup is needed by both the transaction flow and the report flow, which is exactly where a flat controller file breaks.
03

Scale 0–100: how much this project relied on each skill.