[ ← back to projects ]
> cat case-studies/ai-analytics-platform.md

AI-Powered Data Analytics Platform

Client
Undisclosed — a company building a secure code-execution sandbox product
Purpose
A demo application proving what their sandbox product could do
Role
Sole/lead developer
Stack
Flask, MCP (Model Context Protocol), a secure sandboxed code-execution environment
Status
Fully built and functional — proven via a retained demo video
Related work
Upwork: "Python and TypeScript Demo Project Development" (Jan–Mar 2025)
< Flask />< MCP />< Python />< AI />
> the situation

The client built a secure code-execution sandbox product and needed a compelling, real-world demo: database analytics for non-technical users. Non-technical users normally wait on someone else to write and run SQL — often a multi-day turnaround. Letting an LLM write and run the query itself introduces a second problem: running AI-generated code directly against production infrastructure is a real security risk.

> what was built

A Flask-based AI platform that lets a user ask a database question in plain language and get back an answer — with the AI-generated code never touching anything but a secure, isolated sandbox.

Natural language → SQL/Python — user questions are converted into executable database queries or Python data-processing code. MCP (Model Context Protocol) structures how the AI layer interacts with the underlying data and tools.

Sandboxed execution environment — the piece that actually solves the security problem: AI-generated code runs inside an isolated sandbox, separate from the client's real infrastructure, instead of executing directly against production. Automated visualizations turn raw query results into something immediately readable.

> results
~95%
Query/answer accuracy
measured in internal testing
100%
Queries executed in sandbox
architectural guarantee
0%
Manual SQL required from user
architectural guarantee
0%
Direct execution against production
architectural guarantee

Pipeline: natural language → code generation → sandbox execution → visualization (4 stages). The accuracy figure is a measured result from internal testing; the other three are true by design, not by measurement.

> the lesson

The interesting engineering decision wasn't the natural-language-to-SQL part — that's an increasingly common pattern. It was recognizing that "let the AI run code" and "let the AI run code safely" are two completely different engineering problems, and solving the second is what made the demo credible to a technical audience.