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 pos-backend and one for pos-frontend.
Start the Backend Server
In the pos-backend terminal, run:
The server is ready when you see this output:
The API is live at: http://localhost:5000
Start the Frontend Server
In the pos-frontend terminal, run:
Ready when you see:
The app is live at: http://localhost:3000
Verification Checklist
| Check | Expected Result |
|---|---|
| Open http://localhost:3000 in browser | PosVelo login page appears |
| Log in with Super Admin credentials | Redirect to the admin dashboard |
| Navigate to Products | Demo products appear (from seed data) |
| Open http://localhost:5000/api/health | JSON health response |
All Backend npm Scripts
| Script | Description |
|---|---|
npm run dev | Start backend in development mode with hot-reload (tsx watch) |
npm run build | Compile TypeScript to JavaScript (outputs to dist/) |
npm run start | Run the compiled production build from dist/server.js |
npm run db:generate | Regenerate Prisma client after any schema change |
npm run db:migrate | Create and apply a new migration — prompts for a name (dev only) |
npm run db:migrate:prod | Apply pending migrations without prompts — use in production |
npm run db:seed | Insert demo products, customers, and a sample tenant |
npm run db:seed:super-admin | Create the platform-level Super Admin account |
npm run db:studio | Launch visual database browser at http://localhost:5555 |
npm run db:reset | ⚠️ DANGER — Wipes the entire database and re-runs all migrations |
npm run test | Run the Vitest test suite once and exit |
npm run test:watch | Run tests in interactive watch mode |
npm run typecheck | Validate TypeScript types without emitting output files |
npm run lint | Run ESLint across the entire src/ directory |