A unified monorepo housing all website portals, dashboards, API services, queue processors, and database configurations.
This repository contains the following apps and other shared packages:
| Name | Description | Stack | URL |
|---|---|---|---|
| apps/frontend | BuildTheEarth Website frontend | Next.js, TypeScript | https://buildtheearth.net |
| apps/api | BuildTheEarth API and Website backend | Express.js, TypeScript | https://api.buildtheearth.net |
| apps/dashboard | BuildTheEarth Dashboard | Next.js, TypeScript | https://my.buildtheearth.net |
| apps/worker | Queue Worker for async tasks | BullMQ, TypeScript | -/- |
| packages/typescript-config | Shared tsconfig for all apps | TypeScript, JSON | -/- |
| packages/prettier-config | Shared Prettier config for all apps | Prettier, JSON | -/- |
| packages/db | Shared Prisma client and schema | Prisma.js | -/- |
To configure this repository on your local computer, follow the instructions below:
- Node.js: Ensure you are running Node.js
20.xor22.x(LTS is recommended). - Yarn Modern: Modern Yarn (
yarn@4.9.1) is configured for workspace lock files. Do not run standardnpmorpnpmcommands as it will alter the workspace configuration. - Infisical CLI (Recommended): Secrets management tool. If configured, you can log in to inject secrets automatically:
infisical login
Clone the repository and run yarn to link internal workspaces and download npm dependencies:
git clone https://github.com/BuildTheEarth/web.git
cd web
yarn installIf you are not utilizing the Infisical Secrets CLI, copy the mock template environment settings across the applications:
yarn env:copyEnsure you inspect the generated .env configurations inside:
apps/api/.envapps/frontend/.envpackages/db/.env
Build the database client locally from the schema:
yarn db:generateYou can also spin up the interactive Prisma Database viewer:
yarn db:studioStart the development server. Turborepo runs the servers in parallel:
yarn dev- Frontend:
http://localhost:3000 - Dashboard:
http://localhost:3001 - API Backend:
http://localhost:8080
Each app is versioned independently. We use helper TS scripts to run clean check verification, bump versions in package manifests, create Git tagging, and push changes.
# Syntax: yarn app:info <app-name>
yarn app:info frontend# Syntax: yarn app:release <app-name> <patch|minor|major|x.y.z> [--push]
yarn app:release dashboard patch --pushThe --push flag will automatically push the commit and tag to the remote origin server.
- Selective Builds: When changes are pushed to
main, workflows utilizeturbo-ignore(npx turbo-ignore <app-name>) to build only the services that have changed code. - Container Registry: Builds are packaged in the context of the monorepo root (enabling local copy tasks of
@repo/dband configuration workspaces) and pushed to the GitHub Container Registry (GHCR):- Frontend:
ghcr.io/buildtheearth/website-frontend:latest - API:
ghcr.io/buildtheearth/website-node-backend:latest - Dashboard:
ghcr.io/buildtheearth/website-dashboard:latest - Worker:
ghcr.io/buildtheearth/website-worker:latest
- Frontend: