Documentation Index
Fetch the complete documentation index at: https://mocha-docs.embrly.ca/llms.txt
Use this file to discover all available pages before exploring further.
Prerequisites
- Bun v1.0 or later
- Git
- PostgreSQL 15+ (local or remote)
1. Clone the repository
2. Install dependencies
Mocha is a Bun monorepo. Install all workspace dependencies from the root:3. Configure environment variables
API (apps/api/.env)
Client (apps/client/.env)
If you access the dev server from a VM or a different host (e.g. WSL2 or a remote machine), add
ALLOWED_DEV_ORIGINS="your-ip" to apps/client/.env to allow the HMR websocket through.4. Set up the database
Push the Prisma schema to your database and generate the client:5. Start the development servers
From the repo root, run all apps in parallel:| App | URL |
|---|---|
| Client (Next.js) | http://localhost:3000 |
| API (Fastify) | http://localhost:5003 |
6. Docs (optional)
Preview the documentation site locally:Useful commands
| Command | Description |
|---|---|
bun run build | Build all apps for production |
bun run lint | Lint all packages |
bun run format | Format all files with Prettier |
cd apps/api && bun run db:migrate | Run a Prisma migration |
cd apps/api && bun run generate | Regenerate the Prisma client |