An inherited education platform restructured into a monorepo with safety nets.
Inherited an online-university platform across two repos with no CI, no tests, no documentation. Restructured into a monorepo, set up branch protections, Playwright E2E suite, lint and typecheck pipelines. Authored AGENTS.md and CLAUDE.md so any future collaborator (human or AI) can ship without fear.
The problem
Online-university platform: cohorts, schedules, enrollments, content delivery, GHL-integrated CRM. Codebase split across two repos (frontend + Cloud Functions). No CI, no tests, no docs.
Two-repo splits sound innocent. They aren't. Frontend ships ahead of the function it depends on. A schema change in one repo silently breaks the other. Every deploy is a coordination puzzle. Every PR is a leap of faith.
The platform was running. But every change carried risk nobody could quantify, and onboarding a second engineer would be an act of bravery.
What I did
Engineering safety net before any feature work.
- Duo-repo → monorepo. Single deploy surface. Single PR review. Schema changes atomic across frontend and backend. Local dev runs both with one command.
- Branch protections on
mainanddevelop. No direct pushes; required reviews; required status checks. - Playwright E2E suite. Real flows, real browser, against preview deploys. Cohort enrollment, payment, dashboard.
- Lint + typecheck in CI. TypeScript strict, zero ESLint warnings, blocking on every PR.
- GitHub Actions pipeline. PR opens → install → typecheck → lint → unit → Playwright E2E → green or red.
- AGENTS.md + CLAUDE.md. Tech stack, conventions, deploys, gotchas, "where the bodies are buried." Any future collaborator (human or AI) ramps in days, not weeks.
The detail that mattered: the AGENTS.md / CLAUDE.md write-up. Tests are good, protections are good, but a doc that lets the next operator understand the system from a cold start is what compounds.
Outcome
- Deploy surface collapsed from two repos to one.
- Tests catch regressions before staging. Confidence to ship features again.
- New collaborators onboard in days, not weeks.
- Shipped multiple new features during the restructure window without breaking what existed.