Hatch.surf web application
Integrate the full Hatch v0.1 product (capture, inspect, SSE, mock, replay, SQLite store, E2E smoke test) with the migration branch's docs/license realignment (Apache-2.0 LICENSE, ADR-0002, clean README layout). This produces a single launch-ready HEAD where the three Show HN demo bullets are true and the repo carries an Apache-2.0 license. Conflict resolution: - cmd/hatch/main.go, cmd/hatch/main_test.go, go.mod: took replay (integrated chi router + handler routes + deps). Migration's foundation-only main.go and dep-less go.mod are superseded. - .gitignore: took replay (narrowed /hatch to avoid matching cmd/hatch/). - README.md: took migration (clean Repository Layout, Apache-2.0 license section). Replay's stale "Proprietary — All rights reserved" + apps/packages layout dropped. - go.sum: auto-merged. - brand/, internal/, docs/adrs/0002: brought in from replay / migration as non-conflicting additions. Verified on merged HEAD: - go test ./... — all pass - go test ./cmd/hatch -run TestSmokeE2E — all 7 phases pass - docker compose up --build — container runs; healthz/capture/inspect/mock all 200; mock returns configured status + body + content-type CTO engineering sign-off for ELF-57: GO on this HEAD. Co-Authored-By: Paperclip <noreply@paperclip.ing> |
||
|---|---|---|
| .github/workflows | ||
| brand | ||
| cmd/hatch | ||
| docs | ||
| internal | ||
| .dockerignore | ||
| .env.example | ||
| .gitignore | ||
| Caddyfile | ||
| CONTRIBUTING.md | ||
| docker-compose.yml | ||
| Dockerfile | ||
| go.mod | ||
| go.sum | ||
| LICENSE | ||
| README.md | ||
El Foundation
Engineering repository for El Foundation.
About
El Foundation builds institutions that outlast their founders. We create technology and organizations that compound in value over time. This repository is the source of truth for our engineering work.
Getting Started
- Read the company charter to understand why we exist.
- Read the operating model to understand how decisions are made.
- Read CONTRIBUTING.md before making any changes.
- Read docs/engineering/local-dev.md for the day-to-day workflow.
- Read docs/engineering/hatch-architecture.md for the component map.
Repository Layout
├── .github/workflows/ # CI/CD definitions
├── cmd/hatch/ # Server entrypoint (Go binary)
├── docs/
│ ├── company/ # Founding documents (charter, org, etc.)
│ ├── engineering/ # Engineering standards, architecture, local dev
│ └── adrs/ # Architecture Decision Records
├── internal/ # Go packages (handler, store, ...)
├── Dockerfile # Multi-stage static binary build (golang → scratch)
├── docker-compose.yml # Local stack with optional Caddy sidecar
├── Caddyfile # TLS reverse proxy for the demo host
└── go.mod # Go module definition
Hatch — Deploy in one command
Hatch is a self-hostable HTTP request inspector + mocker. Ship it to any VPS with Docker.
Quick start (local dev, no HTTPS)
docker compose up --build
# Hatch UI: http://localhost:8080
# Health check: http://localhost:8080/healthz
Or run the binary directly:
go run ./cmd/hatch
# Health check: http://localhost:8080/healthz
Production (with HTTPS via Caddy)
# Set your domain name
cp .env.example .env
# Edit HATCH_HOSTNAME in .env to your real domain
# Start Hatch + Caddy (auto-issues Let's Encrypt cert)
docker compose --profile with-caddy up -d --build
# Hatch UI: https://{your-domain}
# Capture endpoint: https://{your-domain}/{endpoint-id}
Architecture
Internet → :443 (Caddy) → hatch:8080 (Go binary, internal network)
│
├─ Auto TLS (Let's Encrypt, or self-signed for localhost)
├─ Reverse proxy with security headers
└─ JSON access logs to stdout
Caddy terminates TLS and reverse-proxies to the Hatch Go binary. The Hatch container only listens on 127.0.0.1:8080 — it's never directly exposed to the internet.
Technology Stack
See docs/engineering/tech-stack.md for current choices and rationale, and docs/adrs/ for the decision records that produced them.
Contributing
See CONTRIBUTING.md.
License
Apache-2.0 — see LICENSE.