Skip to main content
This guide is for contributors and developers who want to build, modify, or run FamilyCo from source. End users should use the release builds instead.

Prerequisites

  • Node.js 22 LTS
  • pnpm 10
  • A POSIX shell (macOS, Linux, or WSL on Windows)

1. Install dependencies

The repository is a pnpm workspace managed by Turborepo. Workspaces under apps/* and packages/* are linked automatically.

2. Configure environment

The web .env file is primarily needed when running the web client standalone (against an external server). The default local server URL is http://127.0.0.1:4000. See Configuration for the full list of environment variables.

3. Run development mode

Runs the Fastify server and the Vue 3 web client together.
Default endpoints:
  • Web: http://127.0.0.1:5173
  • Server: http://127.0.0.1:4000 (API at /api/v1)

Common commands

GoalCommand
Run server + webpnpm dev
Run web + electronpnpm dev:electron
Build all packagespnpm build
Build electron releasepnpm build:electron
Run all testspnpm test
Typecheck the workspacepnpm typecheck
Generate the Prisma clientpnpm prisma:generate
Run a Prisma migrationpnpm prisma:migrate
Package-scoped examples:

Validation gates

Before opening a pull request, run at minimum:
For broader changes:

Troubleshooting

Stop stale server processes (or change PORT in .env) and rerun pnpm dev.
Rebuild native modules and restart desktop mode:
Migration safety failed at startup. Check the server logs, fix the database state, then restart. While in read-only mode, mutation routes return 503 READ_ONLY_MODE.

Next steps

Architecture

Monorepo layout, runtime lanes, and design constraints.

Coding rules

Conventions for AI agents and human contributors.

Domain model

Core entities and invariants enforced by the schema.

Configuration

Environment variables for runtime, queue, auth, and more.