Welcome to the codebase. See below for development set-up instructions. See Manifesto for what Billion even is, CONTRIBUTING.md for how to start working on it, and docs/ for how the system works.
Run the contributor onboarding assistant from the repository root:
git clone https://github.com/billion-app/billion.git
cd billion
pnpm install
pnpm onboardIt installs dependencies, prepares .env, finds or starts Postgres, applies
the schema, and optionally prepares the Expo native projects. See
CONTRIBUTING.md for the exact steps and non-interactive
flags.
This sets up Expo and Next.js (Next.js is necessary to run the Expo app)
pnpm run dev
And go to the @acme/ios tab in that TUI and follow Expo's instructions (press i, typically)
pnpm dev:nextOpens at http://localhost:3000. This runs Next.js + all dependency packages (api, auth, db, ui, validators) via Turborepo.
cd apps/scrapers && pnpm devMake sure you have the relevant environment variables set up
If anything goes wrong, continue reading to see the old, manual set up instructions:
Requirements:
- Node >=22.20.0 (22.15.0 works with a warning)
- pnpm installed
- A Postgres instance selected or started by
pnpm onboard
Make sure you have:
- Xcode CLI stuff (
xcode-select --install)- Xcode installed with iOS simulator (App Store)
- A database selected by
pnpm onboard(system Postgres or Docker fallback).
Remember to change it back to
"dev": "expo start",when done.
- Make sure you have XCode and XCommand Line Tools installed as shown on expo docs.
Note
If you just installed XCode, or updated it, open the simulator manually once. Run npx expo start from apps/expo, then enter I to launch Expo Go. After that, pnpm dev from root works.
+ "dev": "expo start --ios",- Run
pnpm devat the project root folder.
-
Install Android Studio tools as shown on expo docs.
-
Change the
devscript atapps/expo/package.json:+ "dev": "expo start --android", -
Run
pnpm devat the project root folder.
# Website only
pnpm dev:next
# Everything (broken on Windows — use dev:next instead)
pnpm devSee CONTRIBUTING if you need to add a new UI component or a new package in
packages/.
Now, everything below is NOT copy+pasted from the original template README. Good job reading this far. Send me a text if you did.
Website:
pnpm devfails with "No package found with name ''!@acme/scraper''" — Usepnpm dev:nextinstead. The single quotes around the filter get mangled on Windows.Cannot find module '@tailwindcss/postcss'— Make sure@tailwindcss/postcssis inapps/nextjs/package.jsondevDependencies (pnpm strict isolation requires it as a direct dependency).- DB connection errors — Verify
POSTGRES_URLin root.envis set correctly and the database is running. Runpnpm db:pushto apply the schema. - Dependency issues — add this to root
.npmrc:node-linker=hoisted
Expo:
"CommandError: No development build (dev.thatxliner.billion) for this project is installed. Please make and install a development build on the device first. Learn more: https://docs.expo.dev/development/build/"
In this case, pnpm clean && pnpm install && cd apps/expo && pnpm ios before you go back to root and run pnpm dev. Maybe open the Xcode project and build from there?
Always open ios/billion.xcworkspace, never ios/billion.xcodeproj. If that doesn't help, re-create the ios directory with pnpm expo prebuild --platform ios --clean from apps/expo/.
See docs/troubleshooting.md for common pnpm run ios crash errors and their fixes.