---
title: Introduction
description: A take-home infrastructure exercise. A patent-review editor goes from Docker Compose to a production design on AWS.
---

This site documents a take-home infrastructure exercise. It takes a patent-review editor from Docker Compose to a production design on AWS: infrastructure, a delivery pipeline and observability. Nothing is deployed. The Terraform validates, but it was never planned against a real account.

## The application

**Client**

React editor built with Vite. Suggestions arrive over a WebSocket.

**Server**

FastAPI on port 8000. It loads and saves documents and asks OpenAI to review them.

**Database**

In-memory SQLite, seeded with two patents at start-up.

To run it locally, create a `.env` file in `server/` with the OpenAI API key, then:

```bash
docker-compose up --build
# Open http://localhost:5173
```

To run it with the telemetry stack (OpenTelemetry Collector, Prometheus, Jaeger, Grafana on http://localhost:3001), switch it on with two variables:

```bash
COMPOSE_PROFILES=observability \
OTEL_EXPORTER_OTLP_ENDPOINT=http://otel-collector:4318 \
docker compose up --build
```

## What was built

1. **Production infrastructure**

    Done Terraform for three environments in eu-west-2. CloudFront and WAF in front, an internal ALB, Fargate tasks across three Availability Zones, and Aurora PostgreSQL Serverless v2. The main decision: managed services only, so there are no servers to run.

    **[Architecture](/architecture)**

    How it runs on AWS, and why each part is there.

    **[Deployment](/deployment)**

    Bootstrap an account, apply an environment, ship the first release.

2. **Deployment and automation**

    Done GitHub Actions builds one image per merge and promotes that digest through dev, staging and prod. ECS rolling updates keep full capacity, and a release that fails its checks rolls back.

    **[Pipeline](/pipeline)**

    Build once, promote one digest through dev, staging and prod.

    **[Rollback](/rollback)**

    Three ways back, and what each one restores.

3. **Observability**

    Done The server speaks OpenTelemetry, and a collector picks the back end. One burn-rate alert watches AI suggestion failures, in Prometheus locally and as a CloudWatch alarm that also rolls back a release.

    **[The implemented example](/alerting-example)**

    One burn-rate alert on AI suggestion failures, in Prometheus and in CloudWatch, run and measured.

    **[Incident response](/incident-response)**

    Severity, paging, the runbook, and logging and security in production.

## What is not built

- **Not deployed.** Nothing has run against AWS: no plan, no apply, no live alarm.
- **In-memory SQLite.** Every deploy loses saved documents until the app moves to Aurora. See [With more time](/improvements).
- **No account audit services.** CloudTrail, GuardDuty, AWS Config and Security Hub are not built.
- **No paging.** The alarm topic has no subscriber. See [Limits and next steps](/observability-limits).
- **No authentication.** Audit events have no actor.

Each part ends with its open items: [infrastructure](/improvements), [delivery](/limits), [observability](/observability-limits).
