← Portfolio

/ Case study

MoodWork: the rebuild

A CBT practicum in Telegram: the cabinet split into parts, copy editable without a developer, and Figma and code speaking the same names.

productdesign systemdevelopmentTelegram Mini App
About the product

/ 01 The brief

Edit the copy without touching the code.

MoodWork is a cognitive behavioural therapy practicum in Telegram: a bot, a cabinet, 15 modules and a toolkit of techniques. The product worked, but the cabinet was a single file and the copy was baked into the code: any edit required a build and a deploy.

The interface on the screens is in Russian.

The cabinet home screen

/ 02 What was done

Five layers of one rebuild.

CabinetSplit into 42 partsRight after the split the build produced the same file as the monolith: behaviour did not change.
AdminDraft, publish, roll backModules, techniques, bot copy, mailings and theming. On the right, a phone preview built with the cabinet’s own styles.
Content1,243 entries exported and verified15 modules and 17 techniques. 19 entries are locked from editing: the PHQ-9 questionnaire and the crisis text.
DesignFigma and code share namesEvery Figma variable carries the name of its CSS variable. 29 components, 32 icons, 7 screens built from instances.
AudiencesA third layer of examples“Home and family” — examples in the modules adapt to the reader’s life.

/ 03 Screens

The cabinet and the admin.

Home
HomeThe next step, techniques and today’s tasks.
Modules
Modules15 modules: open, waiting and paid.
Reader
ReaderOne module in three lengths: short, medium, full.
Progress
ProgressPHQ-9 check-ins as a trend line, and a map of the practicum.
Toolkit
ToolkitTechniques unlock as modules are completed.
MoodWork admin
Admin: the list of modules and the phone preview area

Saving is not publishing.

The admin’s rule: any publication can be rolled back

/ 04 Decisions

Three decisions everything rests on.

  1. A custom admin instead of an off-the-shelf CMSThe plan was Payload with a separate database. A custom admin on the product’s own database won: separate hosting did not fit the budget.
  2. Edits sit on top of base contentA broken publication or an unavailable database does not take the product down.
  3. An edit never changes behaviourIDs, access rules and the PHQ-9 questionnaire come from code — the admin cannot change them.

/ 05 Timeline

From audit to staging.

TypeScriptCloudflare WorkersHonogrammYD1Figma
  1. OctoberAudit and contentReview of the source, export of all copy into a catalogue for editing.
  2. NovemberThe rebuildSplitting the cabinet, the admin, the Figma kit, a third audience.
  3. NowStagingChecks on the test bot before release.
  4. NextProductionRelease and the remaining Figma screens.
42cabinet parts
29Figma components
15CBT modules