First Launch
Track A. Get the frontend running locally and connect it to data.
Prerequisites
Node.js 24.x or 26.x, pnpm 12.6 (pinned in package.json → packageManager), and Git. See
the Overview for the full list.
Run it
Clone and install
git clone https://github.com/Repliers-io/portal-frontend.git
cd portal-frontend
pnpm installThe monorepo lives in a single repository; the checked-out folder is the same one referenced throughout these docs.
Start the default build
# from the repo root
pnpm frontend:devThis runs the frontend dev script, which first runs prebuild (see
What prebuild does) and then next dev. It uses the local
.env file (gitignored), whose tenant is defaults.
Open http://localhost:3000 .
The proxy backend
The frontend is a client of a proxy backend, never of the Repliers MLS API directly.
All listing, search, location, favorite, and estimate calls go to NEXT_PUBLIC_API_URL,
which the proxy forwards to Repliers.
The README’s .env sets NEXT_PUBLIC_API_URL=http://localhost:8080. With no
backend on port 8080, the app renders but search and listings stay empty or
error. To see data you must either run a proxy backend locally on :8080, or
set NEXT_PUBLIC_API_URL to a hosted proxy you have access to.
# point the app at a hosted proxy instead of localhost:8080
NEXT_PUBLIC_API_URL=https://<your-proxy-host> pnpm frontend:devWhat prebuild does
pnpm frontend:dev explicitly runs these steps in order (portal-frontend/package.json, prebuild). The monorepo and exported production build paths differ; see Multi-tenant System.
| Step | Script | Purpose |
|---|---|---|
generate:tsconfig | scripts/generate-tsconfig.js | Resolves tenant-first aliases used by the build. |
generate:features | scripts/fetch-features.ts | Synchronizes static flags when configured; otherwise uses existing files. |
generate:rewrites | scripts/generate-rewrites.ts | Builds the generated rewrite/redirect maps. |
generate:deployment-id | scripts/generate-deployment-id.js | Stamps a build id. |
Environment variables
Values live in packages/portal-frontend/.env. Only the names are shown here — never copy
secret values into docs or commits.
Required
| Variable | Purpose |
|---|---|
NEXT_PUBLIC_APP_CONFIGURATION | Active tenant; must match the configs/<tenant>/ folder name. |
NEXT_PUBLIC_API_URL | Proxy backend base URL. |
NEXT_PUBLIC_MAPBOX_KEY | Mapbox GL token (map rendering). |
Common optional
| Variable | Purpose |
|---|---|
NEXT_PUBLIC_GMAPS_KEY | Google Maps key: Street View images on listing and home estimate pages and the satellite map preview on listing pages (Street View Static, Maps Static and Geocoding APIs). |
NEXT_PUBLIC_GTAG_KEY | Google Analytics / gtag id. |
NEXT_PUBLIC_GROWTHBOOK_* | Build-time feature-flag sync (INIT, API_HOST, CLIENT_KEY). Not read at runtime. |
GOOGLE_PLACES_API_KEY | Server-side Places lookups (never exposed to the client). |
CMS_PAGES_CLIENT, CMS_BLOG_CLIENT, WORDPRESS_API_*, GHOST_API_* | CMS wiring for tenants that use blog/pages. |
DISABLE_SSG, FORCE_HTTP | Local dev toggles. |
See Regional & MLS Limits for the tenant-specific integration variables (neighborhood/enrichment data, boundary data, AI agent iframe, …).
Verify
- Page loads at
http://localhost:3000. - Header logo and brand colors match the tenant.
- The map renders tiles (if not, check
NEXT_PUBLIC_MAPBOX_KEY). - Search returns results (if empty, check
NEXT_PUBLIC_API_URLand that the proxy is up).
Troubleshooting
| Symptom | Likely cause & fix |
|---|---|
| Map area is blank/grey | Missing/invalid NEXT_PUBLIC_MAPBOX_KEY. |
| No search results | Proxy backend not reachable at NEXT_PUBLIC_API_URL, or wrong board for the tenant. |
| Type errors | pnpm frontend:type-check. |
Command reference
| Command | Description |
|---|---|
pnpm frontend:dev | Dev server. |
pnpm frontend:build | Production build. |
pnpm frontend:start | Serve a production build. |
pnpm frontend:type-check | TypeScript check. |
pnpm frontend:eslint | Lint. |
pnpm frontend:test | Unit tests. |
Next
Head to Configuration to learn which config files to change, and how the override system resolves them.