FrontMatter is a Singapore-focused commercial lease due diligence system for small businesses.
It helps founders evaluate whether a retail or F&B space is operationally suitable, commercially credible, and financially viable before they sign a lease.
FrontMatter combines:
- space-photo analysis
- Singapore-only address validation and nearby-place observation
- structured lease and operating inputs
- discounted cash flow analysis
- scenario stress testing
- candidate site comparison
FrontMatter is a decision-support product, not a guaranteed success predictor.
FrontMatter turns Singapore shop leases into structured go / no-go business decisions.
frontend/— Next.js web applicationbackend/— FastAPI API, scoring engine, economics engine, testsscripts/— local start, stop, and restart bash scriptsdocs/— competition-facing supporting documentsFrontMatter.md— product and technical specification
This repository no longer depends on Docker.
FrontMatter now runs as a standard local development stack:
- frontend: Next.js dev server
- backend: FastAPI + Uvicorn
- database: local PostgreSQL
- cache/session store: local Redis
Install these manually on your machine:
- Python
3.11 - Node.js
20 - PostgreSQL
16+ - Redis
7+
Recommended Ubuntu packages:
sudo apt update
sudo apt install -y python3.11 python3.11-venv python3-pip nodejs npm postgresql redis-serverIf you use nvm, install Node.js 20 explicitly:
nvm install 20
nvm use 20You need:
- a GLM API key
- a Google Places API key
Google Places API application link:
https://developers.google.com/maps/documentation/places/web-service/get-api-key
Before starting FrontMatter, make sure PostgreSQL and Redis are running.
Example on Ubuntu:
sudo systemctl enable --now postgresql
sudo systemctl enable --now redis-serverCreate a local PostgreSQL database named frontmatter.
Example:
sudo -u postgres psql
CREATE DATABASE frontmatter;
\qIf your local PostgreSQL username or password is different, update .env accordingly.
cp .env.example .envThen edit .env and set:
FRONTMATTER_DATABASE_URLFRONTMATTER_REDIS_URLFRONTMATTER_LLM_API_KEYFRONTMATTER_GOOGLE_PLACES_API_KEYFRONTMATTER_DEMO_AUTH_PASSWORDFRONTMATTER_DEMO_AUTH_SECRET
make install-backendThis creates backend/.venv and installs the Python dependencies from backend/pyproject.toml.
make install-frontendThis installs the Node.js dependencies from frontend/package.json.
The repository includes bash scripts for local lifecycle management.
bash scripts/start.shor:
make startbash scripts/stop.shor:
make stopbash scripts/restart.shor:
make restartDefault local endpoints:
- frontend:
http://127.0.0.1:3000 - backend:
http://127.0.0.1:8000
If demo auth is enabled in .env:
- Username:
demo - Password: value of
FRONTMATTER_DEMO_AUTH_PASSWORD
The start script writes runtime files to:
.run/
Important files:
.run/backend.pid.run/frontend.pid.run/logs/backend.log.run/logs/frontend.log
To follow both logs:
make logsRun migrations manually:
make migrateCreate a new Alembic migration:
make migrate-new msg="describe-change"Backend only:
make dev-backendFrontend only:
make dev-frontendRun lint:
make lintRun tests:
make test- upload
PNG,JPG, orWEBP - analyze storefront or interior visuals
- generate a structured spatial blueprint
At site now: uses device geolocationSearch address: resolves a Singapore address through Google Places- non-Singapore geolocation is explicitly rejected
The intake flow captures:
- monthly rent
- shop size
- lease term
- service charge
- fit-out budget
- rent-free period
- deposit months
- utilities
- staffing
- marketing
- insurance
- licence fees
- reinstatement cost
- rent escalation
- revenue growth
- turnover rent
- opening ramp months
- discount rate
- daily customers
- average spend
- gross margin
For restaurant and food-service use cases, the form also captures:
- cooking intensity
- approved use status
- water readiness
- electrical readiness
- gas
- floor trap
- grease trap
- exhaust
- wastewater
- loading access
- signage
- final numeric scoring is rule-based
- LLM output does not directly set the final score
- financial assumptions are visible and inspectable
FrontMatter outputs:
- NPV
- IRR
- discounted payback
- break-even daily customers
- baseline / downside / severe downside scenarios
- compare up to 3 user-selected sites
- keep business assumptions constant while comparing locations
| Capability | Status | Notes |
|---|---|---|
| Shared demo login | Complete | Lightweight public-test gate |
| Image upload | Complete | PNG, JPG, WEBP |
| Spatial blueprint generation | Complete | Due diligence aid, not CAD measurement |
| Singapore-only address autocomplete | Complete | Google Places restricted to Singapore |
| Non-Singapore geolocation rejection | Complete | Unsupported region blocked |
| Nearby-place map observations | Complete | Observation signal only |
| Structured lease input form | Complete | Rent, size, lease term, fit-out, operating assumptions |
| F&B readiness capture | Complete | Water, power, gas, exhaust, grease trap, etc. |
| Rule-based traceable scoring | Complete | LLM does not directly set the final score |
| Discounted cash flow engine | Complete | NPV, IRR, discounted payback, break-even customers |
| Scenario stress testing | Complete | Baseline, downside, severe downside |
| Interactive what-if simulation | Complete | Traffic, spend, rent controls in workspace |
| Candidate site comparison | Complete | Up to 3 user-selected sites |
| Anonymous outcome export/import | Complete | Local calibration workflow |
| Public market evidence panel | Complete | Contextual benchmark display |
| Auto-generated alternative locations | Not implemented | Intentionally disabled |
| Site-specific rental comparables | Partial | Public context only |
| Production-grade multi-user auth | Partial | Demo password only |
- this is a due diligence aid, not a legal, valuation, or surveying tool
- market context is public-data-based, not property-specific rent intelligence
- outcomes depend on user assumptions
- authentication is demo-grade, not enterprise-grade