scaffold festival drink tracker (pnpm workspace, Fastify + SQLite, Preact tablet UI, admin)
This commit is contained in:
parent
cf33e6ea04
commit
e0898bea22
34 changed files with 5446 additions and 0 deletions
34
README.md
Normal file
34
README.md
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
# wutzcalc
|
||||
|
||||
Festival drink-sale tracker. See [PLAN.md](PLAN.md) for architecture, [NOTES.md](NOTES.md)
|
||||
for the original requirements, and [TODO.md](TODO.md) for deferred work.
|
||||
|
||||
## Dev
|
||||
|
||||
```sh
|
||||
nix develop # node 20, pnpm, sqlite, build deps
|
||||
pnpm install
|
||||
ADMIN_PASSWORD=changeme pnpm dev:server # http://localhost:3000
|
||||
pnpm dev:client # http://localhost:5173 (proxies /api, /admin)
|
||||
```
|
||||
|
||||
Open `http://localhost:5173/` for the tablet UI and
|
||||
`http://localhost:5173/admin.html` for the backoffice.
|
||||
|
||||
## Production build
|
||||
|
||||
```sh
|
||||
pnpm install
|
||||
pnpm build
|
||||
ADMIN_PASSWORD=... DB_PATH=/var/lib/wutzcalc/wutz.db node server/dist/index.js
|
||||
```
|
||||
|
||||
Single Node process serves the API, both client entries (`/` tablet,
|
||||
`/admin` backoffice), and writes to one SQLite file.
|
||||
|
||||
## Env vars
|
||||
|
||||
- `PORT` (default `3000`)
|
||||
- `HOST` (default `0.0.0.0`)
|
||||
- `DB_PATH` (default `./wutz.db`)
|
||||
- `ADMIN_PASSWORD` (**required** for backoffice login)
|
||||
Loading…
Add table
Add a link
Reference in a new issue