Skip to content

c2fit Project Overview ​

Purpose ​

c2fit is a mobile cognitive/brain-health assessment product. Users register, complete an entry/medical-history questionnaire, then work through a daily "streak" of six cognitive assessments (Attention Hold/Release, Digit Span Speak, Modified Visuospatial, Drawing Memory, Verbal Memory, Trail Making Test). Results are scored (some via an external speech-recognition service) and shown back to the user as history/charts.

The platform includes a Flutter mobile app, a Go backend-for-frontend (BFF), two Go microservices that generate assessment content and score/store results, and a local content-authoring tool used to build the question pools those services serve.

Main Products ​

ProductAudiencePurpose
Mobile app (c2fit-app-frontend)Patient/end userRegister/login, onboarding questionnaires, daily assessment streak, results/history. 3 build flavors: dev, prod, study (research cohort).
BFF (c2fit-bff)Mobile appFirst-party API for auth, user profile, bundle, journey lifecycle, streak (backed by MongoDB + Redis); also reverse-proxies to Assessment Service, Result Service, and a speech/ASR WebSocket.
Assessment Service (c2fit-assessment-result, cmd/assessment)BFF (proxy)Serves question pools and generates per-user assessment journey paths.
Result Service (c2fit-assessment-result, cmd/result)BFF (proxy)Accepts assessment submissions, scores them (task-specific engines + external ASR for Digit Span Speak), stores/retrieves results.
Assessment content tool (c2fit-assessment-dashboard, internal name dm_question_maker)Internal/content teamDeprecated/unsupported. Local React + SQLite tool to author, import/export question pools and assessment paths (not a deployed service — no CI, no .env, no live API calls found). Hand-off: exported JSON is manually copied into c2fit-assessment-result/seed/*.js, then applied to MongoDB via a manual mongosh migration script (seed/migrate.sh) — no live DB link or automated pipeline between the two repos.
Web redirect (c2fit.aimet.tech)Mobile app / universal linksIntermediate web page that redirects to the AIMET C2Fit page ↗; exists to support iOS/Android universal links, not a standalone product surface.
TMT question generator (c2fit-tmt-generate-question)Internal/content teamTrail Making Test question-generation tool, deployed via AWS Amplify. Open the TMT question generator ↗.

There is no staff-facing backoffice/admin web app for c2fit today — c2fit-bff exposes /admin/v1/* routes (import users, change user password), called directly via API-client tooling (curl, Bruno), not through any UI. Open the UX ownership notes →.

Environments ​

EnvironmentApp flavorFirebase projectBackend deployPublic API host
DevreleaseDevOpen c2fit-app-dev in Firebase ↗ECS services c2fit-bff-dev / c2fit-assessment-dev / c2fit-result-dev, cluster c2fit-backend, triggered by push to dev; own Cognito user pool, own Redis, shares a MongoDB Atlas cluster (dmind-prescreening-back...) with dmind's dev environmentapi.dev.c2fit.aimet.tech. Open the topology →
ProdreleaseProdc2fit-appECS services c2fit-bff-prod / c2fit-assessment-prod / c2fit-result-prod, cluster c2fit-backend; own Cognito user pool, own ElastiCache Redis, dedicated MongoDB Atlas cluster (c2fit-backend-prod). Open the backend deployment process →api.c2fit.aimet.tech
StudyreleaseStudyOpen c2fit-app-study in Firebase ↗Own dedicated ECS services — c2fit-bff-study / c2fit-assessment-study / c2fit-result-study, same c2fit-backend cluster, fronted by the same ALB (c2fit-backend-alb) as prod via host-header routing — not simply "the same backend as dev/prod". MongoDB is the same shared Atlas cluster (dmind-prescreening-back...) as dev, not prod's dedicated cluster; study's Redis endpoint was not independently re-verified. Open the topology →.api.study.c2fit.aimet.tech (same ALB as prod, routed by HTTP host-header)

Frontend flavor selection is independent of backend branch/environment — all three Firebase flavors share one .env file whose BASE_URL is supplied at build time. Open the repository map for environment variables →.

System Boundaries ​

c2fit depends on:

  • AWS ECS (cluster c2fit-backend, account 564141170168, region ap-southeast-1), ECR, MongoDB, Redis, S3 for backend infrastructure.
  • AWS Cognito for identity/auth (BFF).
  • AWS SES/SNS for email/notifications (BFF).
  • global-asr-service — a separate internal AIMET speech-recognition microservice, used by Result Service to score Digit Span Speak submissions (same shared ASR platform referenced in digital-thai-moca's infrastructure doc, run on the same AWS account).
  • Google Speech-to-Text — present in Result Service config as an alternate/legacy transcription provider; global-asr-service is the currently active path.
  • Firebase (per-flavor projects: c2fit-app-dev, c2fit-app, c2fit-app-study) for mobile app distribution and analytics.
  • Sentry for error tracking (mobile app and BFF).
  • Smartlook for mobile session replay.

Transfer Notes ​