Skip to content
05Bilingual lease cost simulator

Tokyo Move-in Cost Calculator

Japanese leases front-load four and a half to six months of rent before you get the keys, spread across fees that are never quoted together.

Wards mapped
23
Map payload
~28 KB
Upstream hits
1 / day
Languages
EN / 日本語

Context

Deposit (敷金), key money (礼金), agency fee (仲介手数料), guarantor company (保証会社), fire insurance, lock exchange and rent paid in advance — the calculator models the full 初期費用 stack with the rules that actually govern it, including the legal cap on agency fees plus consumption tax, prorated 日割り rent, and guarantor rates.

It is written for people moving to Japan from abroad, so it is bilingual by construction rather than by translation pass.

How it works

01Every line item explains itself

Each fee says what it is, whether the money ever comes back, and how negotiable it is — plus a 'negotiated well' scenario showing what the same lease costs if you push on the items that move. The point is not the total; it is understanding which parts of the total are actually fixed.

02A ward map with no map library

The 23-ward choropleth is built from government boundary data, simplified at build time from GeoJSON into roughly 28 KB of precomputed SVG paths. That replaced shipping a mapping library and a GeoJSON payload to the client entirely. Clicking a ward loads its market average into the calculator, with notes on the ward's character and train access.

03A pipeline that heals itself

Studio averages are fetched once a day from SUUMO's public market-rate page — Japan's largest listing site — and cross-checked against LIFULL HOME'S, falling back to a calibrated baseline dataset when a source is unavailable. Next's daily ISR revalidation means upstream sites are hit at most once per day no matter how much traffic arrives, and the raw data is exposed at /api/rates rather than hidden inside the app.

04Bilingual all the way down

Every UI string, fee explanation, negotiation tip and ward guide is written natively in English and Japanese. The choice persists and auto-detects Japanese browsers. 23 statically generated ward guide pages carry rent tables, rankings and example breakdowns, refreshed daily by the same pipeline.

Architecture

Calculator
The fee stack, its rules and negotiation scenarios.
Ward map
Build-time GeoJSON → ~28 KB of SVG paths.
Rates pipeline
Two sources, cross-validated, daily ISR.
/wards/[ward]
23 statically generated guide pages.
/api/rates
The underlying data, exposed rather than hidden.

Decisions

The choices worth defending, and what they cost.

Precompute the map at build time

A choropleth of 23 fixed polygons does not need a runtime mapping library. Simplifying to SVG paths at build removed the dependency and the payload in one move.

Cross-validate two sources with a calibrated fallback

Scraped market rates are the least trustworthy input in the system. Two independent sources plus a known-good baseline means a bad scrape degrades the numbers instead of breaking the page.

Daily ISR rather than per-request fetching

The data changes daily at most, and being a polite consumer of someone else's public page is part of the design.

Verification

The rates pipeline validates each source against the other and against a calibrated baseline before anything is served, so the failure mode is a stale-but-correct number rather than a wrong one.

  • TypeScript
  • Next.js
  • Tailwind CSS
  • ISR
  • i18n
  • GeoJSON

Next case study

ChordLab

Client-side music analysis