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.
The system combines:
- space-photo analysis
- address verification and nearby-place observation
- structured lease and operating inputs
- discounted cash flow analysis
- scenario stress testing
- candidate site comparison
FrontMatter is designed as a decision-support product, not a “guaranteed success” predictor.
sudo docker compose up -d --buildhttp://127.0.0.1:8080
- Username:
demo - Password:
FrontMatterDemo2026!
- login
- image upload
- Singapore address search
- Singapore-only geolocation validation
- score and risk output
- discounted cash flow panel
- what-if simulation
- candidate site comparison
FrontMatter turns Singapore shop leases into structured go / no-go business decisions.
In Singapore, renting the wrong commercial space is expensive.
For small operators, especially in F&B, the decision is difficult because:
- rent is high
- fit-out and reinstatement costs are significant
- compliance constraints are real
- site visits produce fragmented information
- lease decisions are still often made with spreadsheets, broker conversations, and intuition
Today, the due diligence workflow is usually manual and scattered:
- inspect the unit
- ask about rent and lease terms
- check whether the space is suitable for the intended use
- estimate traffic, spend, and costs
- make a judgment call
FrontMatter restructures that workflow into a traceable product.
FrontMatter accepts three categories of input:
- visual input: a space photo or floorplan
- commercial input: rent, size, lease term, fit-out budget, and operating assumptions
- location input: either current on-site coordinates or a searched address
It then returns a structured assessment across three layers:
The system generates a spatial blueprint and visual observations to surface:
- circulation and layout issues
- visibility opportunities
- inefficient or constrained zones
- operational friction signals
This is not CAD-grade surveying. It is a due diligence aid for early-stage lease screening.
The system verifies the selected site and shows nearby same-category businesses using Google Places.
It is designed specifically for Singapore:
- address suggestions are restricted to Singapore
- current-location mode rejects coordinates outside Singapore
- market evidence is framed around Singapore public data
Nearby businesses are treated as market observations, not as proof of demand.
FrontMatter does not stop at a simple monthly profit estimate.
It produces a discounted lease economics view, including:
- NPV
- IRR
- discounted payback
- break-even daily customers
- scenario comparison
Stress testing is built in so users can see what happens under weaker demand or tighter economics.
- deployable Docker stack
- end-to-end intake flow
- spatial blueprint output
- Singapore-only location support
- Google Places-backed location search
- traceable score output
- discounted cash flow and scenario analysis
- candidate site comparison
- anonymous calibration workflow
- property-specific rental comparables
- enterprise-grade authentication
- large-scale real-world calibration dataset
- non-Singapore market support
| Capability | Status | Notes |
|---|---|---|
| Photo upload | Complete | PNG, JPG, WEBP |
| Spatial blueprint | Complete | Due diligence aid, not CAD |
| Singapore-only address search | Complete | Restricted to Singapore |
| Non-Singapore geolocation rejection | Complete | Unsupported region blocked |
| Nearby-place map observations | Complete | Observation signal only |
| Structured lease input form | Complete | Includes advanced assumptions |
| F&B readiness capture | Complete | Singapore-oriented operational inputs |
| Traceable scoring | Complete | Rule-based final score |
| Discounted cash flow engine | Complete | NPV, IRR, payback |
| Scenario stress testing | Complete | Baseline, downside, severe downside |
| Candidate comparison | Complete | Up to 3 user-selected sites |
| Anonymous calibration export/import | Complete | Local workflow |
| Auto-generated alternative sites | Not implemented | Intentionally disabled |
| Site-specific rental comparables | Partial | Context only |
| Production-grade auth | Partial | Demo gate only |
- Upload
PNG,JPG, orWEBP - Analyze storefront or interior space 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
This helps the product reflect the operational reality of Singapore F&B site selection.
FrontMatter produces a structured score and supporting flags:
0–100score- score breakdown
- risk flags
- confidence level
- verdict
The numeric score is rule-based and traceable.
The LLM supports interpretation and structured extraction, but does not directly invent the final score.
The financial engine supports:
- baseline case
- downside case
- severe downside case
This allows the user to move from “Can this shop work?” to “How fragile is the lease under weaker conditions?”
Users can compare up to three real candidate sites they selected themselves.
The system does not invent alternative addresses.
It compares user-provided candidates under the same commercial assumptions.
The workspace includes interactive controls for:
- traffic
- spend
- rent
This lets the user see how lease viability changes in real time.
The system also includes a local outcome-recording flow:
- record actual operating outcome
- export anonymous JSON
- import anonymous JSON
- review sample count and basic error signals
This is intended to support future model calibration without exporting images or raw address text.
Generic AI can describe a photo.
FrontMatter is different because it encodes a decision workflow:
- visual site review
- location verification
- lease screening
- F&B readiness capture
- market observations
- discounted cash flow
- scenario testing
- candidate comparison
The value is not “AI says this shop looks good.”
The value is turning fragmented lease information into a structured business judgment process.
FrontMatter is currently best described as:
a commercial lease screening and due diligence support system
It is not a replacement for:
- a broker
- legal advice
- fire / mechanical / utilities consultants
- landlord negotiation
- a full valuation report
It does not guarantee:
- profitability
- actual turnover
- actual market rent
- final licensing approval
That boundary is intentional. It keeps the product credible.
- Next.js
- React
- TypeScript
- Tailwind CSS
- Leaflet
- FastAPI
- SQLAlchemy
- AsyncPG
- Alembic
- Redis
- Docker Compose
- PostgreSQL + pgvector
- Redis
- Nginx
This repository is currently configured around:
- LLM provider: GLM
- Base URL:
https://open.bigmodel.cn/api/paas/v4 - Model:
glm-4.1v-thinking-flash
The model is used for:
- visual understanding
- structured extraction
- advisory language
The model is not the direct source of the final financial score.
Required:
FRONTMATTER_LLM_API_KEY
Required:
FRONTMATTER_GOOGLE_PLACES_API_KEY
Official links:
- https://developers.google.com/maps/documentation/places/web-service/get-api-key
- https://console.cloud.google.com/google/maps-apis/credentials
Google Places is used for:
- address autocomplete
- address resolution
- nearby-place observations
The project is designed to run locally with Docker.
Default local entrypoint:
http://127.0.0.1:8080
sudo docker compose up -d --buildsudo docker compose -f docker-compose.portable.yml up -d --buildAt minimum:
FRONTMATTER_LLM_API_KEY=
FRONTMATTER_LLM_BASE_URL=https://open.bigmodel.cn/api/paas/v4
FRONTMATTER_LLM_MODEL=glm-4.1v-thinking-flash
FRONTMATTER_GOOGLE_PLACES_API_KEY=
FRONTMATTER_GOOGLE_PLACES_SEARCH_RADIUS_METERS=500
FRONTMATTER_DEMO_AUTH_ENABLED=true
FRONTMATTER_DEMO_AUTH_USERNAME=demo
FRONTMATTER_DEMO_AUTH_PASSWORD=FrontMatterDemo2026!
FRONTMATTER_DEMO_AUTH_SECRET=replace-with-a-random-secret
PUBLIC_HTTP_PORT=8080
If Docker image builds require a proxy:
DOCKER_BUILD_HTTP_PROXY=
DOCKER_BUILD_HTTPS_PROXY=
DOCKER_BUILD_NO_PROXY=
DOCKER_RUNTIME_HTTP_PROXY=
DOCKER_RUNTIME_HTTPS_PROXY=
DOCKER_RUNTIME_NO_PROXY=
Important:
- leave
DOCKER_BUILD_*empty unless needed - do not use
127.0.0.1for build-stage proxies unless the proxy runs inside the build container - if a host proxy is required, use a Docker-reachable address such as
host.docker.internal
The current repository includes a lightweight shared-password demo gate for public testing.
It is suitable for:
- demos
- small-scale evaluation
- competition review
It is not a production-grade multi-user authentication system.
POST /api/auth/loginPOST /api/auth/logoutGET /api/auth/session
POST /api/locations/autocompletePOST /api/locations/resolve
POST /api/v1/analyze
GET /api/v1/reports/{id}
POST /api/v1/calibration/outcomesGET /api/v1/calibration/exportPOST /api/v1/calibration/importGET /api/v1/calibration/summary
For a fair evaluation, the committee should assess the product on three dimensions:
Does the product meaningfully improve how a founder screens a commercial lease?
Does the product make the reasoning behind a lease decision more transparent and auditable?
Does the combination of visual review, location context, and lease economics reflect a real Singapore small-business problem?
This repository is a working product prototype, not a fully productionized commercial platform.
Current limitations include:
- market benchmarks are contextual, not property-specific rental comparables
- profitability is modeled under assumptions, not guaranteed
- location observations are not direct demand measurement
- calibration infrastructure exists, but large-scale real-world outcome data is not yet built out
- the product is intentionally restricted to Singapore use cases
FrontMatter is an AI-native lease due diligence system built around a real operational pain point:
small businesses must make expensive commercial lease decisions with incomplete structure and weak analytical support.
This project demonstrates a practical product answer:
- structured intake
- visual analysis
- Singapore-specific location handling
- lease economics
- stress testing
- traceable decision support
It is designed to help a founder answer a simple but expensive question before signing:
Can this space become a sustainable business?