Skip to content
Lucas B. Jolibois

Psykoterapeuterne · Education platform

On airBuilt for Denmark's Shark TankBuilt for Løvens Hule, Denmark's Shark Tank

Every layer,one person.

One of Denmark's largest schools for therapists was going on national TV. I built its platform in the four weeks before the episode aired, then grew it into all of it: enrolment, payments, courses, a membership and an AI advisor.

38
Page routes
40
API endpoints
36
Page-builder sections
188
Tests
Scroll to take it apart

(The deadline)

Four weeks to national TV.Four weeksto national TV.

The school was going on Løvens Hule, Denmark's Shark Tank, and needed a platform to match. From an empty repo, I built the first version in the four weeks before the episode aired, from the page builder to accounts, payments and courses.

On air

Off air · building

Feb 2

Day one: the page builder every page still runs through.

  • PageBuilder.tsx · 1,588 lines
  • SectionPickerInput.tsx · 515 lines
Psykoterapeuterne · Feb 2026
1/26
Feb 2
0
Commits
0
Lines added

(The brief)

docs / psykoterapeuterne-platform.mdShipped

One platform for a whole school, live before national TV.

Owner
Lucas
Deadline
Løvens Hule
Built
Feb 2–27

Context

One of Denmark's largest schools for therapists: 1,400+ graduates since 2021, ten programmes from a one-day course to a four-year degree, in Aarhus, Ballerup and online.

Constraints

  • 4 weeksempty repo to the episode
  • 1 persondesign, code, infrastructure
  • Non-developerspublish everything
  • CDN speedevery content page static

Goals

Non-goals

A separate learning platformA server render on every visitA developer in the publishing loop

ScopeProductUX & UIFrontendBackendDataAuthPaymentsAICMSInfra
(Architecture)

One platform, every moving part.One platform,every moving part.

People on the left, the services on the right, my code in between. Pick a flow and watch it run through the system, one hop at a time. Point at any part to see what it does.

People

SStudentBrowser or phone
TStaffSanity Studio
MMemberPlus

Edge

▲EdgeStatic pages on the CDN
◇MiddlewareGuards the members' area
▲Vercel buildDeploy hook

My code

NNext.js appApp Router
λAPI routesServer endpoints
⏱Scheduled jobsVercel Cron

Services

SSanityContent
◆SupabasePostgres
CClerkAccounts
SStripePayments
✳ClaudeThe advisor's model
RResendEmail

Publish a change

1/6

Staff edit, press Deploy in the Studio, and the static pages rebuild.

Chapter 01 · Interface

Six real pages, from curious to enrolled.

  1. 01 Find your way
  2. 02 See how it fits
  3. 03 Choose a programme
  4. 04 Commit to four years
  5. 05 Get a seat
  6. 06 Keep learning

01

Find your way

psykoterapeuterne.com/find-din-uddannelse

Most people don't know which of ten programmes suits them. A guide asks three things, your goal, your focus and your time, and ranks all ten. No contact details needed.

How it's built

Scoring runs in the browser on the programme data, so the answer is instant.

ReactMotion

psykoterapeuterne.com/find-din-uddannelse
The /find-din-uddannelse page on desktop
The /find-din-uddannelse page on a phone

02

See how it fits

psykoterapeuterne.com/uddannelser

The programmes are bricks: the short courses are part of the longer ones. The page shows it literally, building the path to the four-year MPF brick by brick.

How it's built

One SVG brick, five combinations, played when the scene is on screen.

SVGMotion

psykoterapeuterne.com/uddannelser
The /uddannelser page on desktop
The /uddannelser page on a phone

03

Choose a programme

psykoterapeuterne.com/uddannelser/mct-terapeut

Price, days, hours and ECTS up front, a film from the teacher, and every date for every class one click away, down to a PDF to take home.

How it's built

Programme, class, module and day are linked documents; the schedule and PDF read the same data.

SanityGROQjsPDF

psykoterapeuterne.com/uddannelser/mct-terapeut
The /uddannelser/mct-terapeut page on desktop
The /uddannelser/mct-terapeut page on a phone

04

Commit to four years

psykoterapeuterne.com/uddannelser/psykoterapeut-mpf

Four years, one year at a time. In the room or online, the students' rating, the price per year and the teachers, all before anyone has to ask.

How it's built

Built from the same sections as every other page, in a different order.

Page builderNext.js

psykoterapeuterne.com/uddannelser/psykoterapeut-mpf
The /uddannelser/psykoterapeut-mpf page on desktop
The /uddannelser/psykoterapeut-mpf page on a phone

05

Get a seat

psykoterapeuterne.com/tilmeld

Before intake opens, a waitlist with a live count where the first 30 get 10% off. When it opens, a reservation journey that saves as you go.

How it's built

The count comes straight from the database; drafts save quietly while you fill in the form.

SupabasePostgres

psykoterapeuterne.com/tilmeld
The /tilmeld page on desktop
The /tilmeld page on a phone

06

Keep learning

psykoterapeuterne.com/kurser

Mini-courses next to the classroom. Buy with card, MobilePay or Klarna, and pick up where you left off.

How it's built

Stripe checkout, a signed webhook that grants the course to your account, progress per video.

StripeClerk

psykoterapeuterne.com/kurser
The /kurser page on desktop
The /kurser page on a phone
Chapter 02 · Page builder

Built from 36 sections.Built from36 sections.

Every page is built in a Sanity Studio I customised for the staff. They pick a section by its picture, fill it in and publish. Scroll, and a programme page builds itself from the real ones.

Tilføj sektion36 sektioner
AlleHeroContentFeaturesSocial proofPricingCTA
Pick a section by its picture00/10
psykoterapeuterne.com/uddannelser/mct-terapeutDraft · 0
+An empty page
IdleProduction deploymentDeploy to production

The Studio's real sections

The page, under an X-ray

The Uddannelses Hero section<UddannelsesHero />
The Uddannelses – Sub Hero section<SubHero />
The Content + Media section<ContentMediaSection />
The Uddannelses – Læringsforløb section<Læringsforløb />
The Scroll Highlight section<ScrollHighlightSection />
The Narrative Card Stack section<CardStackWithtextAndContent />
The Certification section<CertificationSection />
The Single Row Testimonials section<SingleRowTestimonialsMarquee />
The FAQ section<FAQ />
The Final CTA + Intromøde Form section<FinalCtaWithIntromodeForm />

01 / 10 · Hero

Uddannelses Hero

schemaTypes/blocks/uddannelsesHero.ts
1defineType({2  name: 'uddannelsesHero',3  title: 'Uddannelses Hero',4  type: 'object',5  fields: [6    defineField({ name: 'hidden', type: 'boolean' }),7    'mediaOverlay',8    'eyebrow',9    'heading',10    'description',11    'stats[]',12    'ctas[]',13  ],14})
cms/components/PageBuilder.tsx
1const visibleSections = content.filter(2  (section) => !section.hidden,3)45switch (section._type) {6  case 'uddannelsesHero':7    return <UddannelsesHero key={section._key} {...props} />8  // … 35 more9}

Fields abridged from the real schema. Every section has a hidden switch, and the renderer drops hidden ones before it maps the rest. Try it.

Chapter 03Content model

A schema shaped like the school.A schema shapedlike the school.

The problem

The same modules and teaching days repeat across programmes, cities and classes.

The call

Programmes and modules as documents. Each class points at its modules by reference: reused, never added twice, their days numbered for you.

The result

One edit updates the schedule, the PDF, the programme card and the long-term plan.

Modulesdocuments

module · in 2 classes

Fundament

3 dage

module · in 1 class

Bekymring

2 dage

module · not in a class yet

Grublerier

2 dage

Drag a module into a class. Add a day to one and watch it reach every class that uses it.

Classes in MCT-terapeutteams[] · references

Hold 1· Aarhus

modules[]

FundamentBekymring

days · numbered for you

12345

ScheduleDates PDFCardPlan

Hold 2· Ballerup

modules[]

Fundament

days · numbered for you

123

ScheduleDates PDFCardPlan

(Not a mock-up)

Not mock-ups. The real thing.Not mock-ups.The real thing.

Two of the school's components, copied from the repo and running on this page with their live content. Just keep scrolling: the hero turns into a bento, and the programme's four parts fly from a stack into a grid.

psykoterapeuterne.com/terapiLive component
A student explaining a point
A student listening at a teaching day
Two teachers talking in the glass hall
Metakognitiv Terapi

Metakognitiv terapi mod stress, angst og depression

Metakognitiv terapi (MCT) er en evidensbaseret og skånsom behandlingsform, der hjælper dig med at skrue ned for tankemylder og bekymringer – uden at grave i fortiden. Du lærer at styre din opmærksomhed med konkrete redskaber, og de fleste oplever markant bedring efter 6–8 sessioner.

Students talking at a table
A student resting her chin on her hand
cms/components/hero/ScrollMotionHero.tsx442 lines · motion
psykoterapeuterne.com/uddannelser/mct-terapeutLive component
Læringsforløb

Uddannelsens fire dele

Fra teoretisk fundament til selvstændig klinisk praksis. Hver fase bygger systematisk på hinanden gennem 178 undervisningstimer, der udvikler både teoretisk indsigt, praktiske færdigheder og professionel selvrefleksion.

Del 01

Her lærer vi basis
Teori, metode & færdighedstræning

Forstå og anvend den metakognitive model i praksis.

82timer

Del 02

Her lærer vi i fællesskab
Feedback & selvreflektion

Udvikl din terapeutiske stil gennem supervision.

48timer

Del 03

Vi vender det der er svært
Supervision

Arbejd med egne klienter under vejledning.

48timer

Del 04

Lær i fællesskab
Tilrettelagt studiegruppe

Struktureret gruppearbejde og refleksion.

29timer
dele

Uddannelsens fire dele

Fra teoretisk fundament til selvstændig klinisk praksis. Hver fase bygger systematisk ovenpå den forrige.

cms/components/education-page-sections/Læringsforløb.tsx311 lines · motion
Chapter 04Enrolment & data

A reservation that remembers.A reservationthat remembers.

The problem

Reserving a seat on a long programme is a big decision. People leave halfway, and on launch morning everyone clicks at once.

The call

Steps derived from the programme, a draft saved 1.2 s after typing stops, and discounts claimed under a Postgres lock.

The result

Nobody starts over, and 30 discounts means exactly 30, however hard they click.

  1. 1Type a name and email
  2. 2Close the tab
  3. 3Come back
Tilmeld · Psykoterapeuterne
🔒 psykoterapeuterne.com/tilmeld

MCT-terapeut

Uddannelse
Navn & email
Lokation & start
Egenterapi
Faktura & betaling

Navn & email

hold_tilmelding_drafts

Postgres

idnull
fornavnnull
emailnull
current_stepnull
savesnull

Nothing yet. Type in the form.

Launch morning

08:59:57

The waitlist clicks at once. The first 30 get 10% off.

the waitlist, clicking

pg_advisory_xact_lock
0 claims through

123456789101112131415161718192021222324252627282930

claimedon an enrolmenthanded back

claim_signup_launch_discount(): one lock per launch, the lowest free seat of 30, or none.

Chapter 05Accounts & payments

Paid once, granted once.Paid once,granted once.

The problem

Courses and a Plus membership, paid through Stripe. Access has to land on the right account, and Stripe can send the same event twice.

The call

One webhook for both. The signature is checked before anything runs, and the same event delivered twice changes nothing.

The result

Card, MobilePay or Klarna, and the course is on the account as soon as Stripe confirms.

14:02

Kurser

Lær i dit eget tempo

Låst

Minikursus i metakognitiv terapi

11 moduler · Livstidsadgang

499 kr.
Låst

Minikursus i ACT

14 moduler · Livstidsadgang

499 kr.
SStripePayments

waiting for a payment

NWebhookNext.js route

/api/webhooks/stripe

CClerkAccounts

Mette's account

Trace

Waiting for a purchase

Signature check

Runs on every request before anything else.

stdout

The signature is computed in your browser, the way Stripe signs and constructEvent checks it, with a demo secret. Timings are illustrative; the order, the checks and the log lines are the real route's.

Chapter 06Study advisor

An advisor that knows the school.An advisor thatknows the school.

The problem

Most visitors don't know which of ten programmes suits them, and staff can't answer at midnight.

The call

Claude answers from the school's own data. Live today: a streaming chat on every page. Built next: an advisor that answers in JSON the widget turns into cards.

The result

Guidance at any hour that sounds like the school, with every conversation saved for the staff.

The request

POST /api/vejleder

System prompt, built from

  • chatbot_videnthe school's knowledge base
  • holds_masterclasses and seats
  • kursus_skabelonprogrammes and modules
  • undervisningsdageupcoming teaching days
  • kampagnerthe campaign discount rule

Rules

Short, warm, plain Danish. One question at a time. Recommend after three or four. Start small and build up.

Model

claude-haiku-4-5 · AI SDK generateText

The response

JSON

✳StudievejlederenFå hjælp til at vælge uddannelse
Din rejse
Jeg er sygeplejerske og vil arbejde med stress

The card advisor: built, not live yet · a sample answer in its real format

Chapter 07Infrastructure

As fast as a CDN, edited by staff.As fast as a CDN,edited by staff.

The problem

With national TV weeks away, the site had to be as fast as a CDN, and staff still had to publish without a developer.

The call

Every content page static, and a Deploy button inside the Studio that rebuilds the site.

The result

Staff publish themselves. When live class data arrived, those pages moved to a one-minute refresh.

The night it airs, everyone opens the site at once.

14 of the site's 38 routes. Built once, when staff press Deploy, and handed to everyone from the edge.

0

pages rendered for 1,320 visitors. They were already built.

Studio

Pages Forside Main Hero

Published

A simulated crowd, with the school's own pages, Studio field and Deploy tool, redrawn here. Minutes and builds are sped up

It didn't go in first time.

The real commit messages, 4 to 27 February. Struck out: undone by a later one.

  1. revalidation 0 during dev
  2. revalidation false
  3. fixed deployment error
  4. fixed middleware
  5. revert middleware
  6. removed revalidation false
  7. revalidate false
  8. force static and revalidate false on pages
  9. static pages
  10. api routes
  11. feat: deployment
(The details)

Small things, done properly.Small things,done properly.

Pieces of the school's site, taken from the repo and running here as they do there. Build the bricks, change page, open the island, join the queue.

MCT, one year

The programmes, as bricks

From /uddannelser. The short courses are part of the longer ones, built in five combinations.

psykoterapeuterne.com
The Forside page
PsykoterapeuterneVi forbereder næste side · et øjeblik

The page transition

Every link on the site: a cream curtain with the logo, 0.32 seconds each way.

Kun de første 30 af 193 får rabat

30 rabatter på 10 %163 andre på listen

A snapshot of the live count.

The waitlist

From /tilmeld, before intake opens: one dot per person, the first 30 get 10% off.

Tap the phone.

The contact island

Circle, pill, card. Open or closed in Copenhagen time.

Åbner snartOptag 2027 · De første 30 sparer 10 %Få besked
––dage
––timer
––min
––sek

The intake countdown

The bar on top of every page, to the second.

(In numbers)

Counted in the repos.Countedin the repos.

74k
Lines of TypeScript in the site
12k
In the Studio
728
Commits across both
38
Page routes
40
API endpoints
36
Page-builder sections
16
Content types
188
Tests in 37 files
3
Scheduled jobs
46k
Lines written in the 26 days before the episode

What I'd do next

  1. 01Run the 188 tests on every push, not only on my machine.
  2. 02Record Stripe event ids, so a repeat is skipped before any write, not only made harmless.
  3. 03Give the advisor's cards a typed schema, validated on the way out, instead of shapes described in the prompt.
Let's talk