devxlogo

The Infrastructure Behind the Magic: Spinning Up Secure AI Sandboxes in Milliseconds

AI models can do more than mainstream tasks like chatbots and image generators. The technology now enables the creation and launch of applications from just a few lines of plain text. But despite this potential, many developers still struggle to turn this into something that everyday users can manage.

That’s what engineer Tanmay Kejriwal decided to tackle head-on as the founder of MakeX, a platform that takes simple prompts, generates working code, and runs it in a jailed environment within seconds.

Here’s how Tanmay built MakeX from scratch using accessible tools, custom infrastructure, and a strong focus on observability and safety.

Inside MakeX

Tanmay first began building apps while pursuing his bachelor’s degree in computer science from Texas Christian University. But around the time he graduated, platforms like ChatGPT were starting to enter the mainstream and making it easier than ever to automate tasks like writing or editing videos. He then started thinking about how AI could not just assist with development but automate a product-building process from start to finish.

That idea became the foundation for MakeX, a platform where users can turn simple, plain English prompts into fully functioning mobile apps like a calorie tracker, a podcast summarizer, or a workout app.

The process starts when a user types in a prompt in which they describe the app they want to build on a web interface made with React and hosted on Vercel. This prompt is sent to an API built with FastAPI and routed through AWS API Gateway and Lambda. From there, the system sends the request to two paths: one for creating the code and the other for preparing the runtime environment where that code will be hosted.

See also  6 Internal Platform Patterns That Drive Scale

The platform then uses LLMs like GPT-4 or Claude to generate the app’s underlying code in React Native. The code is then version-controlled through a private Git service tied to the user’s identity to keep each user session traceable.

Finally, a custom-built orchestrator (written in Go and running on EC2) spins up a lightweight Firecracker microVM to run it. Each microVM runs a Docker container inside it to provide the appropriate environment while maintaining complete isolation from other sessions.

The generated code is mounted, executed, and exposed through a private preview URL protected by reverse proxies and port remapping. This gives users a secure and workable framework to launch and test their app in real-time, directly from their browser.

Setting Up A Custom Infrastructure

The key objectives that Tanmay had in mind throughout the initial development of MakeX were that it should be easy to use, deliver fast results with low latency, keep user sessions fully private, and expand its internal capabilities based on demand.

The first step to accomplish that meant choosing a backend infrastructure optimized for speed. He initially tested managed platforms like Fargate, but he found cold starts often extended boot times beyond a minute. Other options like Fly.io and Koyeb also fell short, either due to poor performance or costs that would make them unprofitable at scale.

Realizing that off-the-shelf solutions wouldn’t cut it, Tanmay began building on top of AWS’s core services (also known as AWS primitives), using each component for a specific purpose to gain more control over the system.

He used Amazon Simple Storage Service to store files like kernel images, root filesystems, snapshots, and code generation logs. He integrated the system with AWS CloudWatch alongside other custom dashboards to track memory and CPU usage and the number of users active at any given moment. This, in turn, allowed the system to spot bottlenecks as they emerged.

See also  Three Database Decisions That Shape Every Redesign

Deeper Issues

These dashboards could also tie each output back to the prompts they originated from, which allowed the system to identify if the AI might have misinterpreted a prompt (which would result in faulty code). As a result, the system could properly track and surface deeper issues that basic logs might typically miss.

He then built the core compute layer to run on EC2 clusters, each capable of hosting 20 to 50 lightweight Firecracker microVMs in parallel. These clusters are backed by a pool of pre-warmed containers that can be quickly attached to newly launched microVMs, allowing apps to boot in seconds without delays.

These clusters are also horizontally auto-scaled based on real-time demand. As more users come online, new capacity is provisioned automatically to ensure the system remains active, with resources scaling back once usage dips.

This setup gave MakeX the control, responsiveness, and flexibility it needed to avoid cold starts, remain functional under heavy demand, and keep every user session safe and isolated.

Making AI Apps Accessible To All

Since its launch, MakeX has delivered strong technical results. Its 95th percentile app launch time averages around 3.3 seconds, spanning from the time a user enters a prompt to when they get their preview-ready sandboxed environment. The platform has now hosted over 2,000 generated apps, with an 89.2% success rate and total system downtime remaining under 20 minutes over a three-month period.

It has also successfully expanded under pressure. It recently supported over 500 parallel sandboxes during a weekend-long hackathon, showing the technical efficiency of its auto-scaling infrastructure.

See also  Evolve or Rewrite? 7 Architectural Differences

Through MakeX, Tanmay Kejriwal is building a framework that makes AI practical and accessible, enabling those with and without technical knowledge to interact with this quickly advancing technology and create functional mobile applications.

steve_gickling
CTO at  | Website

A seasoned technology executive with a proven record of developing and executing innovative strategies to scale high-growth SaaS platforms and enterprise solutions. As a hands-on CTO and systems architect, he combines technical excellence with visionary leadership to drive organizational success.

About Our Editorial Process

At DevX, we’re dedicated to tech entrepreneurship. Our team closely follows industry shifts, new products, AI breakthroughs, technology trends, and funding announcements. Articles undergo thorough editing to ensure accuracy and clarity, reflecting DevX’s style and supporting entrepreneurs in the tech sphere.

See our full editorial policy.