Running the Project

Starting both servers and verifying the setup

Note

Both servers must be running at the same time. Keep two terminal windows open — one for saas-pos-backend and one for saas-pos-frontend. If you use the bundled Docker compose for the database, start it first: POSTGRES_PASSWORD=yourpassword docker compose up -d in saas-pos-backend.

Start the Backend Server

In the saas-pos-backend terminal, run:

bash

The server is ready when the structured log shows (with PORT=5000 in your .env):

json

The API is live at: http://localhost:5000

Start the Frontend Server

In the saas-pos-frontend terminal, run:

bash

Ready when you see:

The app is live at: http://localhost:3000

Verification Checklist

CheckExpected Result
Open http://localhost:5000/api/health in browserJSON health response
Open http://localhost:3000 in browserPOSVelo login page appears
Log in with Super Admin credentialsRedirect to the platform admin panel
Log in with a tenant account (from the demo seed or the setup wizard)Business dashboard appears
Navigate to ProductsDemo products appear (if you ran the demo seed)

All Backend npm Scripts

ScriptDescription
npm run devStart backend in development mode with hot-reload (tsx watch)
npm run buildCompile TypeScript to JavaScript (outputs to dist/)
npm run startRun the compiled production build from dist/server.js
npm run db:generateRegenerate Prisma client after any schema change
npm run db:migrateCreate and apply a new migration — prompts for a name (dev only)
npm run db:migrate:prodApply pending migrations without prompts — use in production
npm run db:seedInsert the full demo dataset (same as seed:demo): tenant, stores, products, customers, employees, sales
npm run db:seed:super-adminCreate the platform-level Super Admin account from SUPER_ADMIN_EMAIL / SUPER_ADMIN_PASSWORD
npm run db:seed:billingSeed the default subscription plans for the billing module
npm run db:studioLaunch visual database browser at http://localhost:5555
npm run db:reset⚠️ DANGER — Wipes the entire database and re-runs all migrations
npm run testRun the Vitest test suite once and exit
npm run test:watchRun tests in interactive watch mode
npm run typecheckValidate TypeScript types without emitting output files
npm run lintRun ESLint across the entire src/ directory

All Frontend npm Scripts

ScriptDescription
npm run devStart the Next.js dev server at http://localhost:3000
npm run buildCreate an optimized production build
npm run startServe the production build
npm run lintRun ESLint across the frontend source