Jens Danneels, back to home page
NL, Nederlands

Full Stack Development

Dogs in Balance

Client
Bachelor's Thesis
Tools
TailwindCSS
PostgreSQL
NextJS
PayloadCMS
Year
2025

At a glance

Context
Bachelor's thesis, Arteveldehogeschool, 2025
My role
Full-stack developer
The problem
Dog owners find plenty of advice online, but much of it contradicts itself, online courses give no feedback from a real trainer, and classes at fixed times are hard to fit into a busy week.
What I built
  • E-learning by subscription: courses split into chapters of video and quiz lessons, with saved progress and a certificate when you finish
  • Course videos on Mux with signed playback links that expire after an hour
  • Group and private sessions with trainers, booked and paid online, plus a trainer portal with a calendar
  • A webshop with a cart, Stripe Checkout and stock that goes down after each sale
The hard part
Three kinds of payment run through one Stripe account: session bookings, webshop orders and the e-learning subscription. Stripe reports a finished payment by calling a webhook, so one handler reads what was bought from the checkout's metadata: a booking is confirmed and the session's seat count goes up, an order is marked paid and stock goes down. Bookings and orders are saved as pending before the customer goes to Stripe, and the webhook only changes them while they are still pending, so a webhook Stripe sends twice does nothing the second time. An abandoned checkout cancels its pending booking. For the subscription, Stripe's update and cancel events set the user's subscription status, and the course pages check it, so access follows billing without anyone touching the admin.
What I'd do differently
Free seats are checked before payment, but a seat only counts once the payment is in, so two people paying for the last seat at the same moment could both get it. Next time I'd hold the seat while the customer is in checkout and release it when the checkout expires. The data model already has a field for those holds; I didn't get to finish it.
Outcome
A working platform for courses, trainer sessions and a webshop, with payments, order emails and all content managed from one Payload admin.

Project Details

The idea

Dogs in Balance was my bachelor's thesis: one place for what a dog owner needs. Advice online is plentiful but often contradictory, online courses give no feedback from a real trainer, and group classes at fixed times are hard to fit into a busy week.

How it works

  • E-learning: with a subscription, owners follow courses at their own pace. Each course is split into chapters of video and quiz lessons, progress is saved, and finishing a course issues a certificate with its own ID.
  • Trainings: trainers publish group or private sessions. A session's end time and number of seats come from the training it belongs to, and owners book and pay for a seat online.
  • Webshop: products with a cart and Stripe Checkout; stock goes down once a payment comes in.

Under the hood

Next.js and Payload CMS on PostgreSQL, with Stripe for payments and subscriptions, Mux for video and Vercel Blob for uploads. Payload is both the data layer and the admin panel, so courses, trainings, products, orders, blog posts and vacancies are all managed in one place.