43 lines
975 B
Markdown
43 lines
975 B
Markdown
# Perauset
|
|
|
|
Village operations platform.
|
|
|
|
## Project Structure
|
|
|
|
- `backend/` — Backend server (uWebSockets + Pikku)
|
|
- `packages/functions/` — Shared business logic / Pikku functions
|
|
- `sql/` — Database migrations (postgres-migrations)
|
|
|
|
## Running
|
|
|
|
### Backend
|
|
|
|
```sh
|
|
cd backend && yarn dev
|
|
```
|
|
|
|
Runs `tsx watch` with env files (`../.env` and `.env.local`). Watches for changes and auto-restarts.
|
|
|
|
### Port
|
|
|
|
| Service | Port |
|
|
|---------|------|
|
|
| Backend | 6002 |
|
|
|
|
## Commands
|
|
|
|
- `yarn pikku` — Run Pikku CLI codegen (`pikku all`)
|
|
- `yarn pikku:watch` — Run Pikku CLI codegen in watch mode
|
|
- `yarn prebuild` — Bootstrap + codegen
|
|
- `yarn tsc` — Type-check all workspaces
|
|
- `cd backend && yarn dbmigrate` — Run database migrations
|
|
- `cd packages/functions && yarn db:types` — Regenerate Kysely DB types
|
|
|
|
## Package Manager
|
|
|
|
Uses **Yarn 4.9.2** (with workspaces). Node >= 22 required.
|
|
|
|
## Database
|
|
|
|
PostgreSQL, database name `perauset`, default schema `app`.
|