TeamALA is a nonprofit that helps the admins and moderators of Roblox groups and Discord servers keep their young members safe. Its tools are free: a screening portal that checks public sources about an account before someone joins, access rules so only the right staff see member information, and Nora, a Discord bot for verification and moderation.
In short:
- I founded TeamALA and wrote nearly all of its code: the web platform, the Discord bot, the status page and every tool described below.
- Screening reports facts, not verdicts, and the safeguards against misuse are part of the design rather than a policy page.
- The test, release and deploy tooling lets a very small team ship often on a platform that holds information about children.
I write about what we’ve been building every week, with code, on the blog.
My role
I founded TeamALA in 2026 and was its only engineer through the early builds, designing and building the platform end to end. TeamALA now has a board of directors and a growing engineering team. I wrote the test runner, the release tooling, the repository linter, the bot’s job engine and the event delivery queue myself.
- March 2026. First code: the bot that became Nora.
- July 2026. First commit of the platform.
- November 2026. Incorporated as a nonprofit.
What it’s built on
- One TypeScript monorepo. The web portals are a single Next.js 16 App Router app that serves every subdomain through host-based routing in middleware. Mutations go through Server Actions, and screening results stream to the browser as server-sent events.
- The UI kit and design tokens are shared packages that are never published: everything imports them directly.
- PostgreSQL holds the data, and Redis carries feature flags, short-lived state and the event delivery queue.
- Nora runs as its own service on Fly.io and deploys only after the website’s release has been verified.
- The status page is a separate Cloudflare Worker, so it can still report an outage when the main app is down.
Designing against misuse and mistakes
A tool that looks people up can hurt them: through a wrong answer, a false sense of safety, or someone using it to find out about a child. These were design decisions, written down in architecture decision records and enforced in code.
- Findings, not scores. The first version of the portal folded every signal into a 0–100 “safety score”. I removed it: its weights had no ground truth, it penalised people for private profiles, and it treated missing data as bad data. Each check is now reported as observed, not observed, not checked or unavailable, with its source and time. “Not observed” reads “No record found in this source as of this time”, never “clean” or “safe”, and a test guards that wording.
- Outages are not clean results. An early bug showed a Roblox outage as “nothing found”. It now shows as “not checked”, an identity-link outage shows as “unavailable”, and tests cover both.
- No automated decisions. The portal never gives or removes anyone’s role. Every request it sends to Discord or Roblox is a read, because a pre-made decision waiting for a click is still a recommendation.
- Narrow purpose. Screening is for adults, and only for people applying to, waiting to join or under review in their own community. That narrow scope is the main defence against someone using it to look up a child: a lookup only reaches people connected to the officer’s own community, and the person looked up can see it. The published policy also forbids using screening for employment, credit, housing or anything else covered by the US Fair Credit Reporting Act.
- No dossier. Results are assembled in memory and never stored. Every lookup is logged with only a keyed hash of who was looked up (pseudonymised, so the log is still handled as personal data), the log is deleted after 90 days, and people can sign in to see which communities looked them up and when.
- Children. At first sign-in a neutral year-and-month question, with nothing pre-filled, turns away anyone who says they’re under 13, and only the fact that someone is 13 or over is stored, never a birth date. Self-declaration only deters; stopping someone from simply answering again is built but switched off until the board approves the policy wording. Privacy defaults for under-18s are modelled on the UK Children’s Code, and the published child-safety policy commits to same-day reports to NCMEC, and to CEOP for UK cases.
Running it in production
Two incidents shaped how the platform runs today.
- 2 November 2026: the whole platform went offline. On Vercel’s Hobby plan, the status page’s own health probes used up the month’s compute allowance, and Vercel paused every host, static files included. The status page lives on Cloudflare, so it stayed up and showed the cause. I shipped a fix the same day that cut the probes’ load on Vercel by 50 times: each run now calls one function and checks every other host with a request the CDN answers. The runbook gained a section for this failure, the status page’s docs now forbid adding a probe without checking it against the usage limit, and the project moved to the Pro plan.
- November 2026: scheduled jobs ran hours late. GitHub’s scheduled workflows started running hours late, with gaps of four hours or more, which ate into the bot’s 24-hour retry window for events. I moved delivery to timers on our own host, kept GitHub Actions as a backstop, and added a regression test for the schedule.
The automatic rollback in the diagram below has not had to fire in production yet. Its health checks run against production, and the promote and rollback paths are tested in simulated repositories.
Backend work I’m proud of
A few pieces that took the most thought. They’re described at the level of design, not configuration.
Jobs that survive a crash
Nora’s background jobs are claimed from PostgreSQL with FOR UPDATE SKIP LOCKED, under leases that renew and carry a fencing token, and every attempt is recorded. A result is saved only if the worker’s lease token is still current. Before each Discord call the job records its outcome as unknown, so if a worker dies mid-call the retry reconciles instead of repeating the action, and messages carry a nonce so Discord itself drops a recent duplicate send. An incoming webhook’s receipt, keyed by its event ID, commits in the same transaction as every job it creates, so a duplicate delivery hits the primary key and changes nothing.
Delivering each event once
The website sends signed events to the bot through a delivery queue in Redis. Delivery is at least once: each attempt is claimed with a short lease, only the holder of that lease can record the result, and retries back off exponentially for up to a day. The bot records each event ID in the same transaction as the work it triggers and keeps it for 48 hours, twice the retry window, so each event takes effect once. Ordering markers only move forward, so a late event can’t undo a newer one, and a delivery that still fails after a day is shown to the community’s owners rather than dropped quietly.
Deletion that can’t fall behind the schema
Deleting an account erases it from every table that refers to it. A test reads every account-linked column from the database catalogue and fails if any of them has neither an erasure rule nor a written reason for keeping it, and a second test checks that the personal-data export covers the same data. The app’s database role can only change account identities through functions that take no account ID at all: the session decides whose data changes.
Isolation tests that test themselves
The build fails if any page, route or Server Action has no cross-community isolation test or reviewed exemption. A second suite deliberately weakens the permission checks (the wrong role, an ignored community, an ignored suspension) and proves that each change is caught.
Smaller things I’m still pleased with
- Feature flags roll out by percentage using stable hashed buckets, so widening a rollout keeps everyone who already had it. Flag reads are capped at 150 ms and fall back to the last known value, so a slow store doesn’t hold up a page.
- Owners sign in with passkeys. Challenges are single-use and tied to the session, and every owner must register two authenticators. Verification already handles post-quantum ML-DSA signatures, tested with a software authenticator, ready for when hardware supports them.
What I chose not to build
- No queue service. Event delivery runs on Redis, which the platform already had, plus a timer on our own host.
- No migration for its own sake. Next.js 16 renamed middleware to “proxy”; I kept
middleware.ts, because moving risked routing regressions for no benefit. - No hotfix branches. Urgent fixes ship as patch deploys of one to three merged pull requests, through the same checks as everything else.
Keeping quality up while shipping alone
I was shipping quickly, mostly alone, on a platform that stores information about children. To keep quality from slipping, I turned the standards into checks that CI runs on every change.
- The unit tests are larger than the rest of the codebase combined, and they run on a test runner I wrote (more on that below).
- There’s a coverage floor for the whole codebase, and security and routing code must be fully covered.
- A repository linter enforces file headers on boundary code, forbids import cycles, and fails CI on broken links, stale verification dates or leaked local paths.
- Every significant decision has an architecture decision record with its context, the alternatives and the consequences, so a new engineer can see why things are the way they are.
CI is now the slowest step. A full pass takes about fifteen minutes unless it fails early, and we run about six an hour. Bringing that down is the next job. Pull requests already run only the suites a change can reach, and the merge train orders tests by duration; most of what’s left is faster machines. Meanwhile, a machine catches mistakes before a reviewer has to.
How code reaches production
Most of the tooling a change passes through on its way to production is ours.
Every pull request
1. Branch and pull request
Short-lived branches only. Every change lands through a pull request, branch names and titles are checked by script, and merges are squash-only.
Tooling: Branch and title checks, Squash-only merges, Required status checks.
2. The verify gate
One required check. Our task runner plans every task, runs them side by side with caching, and reports every failure rather than stopping at the first.
In parallel:
- Type check
- Lint
- Unit tests
- Production build
- Bundle size budget
- Formatting
- Governance lint
- Static analysis
- Secret scan
- Dependency audit
Affected-test selection: the runner follows the import graph, so a pull request runs only the suites its change can reach. When it can’t be sure, it runs everything.
3. Test the real build
The production build is started and exercised the way a person would use it.
Tooling: HTTP smoke tests, Browser console check, End-to-end flows, Above-the-fold budget, Theme-switch budget, Accessibility (axe).
Merge train
4. Test approved changes together
Approved pull requests ride a train branch together. The train runs the full suite with coverage thresholds inside a fifteen-minute budget.
Tooling: Full suite, Coverage floors, Duration-ordered test queue.
If coverage drops, CI replays the train’s commits in a scratch worktree and names the pull request that started the slide.
Release
5. Release pull request
Our release tool keeps one pull request up to date with the next version, the changelog and community release notes.
Tooling: Release guardrails check, Version rules, No edited migrations.
6. Tag the release
A maintainer merges it. The tool tags the release, builds a software bill of materials and a signed release manifest, and publishes an immutable release.
Tooling: SBOM, Signed manifest, Immutable releases.
7. Platform parity
The tagged commit runs the full gate again on both Linux and macOS.
8. Migrate databases
Development first, then production, which refuses to start unless development succeeded. Every migration is expand-then-contract, so the live release keeps working on the new schema.
Tooling: Expand, then contract, Dev before production.
9. Promote to production
After a fresh dependency audit, the production repository is fast-forwarded to the tag. Only the release bot can write to it.
Tooling: Fast-forward only, Fresh audit, Bot-only repository.
Production
10. Build and check before traffic
Vercel builds the release and runs our smoke test against it before any visitor sees it.
- If it passes: Promoted. The release starts taking traffic.
- If it fails: Held. The build gets no traffic.
11. Verify what’s live
Waits until every production host reports the new version, then checks HSTS and reruns the smoke suite.
- If it passes: Released. Dependent services follow.
- If it fails: Instant rollback. Back to the previous deployment, and a critical issue opens itself with recovery steps.
Then, in parallel:
- Nora. Migrates its own database, then deploys to Fly.io. It never blocks or rolls back the website.
- Status page. The Cloudflare Worker redeploys only when it or its inputs changed.
Always running
- Patch deploys. Ship one to three merged pull requests on top of the last release, through the same gate, without a hotfix branch.
- Daily full verify. The whole gate runs on main every morning, and a failure opens an issue.
- Weekly mutation smoke. Deliberately breaks security-critical code and proves a test fails each time.
- Documentation drift. Broken links, stale verification dates and leaked local paths fail the build.
Why I wrote our own test runner
Most teams reach for Jest or Vitest. I built a test runner on Node.js instead, and wrote down why in an architecture decision record:
- Coverage tools that rewrite code to count lines were distorting TypeScript line numbers. Ours reads coverage straight from V8 through
node:inspector, without touching the source. - Checks such as “this URL is safe from server-side request forgery”, focus traps and live regions are proper assertions, not helper functions copied between files.
- A harness runs real Next.js Server Actions with simulated cookies and headers.
- There’s no third-party runner or assertion library to audit or keep up to date.
Jest was rejected for its dependency tree, start-up time and memory use, Vitest for its coupling to Vite’s build pipeline, and Node’s built-in node:test because it had no domain-specific assertions and couldn’t merge coverage across packages.
Speed wasn’t one of the reasons, but a later review benchmarked it anyway. On the same suite, ours was the fastest setup measured, about three times faster than Vitest with its default per-file isolation; Vitest with isolation turned off came within about a second. The same review suggested moving to node:test to cut maintenance, and I kept ours for the features rather than the speed.
The cost is that we maintain a test runner. On a project without these needs, I’d start with Vitest.
What I’d do differently
Start with the policies and standards on day one. I wrote a lot of code first and the standards later, and then had to rewrite a large part of it to meet them. Writing the rules first would have been slower for a week and much faster for months.
What you can check today
Everything below is public on teamala.org:
- A Content Security Policy that allows scripts only with a per-request nonce and
strict-dynamic, plus HSTS, COOP and a restrictive Permissions-Policy. - A full set of public policies: terms, privacy, screening data, child safety, moderation, accessibility, law-enforcement requests and more.
- A transparency page with monthly figures on how screening is used. Small totals are withheld to protect privacy.
TeamALA is in early access, so its internals stay private for now. This page describes how the platform is built without the details that would help someone attack it.