Configuration
portal.config.ts is your portal. One committed file, forty lines, no tenant registry to resolve against.
Most portal software makes you model "many portals" even when you have one. Frontstead Kit does the opposite. Each deployment of the kit is one portal, and a single committed TypeScript file describes it.
The file says so itself:
// This is YOUR portal's configuration. Each deployment of this toolkit is// one portal — fork this repo and edit these values for your own brand,// domain, MLS board, and listing policy. There is no registry of many// portals to resolve between; this file IS your portal.The whole file
This is what you get when you clone, unedited:
export const portalConfig: PortalConfig = { slug: 'abc-realty', name: 'ABC Realty', domains: ['abc-realty.localhost', 'localhost'], theme: { preset: 'default', primary: '#171717', }, listings: { mode: 'hidden', boardIds: [], collectionSlugs: [], }, features: { search: true, map: false, inquiryForm: true, savedSearch: false, }, compliance: { idxApproved: false, brokerageName: 'ABC Realty', brokeragePhone: '(704) 555-0100', publicListingDisplay: 'hidden', }, classification: { version: '1', providerAttributeMappings: {}, definitions: [], advancedClassifiers: {}, initialAreas: [], initialCollections: [], },};Fork the repo, edit these values, and you have your portal.
Identity
slug, name, and domains are what the portal calls itself and where it answers. Add your production hostname to domains; keep localhost for development.
This file is the only place the slug is set. The API compiles it in, the portal asks the API for it, and the first deploy creates the portal from it — see Going live.
Listings and compliance start closed
Note the shipped defaults:
listings: { mode: 'hidden', boardIds: [], collectionSlugs: [] },compliance: { idxApproved: false, publicListingDisplay: 'hidden' },A fresh clone shows no listings publicly. That is deliberate, not an oversight — publishing MLS data before your board has approved your display is a licensing violation, so the kit will not do it by accident. boardIds stays empty until you have a board; see MLS board setup and Display compliance.
brokerageName and brokeragePhone feed required attribution. The shipped phone number is a placeholder — replace it.
Features
features toggles portal capabilities: search, map, inquiryForm, savedSearch. These are portal-level switches, not per-user entitlements.
Classification
classification is where the areas / property-classification / collection engine is configured — the part that lets a portal be about golf-front homes in three specific communities rather than "all listings in a metro."
@frontstead/portal-config owns the validated classification definitions and the collection predicate AST. Provider field mappings normalize MLS data onto Property.normalizedAttributes; tag decisions and geographic memberships persist against Property with evidence, confidence, classifier version, config hash, positive/negative decisions, and manual-override protection.
Collection membership is determined in PostgreSQL. Search results may come from Typesense, but whether a property is active, allowed to show on IDX, in the correct MLS board, enabled for the portal, or excluded from a collection is always enforced in PostgreSQL. EXCLUDE takes precedence over predicates and INCLUDE; INCLUDE applies only to the predicate.
Reclassifying after a config change
There is no automatic full-reclassification scheduler. MLS ingestion classifies each new or changed property as it arrives. When you change classification config, run explicit resumable keyset jobs:
npm run classify --workspace=db -- check <accountId>npm run classify --workspace=db -- diff <accountId>npm run classify --workspace=db -- apply <accountId>npm run classify --workspace=db -- apply <accountId> --cursor=<propertyId>Each command creates a ClassificationRun recording mode, status, version, config hash, cursor, counts, and errors. apply never overwrites rows marked manualOverride.
Environment lives elsewhere
portal.config.ts is policy, not secrets. Credentials and per-service settings are environment variables, and the two backend services have separate environments:
- Portal —
NEXT_PUBLIC_API_URLpoints at the API; the local fallback ishttp://localhost:3001. - API —
DATABASE_URL,JWT_SECRET, and portal origin settings.FRONTEND_URLidentifies the portal origin. - MLS worker — its own service environment, sharing only the database and intentionally matching MLS board identifiers with the API.
That last point catches people out; see MLS board setup, where the same board identity genuinely has to be set in two places.
Next
Theming — brand colour is two hex values and a compiler.