Each Shop Microservers service is fully self-contained — it has its ownDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/astrxnomo/shop-microservers/llms.txt
Use this file to discover all available pages before exploring further.
package.json, TypeScript config, and database schema. This means you can run any single service in isolation using tsx watch for file-watching hot reload, without spinning up the entire Docker Compose stack. This is the recommended workflow when you are actively extending or debugging a service, as it gives you instant feedback and direct access to logs without container overhead.
Prerequisites
Node.js 20+
All services require Node.js 20 or later. Use
node -v to confirm your version.npm
Each service manages its own
node_modules. Run npm install inside the service directory before starting.PostgreSQL instance
Auth, catalog, and orders each require a running Postgres 16 database reachable via
DATABASE_URL.Redis instance
The cart service requires a running Redis 7 instance reachable via
REDIS_URL.Available Scripts
Every service shares the same script conventions in itspackage.json. The scripts available depend on whether the service has a database.
| Script | Command | Services |
|---|---|---|
npm run dev | tsx watch src/index.ts | All four services |
npm run build | tsc | All four services |
npm run db:push | prisma db push | auth, catalog, orders |
npm run db:generate | prisma generate | auth, catalog, orders |
npm run db:seed | tsx prisma/seed.ts | catalog only |
The cart service has no database scripts because it uses Redis exclusively — no Prisma, no migrations, no seed.
Service Ports and Environment Variables
Each service listens on a fixed default port and reads its configuration from environment variables. Set these before runningnpm run dev.
| Service | Default Port | Key Environment Variables |
|---|---|---|
| auth | 3004 | DATABASE_URL, JWT_SECRET |
| catalog | 3001 | DATABASE_URL |
| cart | 3002 | REDIS_URL, JWT_SECRET |
| orders | 3003 | DATABASE_URL, CATALOG_URL, CART_URL, JWT_SECRET |
| frontend | 3000 | NEXT_PUBLIC_API_URL |
Walkthrough: Running the Catalog Service
The catalog service is a good starting point because it is stateless beyond its database and does not call any other service.Point DATABASE_URL at a running Postgres instance
The default credentials match the Docker Compose setup. Adjust the host, port, or credentials if your local Postgres differs.
Apply the schema and seed the database
db:push applies the Prisma schema directly to the database. db:seed inserts 12 sample products — it is idempotent and will skip insertion if products already exist.Walkthrough: Running the Cart Service
The cart service is the simplest to run locally because it has no Prisma schema or migrations — only a Redis connection and a JWT secret.Set the required environment variables
JWT_SECRET must match the value used by the auth service so that tokens issued by auth can be verified by cart.