Add PostgreSQL-backed background worker
This commit is contained in:
@@ -8,7 +8,8 @@ Beenvoice is a freelancer and small-business invoicing platform with a Next.js w
|
||||
beenvoice/
|
||||
├── apps/
|
||||
│ ├── web/ # Next.js dashboard, tRPC API, PostgreSQL/Drizzle
|
||||
│ └── mobile/ # Expo Router mobile app and iOS widgets
|
||||
│ ├── mobile/ # Expo Router mobile app and iOS widgets
|
||||
│ └── worker/ # PostgreSQL-backed scheduler and background jobs
|
||||
├── packages/
|
||||
│ └── domain/ # Platform-neutral shared rules and parsing
|
||||
├── Dockerfile
|
||||
@@ -32,7 +33,7 @@ bun run --filter @beenvoice/web db:push
|
||||
bun run dev
|
||||
```
|
||||
|
||||
`bun run dev` starts Next.js on port 3000 and Expo Metro on port 8082. For a physical iPhone, set `EXPO_PUBLIC_API_URL` in `apps/mobile/.env` to a host the device can reach and configure the web app's canonical/auth URLs consistently.
|
||||
`bun run dev` starts Next.js on port 3000, Expo Metro on port 8082, and the background worker. For a physical iPhone, set `EXPO_PUBLIC_API_URL` in `apps/mobile/.env` to a host the device can reach and configure the web app's canonical/auth URLs consistently.
|
||||
|
||||
Useful workspace commands:
|
||||
|
||||
@@ -61,7 +62,7 @@ git pull
|
||||
./scripts/docker-deploy.sh
|
||||
```
|
||||
|
||||
The root Dockerfile installs the frozen Bun workspace lockfile, builds the Next.js app under Node, and runs migrations plus the web server under Bun.
|
||||
The root Dockerfile installs the frozen Bun workspace lockfile and exposes separate `final` (web) and `worker` targets. The Compose stack starts both; the web container runs migrations before serving requests and the worker tolerates that short startup race.
|
||||
|
||||
## Documentation
|
||||
|
||||
@@ -69,6 +70,7 @@ The root Dockerfile installs the frozen Bun workspace lockfile, builds the Next.
|
||||
- [Web architecture](./apps/web/docs/ARCHITECTURE.md)
|
||||
- [Mobile setup](./apps/mobile/README.md)
|
||||
- [Mobile architecture](./apps/mobile/docs/ARCHITECTURE.md)
|
||||
- [Worker architecture](./apps/worker/README.md)
|
||||
- [Shared domain package](./packages/domain/README.md)
|
||||
|
||||
## Product concepts
|
||||
|
||||
Reference in New Issue
Block a user