46 lines
1.7 KiB
Markdown
46 lines
1.7 KiB
Markdown
# KoolTap
|
|
|
|
The backoffice for KoolTap, the bar till: bar terminals (a Flutter app) sync their tabs, sales and stock here, and the
|
|
venue runs tabs, customers, reminders and stock from a web dashboard.
|
|
|
|
```
|
|
apps/
|
|
api/ NestJS API on PostgreSQL (Prisma)
|
|
dashboard/ Next.js dashboard
|
|
packages/
|
|
shared/ The contract: zod schemas and types for the terminal protocol and the dashboard API
|
|
scripts/
|
|
terminal-simulator.ts A terminal on the command line
|
|
docs/ Architecture, terminal protocol, development, production, security, testing
|
|
```
|
|
|
|
## Quick start
|
|
|
|
Needs Node.js 24, pnpm (`corepack enable`) and Docker for the database.
|
|
|
|
```bash
|
|
docker compose up -d # PostgreSQL on localhost:5432
|
|
cp .env.example apps/api/.env # and NEXT_PUBLIC_API_URL into apps/dashboard/.env.local
|
|
pnpm install # also generates the Prisma client
|
|
pnpm db:migrate
|
|
pnpm db:seed
|
|
pnpm dev # API on :3001, dashboard on :3000
|
|
```
|
|
|
|
The seed prints the demo accounts (one per role) and a terminal token; `pnpm simulate` then plays a terminal against
|
|
your local API.
|
|
|
|
## Tests
|
|
|
|
```bash
|
|
pnpm test # unit tests: the tab, stock and product rules, parsing, email templates, dashboard helpers
|
|
pnpm test:e2e # the API against a real database (DATABASE_URL), terminal and dashboard together
|
|
```
|
|
|
|
## More
|
|
|
|
- [Architecture](docs/architecture.md) and the [decisions behind it](docs/architecture-decisions.md)
|
|
- [Terminal protocol](docs/terminal-protocol.md), for the Flutter app
|
|
- [Local development](docs/local-development.md), [testing](docs/testing.md)
|
|
- [Production on Coolify](docs/production.md), [security](docs/security.md)
|