03 / The Build Log / Education Platform

CraftCode Academy

A reviewed enrolment platform and teaching system built on React and Supabase.

A React and Supabase platform for an eight-week frontend academy: a public programme site, a private receipt pipeline, a learner area with lessons and submissions, and a 39-table administrator console with row-level security and audit trails.

Role
Frontend Development · Product Design
Category
Education Platform
Status
In build
Year
2026
CraftCode Academy enrolment page with the registration form and fee panel
Admissions, teaching and operations in one application

[build: craftcode-academy-build-log] — In build

01 / The brief

Build the academy, not just the brochure.

CraftCode Academy needed more than a marketing site. It needed a way to register applicants, accept private proof of a bank transfer, verify that transfer, enrol a learner, deliver a 36-day curriculum, collect assignments, record assessment decisions and handle remediation.

The result is a React single-page application backed by Supabase. The public site and the operating platform share one design system and one repository, but they have separate route trees and separate security expectations.

  • Nine public routes under a public layout
  • Nine learner routes under an authenticated layout
  • Eighteen administrator routes behind a role guard
  • 39 database tables, all with row-level security enabled

02 / System map

A static frontend over a guarded database.

React + Vite

Public · learner · admin routes

Supabase Auth

Sessions · profiles · roles

RPC layer

Registration · review · publish

PostgreSQL + RLS

39 tables · 47 functions

Private storage

Receipts · submissions

The browser uses only the anon key. Consequential writes run through security-definer functions that check the caller.

03 / The data model

The schema models the operation, not the page.

Admissions needs profiles, cohorts, registrations, payment submissions, payment evidence and enrolments. Teaching needs weeks, lessons, sections, resources and assignments. Learning needs submissions, versions, files, events and progress.

Assessment needs definitions, versions, criteria, answer keys, evaluation runs, suggested scores, human reviews and publications. Remediation needs cases, items, attempts and events.

All 39 tables enable row-level security. Learners read their own records; administrators read operational data; public visitors read published settings and course content. The database, not the client, decides.

04 / The enrolment pipeline

A sequence of guarded functions.

Each step is a database function with its own validation, not a sequence of permissive table writes.

  1. 01

    submit_registration

    Validates details, enforces one registration per email, generates a reference and computes the amount due.

  2. 02

    submit_payment

    Records transfer details and links evidence uploaded to the private payment-evidence bucket.

  3. 03

    review_payment

    Checks is_admin(), verifies the record, creates the enrolment and writes an audit event.

  4. 04

    get_registration_status

    Returns only the status a reference and email are entitled to see.

05 / Curriculum as data

Publishing a week has to publish the teaching inside it.

Weeks, lessons and sections are rows. A section can be private, so answer keys never appear in the learner view. Publishing validates that every lesson has a title and at least one learner-visible section, then publishes the week and its draft lessons together.

The Week 1 pilot imported 100 corrected sections through a Python importer that reconstructs paragraphs, carries prose across page boundaries and preserves wrapped table cells.

The source material contains a numbering problem in Day 1 Guided practice. It was left verbatim rather than silently rewritten, because teaching content should be corrected deliberately.

06 / Selected screens

The public face and the working surface.

CraftCode Academy enrolment page with registration form and fee
Enrolment: registration, fee and status lookup
CraftCode Academy programme page with eight weeks of curriculum
Programme: eight weeks and 36 days
CraftCode Academy methodology page with teaching promises
Methodology: the nine-part study day
CraftCode Academy home page at mobile width
Home at 390px

07 / The hard parts

The hard parts are the states between happy and done.

Receipts are private by default. Admin access uses 120-second signed links, and the bucket rejects public reads. That makes every review slightly slower and prevents a class of data leak.

Assessment deliberately separates a suggested score from a human decision, and review from publication. A result can be corrected before the learner sees it.

Release state is the other hard part. Revisions 1.6–1.19 are built and tested but uncommitted and undeployed. The documentation states that gap rather than presenting the working tree as live.

The project also records its own defects: an enrolment badge that can contradict a closed status, cohort dates that do not propagate publicly, and missing archive and revocation interfaces.

08 / Reflection

Security posture is a product decision.

The most important engineering choice was to keep consequential writes inside security-definer functions and to let row-level security, not the interface, decide who can read a record. That choice makes the product slower to build and much easier to reason about.

The second was to model the teaching process instead of storing rich text. Submissions, criteria, reviews, publications and remediation all have state, and state has to be recorded.

The part I would change is the amount of platform built before the first cohort. The QA book is strong, but it tests the product against its own expectations. Real teaching will produce better requirements than another admin screen.

RLS everywhere

39 of 39 tables enabled; learner visibility encoded in functions.

Private evidence

No public receipt URLs; 120-second signed links only.

Auditable actions

Content revisions, audit logs, submission, review and remediation events.

Honest release state

Live revisions and working-tree revisions documented separately.

09 / What is next

Close the gap between built and shipped.

The next engineering milestone is a release, not a feature: run the full regression, confirm the administrator review-to-publication leg, commit revisions 1.6–1.19 and verify the deployed bundle contains them. Migration 019 is already applied; the Phase 2 application code is not deployed.

After release, the highest-value work is authenticated end-to-end coverage for the learner and administrator journeys, and Slack delivery or explicit removal from scope.

  • Record the current 94-test result and build in the QA book
  • Fix the enrolment badge and cohort-date defects
  • Add authenticated learner and admin E2E tests
  • Exercise the learner profile page with a learner session
  • Deploy only after explicit authorisation