· 7 min read · Product Launch

Software City: I turned code into a 3D city, and the bugs crawl out

My new open-source project turns any codebase into a 3D blueprint city: folders are districts, files are buildings, functions are floors, and 19 detectors show where the bugs live. It runs in your browser, and your code never leaves your machine.

admin
admin Senior Fullstack Developer
Software City: I turned code into a 3D city, and the bugs crawl out

About fifteen years ago I was working at an architects' office in Rhodes, building an app that was pioneering for its time. Every day I was surrounded by drawings, plans, sections and elevations, and I was learning so much about architecture, civil engineering and how a building really stands. Somewhere between the drafting tables a thought stuck with me: how awesome would it be to see code the same way? To see the functions as buildings, the flows between them as streets and pipes, and finally understand a program the way an architect understands a city.

Back then it stayed a dream. One person couldn't build something like that on the side.

Fifteen years later, with my beloved AI tools next to me, I finally could. And I want to share it freely, so that anyone out there can get a totally new and unique perspective on their own code, or on any code.

So here it is: Software City. Open a folder of source code and it becomes a 3D blueprint city. Folders become districts, files become buildings, functions become floors. Then the bugs crawl out.

Software City's own source code drawn by the app as a 3D blueprint city
Software City's own source code in the app: 113 files, 170 findings. Try it at softwarecity.eu.

How to read a city

  • Folders are districts. Every folder is a plate on the drafting table, nested like the real tree. A sprawling utils shows up from orbit.
  • Files are buildings, functions are floors. A floor's height is the function's length, its colour is its complexity, from calm blue to alarm red. Tall red towers are where the hard code lives.
  • Imports arc across the skyline. Amber arcs with packets travelling along them. Inside a building, calls run between floors as pipes, and recursion shows up as a yellow loop.
  • Click any building and its code opens right beside it.

Then the bugs come out

Nineteen detectors go hunting: long and tangled functions, deep nesting, swallowed exceptions, circular dependencies, god objects, magic numbers and more. Each finding glows beside the floor it lives on, coloured by severity.

And because not every finding is a real bug, one click exports them all as a CSV with the file, the line, the reasoning and the code excerpt, plus a ready prompt. Hand it to your coding AI and let it sort the real bugs from the false alarms, then fix the real ones first.

Famous open source, seen as cities

To show what it does, I opened 13 well-known web projects in the real app: React, Vue, Svelte, Preact, Express, jQuery, Lodash, Axios, three.js, Bootstrap, Vite, Laravel and Astro. Together that's 5,932 files, 1,210,218 lines and 41,747 functions, each one surveyed in the browser in seconds. Some of them:

Lodash looks like a suburb of tidy one-floor houses. Laravel is a metropolis. React's reconciler has towers you can see from far away. On the website you can fly through all of them yourself: drag to orbit, scroll to zoom, point at a building to see which file it is.

It also teaches

The app has a library of 98 design patterns in 12 families, each with lessons, quizzes and real-code demos that you can watch play out inside the city. It can also draw class, module, sequence and data-flow diagrams of your own code.

Software City's pattern library: the Observer pattern explained next to a small 3D city of a weather-station example, with a step-by-step walkthrough
The Observer pattern in the pattern library: a weather station and its displays, as a small city with a step-by-step walkthrough.

Your code stays yours

Everything runs in your browser, even offline. Your code never leaves your machine: no upload, no account, no tracking. The parser understands about 30 languages, from JavaScript and TypeScript to PHP, Python, Go and Java.

Free for you, fair for business

The source is on GitHub. Software City is free for personal projects, study, research, and for schools, universities, charities and public bodies. Using it at work, for clients or inside a product needs an affordable commercial licence. That's how I keep developing the free core.

And there's more coming from the same core:

  • Software City: Patrol, the game, coming to Steam Early Access: patrol your own codebase, triage each bug as real or false, or survive the Bug Swarm before it blows your code up.
  • Software City Edu for schools, universities and bootcamps: assignments on real codebases and a teacher's view of who understands what.
  • VR flight through your codebase, straight from the browser on a Quest or with SteamVR. It's next on the roadmap.

Try it

Open the web app, drop a folder on the window and press B for the bug list. Start with a project you know well. It's a strange and wonderful moment when you see, for the first time, the shape of code you've been living in for years.

If you find a bug in Software City itself (there are 170 of them, the app says so), or you have an idea, the discussions on GitHub are open. And if you build something with it, send me a screenshot of your city. I'd love to see it.

The full technical story is in the Software City portfolio entry.

Share this post

Help others discover this content by sharing it on your favorite social networks!

Stay in the loop

Subscribe to my Newsletter

Stay informed with the latest updates and insights.

We'll never share your email with anyone else.

admin

admin

Senior Fullstack Developer

Thank you for reading my blog post! If you found it valuable, please consider sharing it with your network. Want to discuss your project or need web development help? Book a consultation with me, or maybe even buy me a coffee ☕️ with the links below. Your support goes well beyond a coffee drink. Its a motivator to keep writing and creating useful content.