Install prerequisites
Before cloning the repo, make sure you have the following installed:
| Tool | Required version | Notes |
|---|---|---|
| Node.js | 22 | Check with node -v. Use nvm to switch versions. |
| Yarn | any | brew install yarn on macOS |
| PostgreSQL | 15 | brew install postgresql@15, then brew services start postgresql@15 |
If you see
env: node: No such file or directory after installing Node, check the installer output for instructions on adding Node to your shell’s PATH.Clone and install dependencies
Clone the repository, then install dependencies from two locations — the workspace root and the The root
api directory:yarn install installs dependencies for sites/public, sites/partners, and shared-helpers via Yarn workspaces. The api directory manages its own separate dependency tree.Set up environment variables
Each of the three packages needs its own Key variables to review in each file:
.env file copied from the provided template:api/.envsites/public/.envsites/partners/.envSome variables — such as
APP_SECRET, EMAIL_API_KEY, CLOUDINARY_SECRET, and TWILIO_AUTH_TOKEN — are secret keys that are not committed to the repository. These are available internally via the team’s password manager. Request access from the Bloom team if you need them for a non-default local workflow.Set up the database
From within the This single command:
api directory, run:- Generates the Prisma client from
schema.prisma - Runs all pending database migrations against
bloom_prisma - Seeds the database with jurisdiction and listing data that mirrors the core Bloom environments
psql: error: FATAL: database "<username>" does not exist, run createdb <username> first, then update the DATABASE_URL in api/.env to include your system username.Start all services
From the repository root, run:This uses
The public and partners apps use
concurrently to start all three processes in a single terminal:| Process | Command internally | Port |
|---|---|---|
| Backend API | cd api && yarn dev | 3100 |
| Public portal | cd sites/public && yarn dev | 3000 |
| Partners portal | cd sites/partners && yarn dev | 3001 |
wait-on to wait for the API (http://127.0.0.1:3100) to be ready before starting.Access the running services
Once all three processes are up:
Public portal
http://localhost:3000Browse listings and submit applications.Partners portal
http://localhost:3001Manage listings, applications, and lotteries.API + Swagger docs
http://localhost:3100/apiInteractive OpenAPI documentation auto-generated by the server.Log in with default credentials
The seed data includes a default admin user for local development:
This account works on both the Public and Partners portals. Additional seeded users with different permission levels can be found in the
| Field | Value |
|---|---|
admin@example.com | |
| Password | abcdef |
seed-staging.ts file.Running with Docker
The repository also ships adocker-compose.yml that wires together all services — PostgreSQL, the API, both frontend apps, and an nginx load balancer — on the same ports (3000, 3001, 3100). See docker.md in the repository root for full Docker setup instructions.