A startup building a mobile app for everyday mental wellness needed a backend that its mobile developer could rely on from the first sprint. The app combines guided practices, mood check-ins, an adaptive questionnaire and a personal plan, so content had to be editable by non-developers, personalisation had to use AI, and the whole system had to stay secure and inexpensive to run.
Solution
I built a TypeScript REST API on Bun and Express with Zod-validated configuration, OpenAPI docs and structured errors. Firebase handles auth and Firestore data, OpenAI turns questionnaire answers into personalised insights and plans, and media lives in Cloudflare R2 and Images. Content editors work in a FireCMS admin with custom fields and R2 uploads. Vitest integration tests cover the API, and both services ship as Docker images to AWS ECS behind an ALB, provisioned with Terraform and deployed from GitLab CI.
Key features
Personalised daily plan, progress tracking and a practices library
Mood check-ins that drive which practices the app suggests
Adaptive quiz, AI-generated personal plan and commitment contract
FireCMS admin for topics, practices, quiz questions, emotions and streak rewards
OTP two-factor auth with QR enrolment; Sentry error tracking
Outcome
Backend, admin panel and AWS infrastructure delivered over nine months; 150+ commits
Stack
TypeScript, Bun + Express, Firebase, FireCMS / React, OpenAI, Cloudflare R2, AWS ECS, Terraform, GitLab CI