StatsHub Docs

Getting started

Install the workspace, configure an app, run it, and check your changes.

Prerequisites

ToolVersionUsed by
pnpm10.26.xWorkspace installs and scripts
Node.js20.9+Next.js and repository scripts
Bun1.4+Docs and Expo scripts
Go1.25+apps/api
DockerCurrentLocal Postgres and parity checks

Install dependencies once from the repository root:

pnpm install

Configure an app

Copy only the environment files you need:

cp apps/web/.env.example apps/web/.env.local
cp apps/api/.env.example apps/api/.env
cp apps/expo/.env.example apps/expo/.env.local

The web app and API require DATABASE_URL. Web and Expo also need the public Supabase URL and anonymous key for authentication.

Start local Postgres when you need repository data:

pnpm db:dev:up
pnpm db:dev:psql

pnpm db:dev:reset deletes the local database volume and reloads it.

Run an app

pnpm dev        # web
pnpm dev:docs
pnpm dev:api
pnpm dev:expo

Run each app in its own terminal. Use node packages/statshub-tooling/apps.cjs for addresses reachable from another device. Use pnpm phone for the Expo dev client.

Check changes

pnpm check

pnpm check runs each workspace's lint, typecheck, and test tasks through Turbo. Also run the app-specific build or export for the area you changed:

pnpm build:docs
pnpm --dir apps/expo exec expo export --platform ios
pnpm build

The docs build validates icons. Docs lint also validates internal links:

pnpm --filter statshub-docs lint

On this page