From 63a9d67a9dd8013e3d9d4ec2cd25321a102aa04f Mon Sep 17 00:00:00 2001 From: Andrew Gundersen Date: Thu, 16 Jul 2026 20:16:00 +0000 Subject: [PATCH] Add README --- README.md | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..3e72cdf --- /dev/null +++ b/README.md @@ -0,0 +1,24 @@ +# crimata-infra + +Backend service that provisions and manages actual customer infrastructure for Crimata: spins up an EC2 instance, points DNS at it (Route 53), sends the customer a notification (via Resend), and can export their data to S3. + +## What it does + +Exposes a small HTTP API (Go, [chi](https://github.com/go-chi/chi) router): + +- `POST /instances` — provision a new customer instance (called by `crimata-website`'s Stripe webhook) +- `GET /instances/:slug` — look up an instance +- `DELETE /instances/:slug` — tear one down + +`provision.sh` is the bootstrap script that actually runs on the new EC2 instance — currently just installs nginx and a placeholder welcome page, a work in progress. + +## Running it + +Needs Postgres, an AWS account (EC2 + Route53 + S3 permissions), and a Resend API key. + +``` +cp .env.example .env # fill in DATABASE_URL, AWS credentials, EC2/DNS/S3 config +go run ./cmd/server +``` + +There's also a `terraform/` directory for provisioning the supporting AWS resources (VPC, security groups, etc.) this service depends on. -- 2.43.0