← All work
EdTech · K-12Sole engineerIn production since March 2026

Kapsül LMS

A production learning platform for Kapsül Hafıza's cognitive-skills curriculum

Next.js 15
TypeScript
PostgreSQL
Drizzle ORM
Multi-role RBAC
iyzico payments
HLS video pipeline
CI/CD
The parametric exercise engine — staff tune parameters against a live preview and publish; 881 exercises come from 52 interactive templates.
The parametric exercise engine — staff tune parameters against a live preview and publish; 881 exercises come from 52 interactive templates.

A multi-role LMS that measures a student's attention, perception and reading skills, then prescribes and delivers the training that targets the gap — with commerce, entitlements and a video pipeline built in.

Client context

Kapsül Hafıza is a Turkish education company specialising in cognitive-skills training — speed reading, memory techniques, mind mapping and study strategy — for school-age students in grades 1 to 12. Their curriculum was mature and proven in person. Their delivery was not: it depended on instructors running exercises manually, scoring paper diagnostics by hand, and tracking cohorts in spreadsheets.

The operational challenge

Cognitive training is not content consumption. It is a measure → prescribe → practise → re-measure loop, and every step of that loop resisted a generic LMS:

Product strategy

The decision that shaped everything else was to treat exercises as parameterised templates, not content records. Rather than authoring 881 separate exercises, the platform ships 52 interactive React templates and stores each exercise as a template reference plus a parameter set — grid rows and columns, target letter, target count, search duration, grade levels. Staff tune sliders against a live preview and publish. Adding a new drill type is an engineering task; adding a new drill is a two-minute authoring task.

The second decision was to make entitlements category-bound and resolved at read time. Packages grant categories, not fixed lists of exercises. When the team adds an exercise to the "attention" category, every family who already owns an attention package gets it immediately — no backfill job, no migration, no support ticket.

The core solution

A single Next.js 15 application on PostgreSQL, serving five roles from one permission model:

Capability What it does
Diagnostic assessments 7 test families (attention, perception, reading, memory, focus, Burdon, a 40-question 360° screen), scored against grade-band thresholds and rendered into levelled narrative reports
Training engine 52 interactive templates, 881 published exercises across 6 categories, per-grade parameter overrides, timed sessions
Curriculum delivery Courses → modules → lessons, HLS video with a distinct variant per grade band, position-level watch telemetry
Class operations Classes, enrolment, manual ordering, homework, live sessions via BigBlueButton
Commerce Package store, iyzico 3DS checkout, refunds, invoice PDFs, a reconciliation cron that settles stuck orders
Entitlements Read-time gate resolving package grants, class prescriptions and individual assignments
Gamification 94 themed badges, points ledger, streaks, leaderboard
Operations Staff analytics, a User-360 support console, audit log, certificate issuance and public verification

Primary workflows

Buy → grant → measure → train. A parent buys a grade-appropriate package. iyzico completes 3DS; both the callback and the webhook fire, so order finalisation is race-guarded and idempotent. Entitlements open. The student takes a diagnostic, the platform scores it against their grade band and produces a levelled report. Teachers see the cohort result and assign exercises. The student trains; sessions, points and badges accrue. After the configured retake interval, they re-test and the delta is visible to staff.

Author once, deliver per grade. A staff member configures an exercise template against a live preview, tags the grade levels it applies to, and publishes. Students in grades 5 and 6 receive it with the parameters set for them; students in grades 7 and 8 receive the same drill tuned differently. Lesson videos follow the same rule — one HLS variant per grade band, transcoded by a background worker.

My role

Sole engineer across product, architecture, implementation and production operations: schema and migration strategy (99 applied migrations), the permission model, the exercise and assessment engines, payments and entitlements, the video pipeline, CI/CD, and live incident response against real user traffic.

Technical approach

Three choices a buyer should care about:

Permissions are declarative, not scattered. A capability registry exposes three primitives — can() for UI, authorize() for mutations, scopedWhere() for list queries. scopedWhere() is the load-bearing one: it returns the tenant-and-ownership predicate that every list query must apply. Migrating pages onto it surfaced two real cross-tenant defects that role-only checks had hidden. A test asserts the registry's shape and blocks deploys.

Risky behaviour ships behind flags with a shadow mode. The entitlement gate ran in shadow first — reporting what it would have blocked — until the production data proved complete. Only then was enforcement switched on. It is on in production today.

The pipeline is the safety net. Eleven checks gate every deploy — typecheck, lint, the permission registry, a design-token ratchet, and behavioural tests for the specific regressions that had previously reached users. Migrations apply before the build; the release is blue/green with a post-deploy health verification. Deploy time was cut from 23 to 10 minutes by reusing unchanged worker images, persisting the build cache on a weekly key, and shipping through a registry instead of copying tarballs.

Outcomes and evidence

Verified against the running application and, for aggregate counts, read-only queries:

No performance-improvement, time-saved or revenue figures are claimed, because none have been measured.

Confidentiality

Published with the client's agreement. Screenshots come from a development instance and are limited to screens with no personal data; cohort, pricing and commerce figures are the client's business data and are withheld.


Need a similar product or workflow? If you are turning a proven offline methodology into a measured, multi-role platform — with the commerce, permissions and media pipeline that implies — I build these end to end.

Screens

Seven diagnostic test families, scored against grade-band thresholds rather than one universal scale.
Seven diagnostic test families, scored against grade-band thresholds rather than one universal scale.
The exercise library across six categories, each exercise a template reference plus a parameter set.
The exercise library across six categories, each exercise a template reference plus a parameter set.
The multi-role operations front door.
The multi-role operations front door.

Captured from a development instance and limited to screens containing no personal data. Production holds records of minors and was never used for capture.

Architecture

System contextscroll to explore
Buy → grant → measure → train → re-measurescroll to explore
← Back to all work