Skip to Content
Getting StartedFirst Launch

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 install

The 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:dev

This 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:dev

What 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.

StepScriptPurpose
generate:tsconfigscripts/generate-tsconfig.jsResolves tenant-first aliases used by the build.
generate:featuresscripts/fetch-features.tsSynchronizes static flags when configured; otherwise uses existing files.
generate:rewritesscripts/generate-rewrites.tsBuilds the generated rewrite/redirect maps.
generate:deployment-idscripts/generate-deployment-id.jsStamps 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

VariablePurpose
NEXT_PUBLIC_APP_CONFIGURATIONActive tenant; must match the configs/<tenant>/ folder name.
NEXT_PUBLIC_API_URLProxy backend base URL.
NEXT_PUBLIC_MAPBOX_KEYMapbox GL token (map rendering).

Common optional

VariablePurpose
NEXT_PUBLIC_GMAPS_KEYGoogle 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_KEYGoogle Analytics / gtag id.
NEXT_PUBLIC_GROWTHBOOK_*Build-time feature-flag sync (INIT, API_HOST, CLIENT_KEY). Not read at runtime.
GOOGLE_PLACES_API_KEYServer-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_HTTPLocal 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_URL and that the proxy is up).

Troubleshooting

SymptomLikely cause & fix
Map area is blank/greyMissing/invalid NEXT_PUBLIC_MAPBOX_KEY.
No search resultsProxy backend not reachable at NEXT_PUBLIC_API_URL, or wrong board for the tenant.
Type errorspnpm frontend:type-check.

Command reference

CommandDescription
pnpm frontend:devDev server.
pnpm frontend:buildProduction build.
pnpm frontend:startServe a production build.
pnpm frontend:type-checkTypeScript check.
pnpm frontend:eslintLint.
pnpm frontend:testUnit tests.

Next

Head to Configuration to learn which config files to change, and how the override system resolves them.

Last updated on