Inspiration
Cities argue about parking without ever seeing the alternative. "What if a third of our parking became green space?" is easy to say and hard to picture, and the trade-off (fewer spaces) is rarely shown next to the benefit (trees, shade, public space). We wanted to make that question something you can drag a slider on and see.
What it does
Parallel is an interactive what-if simulator for a fictional neighborhood with three surface parking lots (144 spaces).
- Drag a slider from 0–100% to convert parking into planted green space, trees and canopy.
- A parking-pressure model shows the trade-off. We assume 104 cars need a space, so the neighborhood fits that demand up to 28% conversion. At 29% the first cars are left without a space, and the app flags it.
- Before / After / Compare views, with a draggable divider that shows both versions through the same camera and lighting. The guided reveal plays the transformation for you.
- At 40%: 58 stalls become green strips, about 507 m² of green space and 16 new trees (320 m² of mature canopy). 86 spaces remain, so 18 of the assumed cars have none.
- Every scenario is a shareable link, and the whole app works on desktop and mobile.
Everything is illustrative. The numbers come from stated assumptions, not real city data, and the app says so.
How we built it
- Engine: a deterministic TypeScript simulation. The same slider value always gives the same result, so share links reproduce exactly. All assumptions (stall area, plantable share, trees per area, canopy size, demand) live in one config file.
- 3D: React Three Fiber on three.js, with instanced meshes for the stalls, cars and trees, so the scene stays light.
- Compare mode: one scene rendered twice with the same camera, each pass clipped at the divider. The divider is a real ARIA slider, so it works with a keyboard too.
- App: Next.js 15 (App Router), React 19, Tailwind CSS 4, Zustand for state, deployed on Vercel.
- Quality: 83 unit tests (Vitest) cover the simulation, URL parsing, camera framing and compare logic. ESLint, TypeScript and
npm auditare clean.
Challenges we ran into
- Making Compare honest: both halves must show the same camera, lighting and traffic, and differ only in parking and trees. We checked that the halves match the single-view renders pixel for pixel.
- Keeping rendering cheap. Instancing keeps the scene around 40 draw calls, and about 84 in Compare.
- Making the sliders, URLs and playback behave together: shareable state, a divider that clamps at the edges, and a reveal that respects reduced-motion settings.
- Keeping claims honest. We built in a clear "illustrative, no real city data" framing and put the assumptions in the app instead of presenting made-up numbers as predictions.
Accomplishments that we're proud of
- A trade-off you can see, not just a chart: the green gain and the parking loss move together as you drag.
- A guided reveal that gets a first-time viewer to the point in about 90 seconds.
- A deterministic, tested engine behind a fast, shareable 3D experience.
What we learned
- Showing a trade-off beats showing a benefit alone.
- A deterministic model makes sharing, testing and debugging far easier.
- Small rendering choices (instancing, layers, scissored passes) matter more than raw detail for keeping a 3D web app smooth.
What's next for Parallel — Rewrite Your City
- Load a real neighborhood (real parking counts and building footprints) while keeping the clear separation between data and assumptions.
- Add more kinds of change besides green space (bike lanes, housing, transit) and compare them side by side.
- Add an adjustable demand and canopy assumption panel so users can test their own beliefs.
- Add narrated guided tours for planners and community meetings.
Try it: https://parallel-what-if-simulator.vercel.app/ Code: https://github.com/saisanthoshs2006-cmd/parallel-what-if-simulator
Built With
- claude-code
- github
- next.js
- openai-codex
- react
- react-three-fiber
- tailwind-css
- three.js
- typescript
- vercel
- vitest
- zustand