Tiel Coder e9168def6c C1 — Skills composer (name composition + dedupe_key preview)
Skills composer: category (required) + optional technology + optional
function -> composed name prefill + dedupe_key. Governing rule: a null
technology yields a generic (technology-agnostic) skill; a duplicate
(category, tech, function) is rejected.
Delivered:
- src/domain/skills.ts — pure composeSkillName (no DB, no src/db imports).
  Rule: function+technology -> '<fn> on <tech>'; function only -> '<fn>';
  technology only -> '<tech>'; neither -> category. Null technology ->
  generic skill (name never names a specific piece of gear).
- src/domain/skills.test.ts — 6 tests named after the composition
  behaviors.
- src/app/api/dev/skills/compose/route.ts — POST /api/dev/skills/compose
  returns { name, dedupeKey } for prefilling the form; writes no row.
  The admin edits the name, then submits to POST /api/dev/skills, which
  generates slug + dedupe_key and enforces the unique constraint (409 on
  duplicate).
No schema change, no migration: the skills table, data-layer CRUD, and
dedupeKey were delivered in B4; C1 adds only the composition rule +
composer endpoint (matching the isPublishable/validateRequirements
domain pattern).
Verification: typecheck lint test (50, +6) build all green; runtime
smoke /tmp/c1.sh (13 checks): compose fn+tech -> '<fn> on <tech>',
compose function-only -> generic, create composed skill (slug frozen,
dedupe_key persisted), duplicate -> 409, null-tech generic skill,
dangling FK -> 400.
2026-11-18 03:08:25 +00:00

Media Team Hub — Planning Docs

Architecture and build documentation for a church media team scheduling and training platform. No application code yet — these are the documents you review, approve, and hand to whoever builds it.

Read in this order

Doc What it answers Length
docs/FEATURE-SUMMARY.md Plain-language feature list with a tick-box sign-off — send this to the ministry leader. ~5 min
docs/BUILD-SPEC.md What are we building, screen by screen, and in what order? The build team's source of truth. ~15 min
docs/ARCHITECTURE.md How is it built — stack, data model, scheduling and reminder logic, security. ~25 min
docs/BUILD-PLAN.md The order to build it in: 56 units across 10 phases (plus 5 deferred media-library units), 7 checkpoints, and the rules that stop an AI agent looping. Give this to the agent. ~15 min

The 60-second version

The problem. Three roles — Audio, Livestream, Slides — every week, managed by memory and group texts.

The product. One place where:

  • volunteers publish blackout dates and confirm shifts in three taps from a text message;
  • each person records how comfortable they are on each piece of gear, an admin or mentor verifies their real level, and experts become mentors for people who want to learn that position;
  • an admin approves people and builds the week on a drag-and-drop grid with conflict detection and fair auto-fill;
  • the system emails each volunteer the Friday before they serve, with the call time (SMS reminders are deferred to a later phase — see launch scope note below);
  • one-off events — weddings, baptisms, youth nights — get a photographer assigned on the same engine, with a shot brief on their phone; a RAW photo library for editors is designed but deferred to phase 2;
  • training lives alongside it — rich text how-tos and videos, gating who is qualified for which role;
  • anything on screen comes out as a file: PDF for the printed booth sheet and leadership packs, XLSX for working spreadsheets, CSV for everything else.

The stack. Next.js + TypeScript on Cloudflare Workers, SQL via Drizzle (D1 or Postgres), Postmark for email, R2 for media, TipTap for rich text everywhere, cron worker for reminders. SMS (Twilio) is deferred — launch is email-only.

The cost. About $35–40/month at ~120 volunteers.

The timeline. ~10.5 weeks full-time, ~6 months part-time, with a 4-week pilot on one service before retiring the spreadsheet.

Launch scope (decided): email-only. SMS reminders (Twilio + A2P 10DLC registration) are deferred to a later phase. The notification pipeline is built channel-agnostic, so SMS slots in later with no rework. When you're ready: a Twilio EIN + 10DLC brand registration (1–3 weeks) is the only external lead time.

Design decisions worth arguing about

  1. "Friday before" is a rule row, not code. Reminders are computed as service start − 2 days at 18:00 local, so a Wednesday service automatically reminds on Monday and the church can move the send time without a developer.
  2. Volunteer responses never require a login. Signed one-click links in the email and text carry the confirm/decline action. Any friction at that moment kills the whole system's value.
  3. The schedule does not depend on AI or on a third-party service. Publishing writes to an outbox table; a cron worker drains it. An email outage cannot block scheduling, and an LLM outage hides one search box.
  4. Auto-fill is deterministic scoring, not a model. Fairness, certification and availability are solved in ~60 lines of ranked logic that an admin can read and explain.
  5. Draft vs published weeks. Nothing notifies anyone until the admin explicitly publishes, which prevents the schedule-storm that kills trust in tools like this.
  6. Certification gating. A trainee cannot be dropped alone on the audio board; shadow slots are a first-class concept.
  7. Nothing about the gear is hardcoded. Categories, companies, products, functions, positions and the skills composed from them are all admin-edited rows. Buy a new switcher or rename a position and the app follows — no deploy.
  8. Skill is per technology, not per person. Someone can be 90% on ProPresenter and 30% on the audio console, so scheduling asks "who can run this position this Sunday" — availability first, then verified competency, then fairness. Self-rated comfort informs the decision; only a mentor's sign-off authorises it.

Before you build: 5 answers needed

  1. Exact service times and timezone.
  2. One person per role, or more on big Sundays?
  3. Who is an admin vs. a coordinator, and what does each own?
  4. What system are you migrating from (CSV export available)?
  5. Email: a domain you control for the sending address (e.g. media@yourchurch.org) plus SPF/DKIM/DMARC. SMS is deferred — when you add it you'll need a Twilio EIN + 10DLC registration (1–3 weeks), but that can wait until email is running.

Full list in BUILD-SPEC.md §12.

Decisions recorded from your answers

These are the concrete answers to the five pre-build questions, recorded so the builder doesn't re-ask them:

  1. Services: two Sunday services — 10:30 AM and 5:30 PM, timezone America/New_York (not a fixed "EST" — the system stores UTC and renders local, so DST is handled automatically). Both are fully changeable later as data, no code.
  2. Headcount: one person per role for every slot.
  3. Roles: Admin = full control over everything, including system/settings. Coordinator = full control over scheduling, people, events, training and notifications — everything except design/theme and admin/system settings (i.e. a feature-scoped split, not a single-role scope).
  4. Migration: CSV only — a one-way "load existing volunteers" step, not a two-way sync.
  5. Notifications: email-only at launch; SMS (Twilio + 10DLC) deferred to a later phase.

Suggested next step

Review the build spec, answer the five questions, then start Phase 0: wireframes for the schedule grid, approval queue, blackout calendar and lesson editor — and kick off the Twilio 10DLC registration in parallel, since it has the longest external lead time.


Documents dated 2026-11-17. Prices and provider fees are estimates — verify current pricing before committing a budget.

S
Description
No description provided
Readme 20 MiB
Languages
TypeScript 93.3%
JavaScript 2.5%
HTML 2.2%
CSS 1.8%
Dockerfile 0.2%