Developer Tools
Software City — source code as a 3D city, with its bugs
A browser app that surveys a source-code folder and draws it as a 3D blueprint city: folders are districts, files are buildings, functions are floors (height = length, colour = complexity), classes are dashed frames, and calls, data flow and imports run between them as pipes and arcs. Nineteen code-smell detectors mark the floors where problems live, and a CSV export with a companion prompt lets a coding AI triage them. It ships with a 98-pattern design library with real-code demos, four diagram types, and 13 famous open-source codebases surveyed as "codescapes" on softwarecity.eu. Everything runs client-side; the code never leaves the machine.
JavaScript (ES modules) three.js WebGL dagre Node.js test runner ESLint Astro (website) Godot (Patrol game) WebXR (planned)
Key Features
- Survey without a compiler: a regex-and-structure parser for ~30 languages that extracts files, functions, classes, calls and data flow in the browser
- City mapping: folders → nested district plates, files → buildings, functions → floors (height = length, colour = cyclomatic complexity), classes → dashed frames, variables → antennas
- Connections drawn in 3D: imports as amber arcs with travelling packets, calls as pipes between floors, data flow in amber and mint, recursion as a yellow loop
- 19 detectors (long function, deep nesting, high complexity, god object, circular dependency, swallowed exception, magic number, risky dependency and more), each marker placed beside its floor and coloured by severity
- One-click CSV export of every finding with location, reasoning, code excerpt and empty verdict columns, plus a companion prompt for a coding AI to label real_bug / real_smell / false_positive
- Pattern library: 98 design patterns in 12 families with lessons, quizzes and real-code demos played back as step-by-step walkthroughs inside a small city
- Class, module, sequence and data-flow diagrams (dagre layout); axonometric, plan and elevation views, section slider, layers and legend
- Fully client-side and offline; npm run build writes a self-contained dist/ for any static host
Challenges Overcome
- Parsing ~30 languages fast enough for a 1,800-file framework in seconds, without a compiler or language server, and still getting functions, classes and calls right
- Keeping a city of tens of thousands of floors readable and smooth in WebGL: layout, level of detail, labels and arcs that inform instead of clutter
- Detectors that are useful rather than noisy, and an honest workflow for the false positives: export, let an AI triage, feed the reviews back into fewer false alarms
- A licence model that keeps the core free for people and schools while funding development: PolyForm Noncommercial plus a commercial licence
Results & Impact
13 famous web projects surveyed as codescapes on softwarecity.eu: 5,932 files, 1,210,218 lines and 41,747 functions, each in the browser in 0.1–4.2 seconds (Laravel: 1,862 files in 4.2 s)
Web app live at softwarecity.eu/app with the full city, bug list, diagrams and pattern library; source on GitHub
Free for personal and educational use (PolyForm Noncommercial 1.0.0); commercial licence for companies, clients and products
Same core powers Software City: Patrol (Steam Early Access, coming) and Software City Edu; WebXR flight through the city is next on the roadmap