← Selected workAI / Cloud Systems
CASE STUDY

Cortex Lab

A cloud-deployed neuroscience research platform. Researchers build a timed experiment out of text, image, audio, microphone and video blocks, submit it for GPU inference, watch progress stream back live, and inspect the predicted activation on an interactive 3D cortical surface. Experiments are private until explicitly published, after which they can be browsed, forked or embedded. Outputs are simulated average-subject predictions, meant for research exploration rather than diagnosis.

Next.jsTypeScriptFastAPIPostgreSQLCeleryAWSTerraformWebGL
Preview of Cortex Lab
01 / THE CHALLENGE

What needed to change.

Experiment design, model inference and result visualisation for this kind of work normally live in separate tools and local scripts. That makes a study awkward to reproduce and close to impossible to hand to someone else.

02 / THE IDEA

The system I chose to build.

One workspace that covers the whole loop. A timeline builder handles five stimulus modalities, a durable job pipeline dispatches GPU inference without blocking the API, progress and activation chunks stream back over server-sent events, and a WebGL viewer plays the result over a 20,484-vertex cortical surface. Analysis tools sit on top: a versioned cognitive-state classifier, representational similarity analysis with JSON and CSV export, and a cancellable stimulus optimizer that can promote a winning candidate into a new experiment.

My role: Solo. Architecture and every layer of it: frontend, API, asynchronous inference pipeline, cloud infrastructure and CI/CD.

03 / ARCHITECTURE

Under the surface.

Next.js Client. FastAPI on ECS. SQS + Celery. Modal GPU. RDS + S3. Redis / SSE.
04 / WHAT GOT HARD

The interesting parts rarely stay simple.

05 / RESULT

What came out the other side.

Deployed at cortex-lab.uk on Terraform-managed AWS infrastructure, with 245 backend tests passing and 3 integration tests skipped.

06 / NEXT

What I would improve next.

GitHub Live demo
NEXT PROJECTSprintern