2.4 KiB
beenvoice
Beenvoice is a freelancer and small-business invoicing platform with a Next.js web application/API and an Expo mobile companion. The repository is a Bun workspace orchestrated by Turborepo.
Workspace map
beenvoice/
├── apps/
│ ├── web/ # Next.js dashboard, tRPC API, PostgreSQL/Drizzle
│ └── mobile/ # Expo Router mobile app and iOS widgets
├── packages/
│ └── domain/ # Platform-neutral shared rules and parsing
├── Dockerfile
├── docker-compose*.yml
├── package.json
└── turbo.json
The mobile app consumes the same tRPC API and Better Auth sessions as the web app. It imports the server router type at compile time, while runtime-safe shared behavior lives in @beenvoice/domain.
Quick start
bun install
cp apps/web/.env.example apps/web/.env.local
cp apps/mobile/.env.example apps/mobile/.env
bun run --filter @beenvoice/web docker:up
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.
Useful workspace commands:
bun run typecheck
bun run lint
bun run test
bun run build
bun run check
Run an app-specific command with a workspace filter:
bun run --filter @beenvoice/web db:migrate
bun run --filter @beenvoice/mobile ios
bun run --filter @beenvoice/mobile ios:release:upload
Production Docker deployment
Keep production web configuration in apps/web/.env, then run from the repository root:
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.
Documentation
Product concepts
- Clients with optional default hourly rates
- Businesses and sender branding
- Draft, sent, paid, and overdue invoices
- Time tracking and invoice attachment
- Recurring invoices, expenses, payments, and templates
- Public invoice links and API-key-authenticated automation