Monorepo for a public Beagle database app supporting breeders, managed by Suomen Beaglejarjesto (Finska Beagleklubben).
Beagle App v2 is a production-style monorepo for a public Beagle database supporting breeders and managed by Suomen Beaglejarjesto (Finska Beagleklubben).
- Next.js + React + TypeScript full-stack application
- Monorepo architecture with separate web/server/db/contracts/api-client packages
- PostgreSQL + Prisma for schema, migrations, and data access
- Authentication and admin-ready routing for association-managed operations
- Documented operational workflows for environment safety, imports, and deployment
- Architecture rules and boundaries: ARCHITECTURE.md
- Developer workflow and agent rules: AGENTS.md
- Documentation rules: docs/documentation-rules.md
- Tech debt register: docs/tech-debt.md
- App usage guide: docs/app-usage-and-features.md
- Env safety and runbooks: docs/ops-env-safety.md
- Import behavior details: docs/legacy-import/import-flow.md
- Deployment notes: docs/vercel-deployment.md
- Changelog: CHANGELOG.md
- Node.js 20+
- pnpm 10+
- PostgreSQL for app data
- MariaDB only for phase-1 legacy import
All commands assume repository root (beagle-app-v2/).
- Copy local environment template:
cp .env.example .env.local- Update
.env.localwith values for your machine. Required for first run:
DATABASE_URL(PostgreSQL)BETTER_AUTH_SECRET(minimum 32 characters)KOIRATIETOKANTA_RESULTS_API_SECRET(required when testing the AJOK result upsert API)
Useful for admin login setup:
BOOTSTRAP_ADMIN_EMAILBOOTSTRAP_ADMIN_PASSWORD
Needed only for legacy import:
LEGACY_DATABASE_URL(MariaDB)
- Install dependencies:
pnpm install- Generate Prisma client:
pnpm db:generate- Apply committed migrations (recommended):
pnpm db:deployOptional local-only shortcut (no migration files applied):
pnpm db:push- Start local web app:
pnpm devDefault URL: http://localhost:3000
- Optional: bootstrap first admin user:
pnpm auth:bootstrap-adminFor staging/prod commands and explicit env-file loading, use:
pnpm typecheck
pnpm lint
pnpm test
pnpm buildTargeted checks:
pnpm --filter @beagle/web test:unit
pnpm --filter @beagle/server test:unit
pnpm --filter @beagle/db test
pnpm --filter @beagle/web test:e2epnpm db:studio
pnpm audit:prune
pnpm auth:generate
pnpm auth:migrate
pnpm auth:bootstrap-admin
pnpm auth:set-passwordVercel build command:
pnpm vercel:buildSee docs/vercel-deployment.md for supported Vercel project setups.
- README is intentionally minimal and usage-focused.
- Detailed feature behavior, API surface, and implementation conventions are in
docs/app-usage-and-features.md. - Documentation workflow and future cleanup note conventions are in
docs/documentation-rules.mdanddocs/tech-debt.md. - Source of truth for architecture and dependency boundaries is
ARCHITECTURE.md.