CLAI City is a living 3D city that runs at claicity.cotentlab.com, with no download and no app store. We call it the world's first AI city that works, teaches and hires. Here's how it's put together and what we learned getting it to run smoothly on an ordinary laptop.

The stack

  • three.js for rendering. The city is one scene: towers, roads, a river, a harbour, parks, a stadium, an amphitheatre and the CLAI Tower in the middle.
  • Free, open assets. Characters come from the MIT-licensed Microsoft Rocketbox set, and models and textures from CC0 packs (Quaternius, Poly Haven).
  • Supabase (free tier) with Deno edge functions for the waitlist, beta access codes, Academy exams, certificates, verification and job applications.
  • Netlify for static hosting.

The hard part: draw calls

Our first full build sent about 7,700 draw calls per frame and stuttered even on a new MacBook. The fix was a small "bake" step. After a district is built, we walk its scene graph and merge every static mesh that shares a material into one mesh. Anything that moves (rotors, wheels, screens, people) is tagged and skipped. That brought it down to roughly 3,200 calls and roughly halved frame time.

Other things that helped

  • Lazy people. Characters load only when you get near them and hide when you're far away.
  • Screens. In-city video screens repaint a few times a second, and only when you're close enough to see them.
  • Shader warm-up. We compile all shaders before showing the "Enter" button, so the first seconds don't freeze.
  • Crowds that come and go. The cricket crowd, the amphitheatre audience and the market shoppers spawn when you approach and vanish when you leave.

Real systems, not mock-ups

The exam questions are picked and checked on the server, so answers can't be read from the page. Each certificate gets an ID like CTL-AI-2611-XXXXXX and a QR code that opens a public verify page.

What's next

A smoother first load and more districts.

CLAI City is in private beta. Join the waitlist at claicity.cotentlab.com.

CLAI City by CoTent Lab — The World's First AI City That Works, Teaches & Hires.