HomeCase studiesPeer-Group Accountability & Nutrition Tracking Platform for...

Case study · Brussels, Belgium

Peer-Group Accountability & Nutrition Tracking Platform for Sustainable Weight Management

Health, wellness and behaviour change — weight management and healthy eating

Solo calorie counters and sterile weight charts rarely sustain long-term behavior change once initial motivation fades. We built a social health accountability platform spanning iOS, cross-platform React Native clients, and a Laravel web API hosted on Google Cloud with MySQL, Pusher, and Firebase. Participants join small moderated cohorts to log daily meals, hydration, movement, and check-ins with fine-grained privacy tiers, while real-time Pusher channels and timezone-aware Firebase nudges keep peer support and coach feedback timely without exposing sensitive body metrics publicly.

Industry
Health, wellness and behaviour change — weight management and healthy eating
Solution
An iOS-integrated React Native mobile platform and Laravel web API hosted on Google Cloud, uniting MySQL habit ledgers with Pusher real-time cohort messaging and Firebase reminders.
Platforms
iOS · Cross-platform · Web & API
Stack
Laravel · PHP · React Native · React · MySQL · Firebase
Location
Brussels, Belgium · delivered remotely
Role
Engineering, with the team behind for mobile and QA

Delivered remotely for a business based in Brussels, Belgium. Names withheld by agreement.

Project Overview

Sustainable weight management and healthy eating rarely fail because people lack nutrition charts; they stall when individuals feel isolated, overwhelmed by tedious logging, or discouraged by a single off-plan weekend. Conversely, tossing thousands of strangers into open social feeds often breeds comparison anxiety and unsolicited diet misinformation. Effective behavior change needs structured, small-group accountability combined with empathetic coaching and friction-light daily check-ins.

We architected and delivered a social health accountability platform spanning React Native mobile clients with native iOS HealthKit integration, a React coach portal, and a Laravel/PHP backend deployed on Google Cloud with MySQL, Pusher, and Firebase. Participants build momentum inside curated peer cohorts—sharing meal wins, water goals, and daily reflections—while coaches spot waning engagement early and step in with targeted guidance.

Habit Adherence & Cohort Bottlenecks

Designing a social wellness product for real human behavior required solving subtle technical and product traps:

  • All-or-nothing privacy fear: Users hesitate to join accountability groups if signing up exposes personal scale numbers or sensitive medical goals to strangers.
  • High-friction meal logging: Forcing users to search twenty-field macro databases for every home-cooked lunch causes drop-off within days.
  • Stale, asynchronous group chats: Polling chat endpoints every few seconds drains mobile batteries, yet delayed replies strip peer encouragement of its emotional immediacy.
  • Broken streaks across time zones: Fixed UTC day boundaries unfairly penalize late-evening loggers or travelers, eroding trust in streak mechanics.

Architectural Strategy

Our architecture centers on privacy-tiered data projections and event-driven cohort engagement. Every biometric record, weigh-in, and food journal entry is stored in normalized MySQL tables on Google Cloud SQL under strict ownership rules. Before any feed or chat payload reaches a peer's device, Laravel server-side serializers filter fields dynamically based on the author's granular sharing settings and cohort membership.

To keep social interactions lively without building and maintaining bespoke WebSocket clusters, Laravel authorizes private Pusher Channels per cohort pod, delivering instant check-in reactions, typing state, and coach nudges. For background engagement, Laravel schedules timezone-localized reminder batches through Firebase Cloud Messaging, ensuring prompts arrive when a participant is actually planning breakfast or winding down for the evening.

Core Capabilities

  • Friction-Light Meal & Habit Check-Ins: One-tap meal photo capture, simple portion tags, hydration counters, and optional iOS HealthKit step/weight syncing replace tedious manual data entry.
  • Small-Group Accountability Pods: Automated cohort matching places participants alongside peers with compatible goals and schedules, led by a credentialed coach.
  • Granular Visibility Controls: Users independently toggle whether peers see streak milestones, meal photos, or check-in notes while locking numeric weight curves to self-and-coach view only.
  • Real-Time Pod Messaging & Nudges: Pusher-backed group threads let peers celebrate consistency streaks, send supportive reactions, and join scheduled weekly group challenges.
  • Coach Triage & Adherence Console: A dedicated React web dashboard highlights silent participants, streak breaks, and flagged posts so coaches prioritize human outreach efficiently.

Technical Architecture

The React Native mobile app and React coach console communicate over HTTPS with stateless Laravel API nodes running on Google Cloud. Upon authentication, clients request short-lived Pusher private-channel signatures from Laravel so only verified members of a specific cohort pod can subscribe to its live event stream.

Flow: Mobile Apps (React Native + iOS HealthKit) & Coach Web (React) → Google Cloud Load Balancer → Laravel API → MySQL (Cloud SQL Health Ledger) → Pusher Private Channels (Live Pod Sync) & Firebase (Timezone FCM Nudges) + Cloud Storage (Signed Media)

When a participant logs a meal check-in with an attached photo, the mobile client uploads the compressed image via a signed Google Cloud Storage URL, commits the check-in row to MySQL through Laravel, and triggers a queued job that broadcasts a sanitized summary event over Pusher while alerting the assigned coach if adherence thresholds are met.

Technology Stack

Category Technology detail
Backend API & Cohort Engine Laravel 11 on PHP 8.4 governing check-ins, goals, and privacy rules
Mobile Client & iOS Bridge React Native with React UI plus native iOS HealthKit integration
Real-Time Cohort Messaging Pusher Channels powering private pod chat, nudges, and read presence
Relational Health Ledger MySQL on Google Cloud SQL storing meal logs, streaks, and coach notes
Cloud Infrastructure & Media Google Cloud Run/Compute with encrypted Cloud Storage for meal photos
Push Notifications & Auth Firebase Cloud Messaging for habit nudges and cross-platform alerts
Coach Operations Web Portal React web dashboard tracking cohort adherence and at-risk participants
Media & Async Pipelines Laravel Queue workers generating compressed thumbnails and daily digests
Privacy & Redaction Layer Server-enforced API transformers masking restricted weight/body metrics

Engineering Trade-offs & Solutions

Engineering Challenge Solution & Trade-off
Maintaining custom WebSocket servers on Google Cloud adds ops overhead Delegated live pod chat and presence to Pusher Private Channels authorized by Laravel; trades a managed SaaS dependency for predictable low-latency delivery and zero socket-cluster maintenance.
Native iOS HealthKit APIs are unavailable directly in plain React Native JS Built a focused Swift native module bridged to React Native hooks rather than dropping cross-platform UI sharing across the rest of the app.
Public CDN URLs for meal or progress photos risk unauthorized sharing Stored all user media in private Google Cloud Storage buckets accessed solely through expiring signed URLs generated per authorized pod request.
Evaluating daily habit streaks across global users caused off-by-one errors Persisted user IANA timezones in MySQL and evaluated streak windows in local user time inside scheduled jobs rather than relying on server UTC midnight.

Health Data Privacy & Moderation

Wellness platforms hold deeply personal lifestyle and biometric information. All traffic enforces TLS encryption in transit, while Google Cloud SQL and Cloud Storage apply encryption at rest using managed cloud keys. Laravel policy gates enforce strict cohort isolation: users cannot probe another pod's chat history, member roster, or photo identifiers even by guessing sequential IDs.

Moderating peer dynamics is built directly into the data model. Participants can report concerning dietary comments inside any Pusher thread, immediately flagging the message inside the coach's React triage queue. Coaches can pause peer threads, issue private direct messages, or adjust cohort assignments without disrupting the user's personal historical health log.

Real-Time Messaging & Scale

Social accountability traffic follows pronounced daily rhythms—surging around local breakfast, lunch, and evening reflection windows. Running stateless Laravel containers on Google Cloud lets compute capacity scale smoothly with morning and evening check-in waves, while Pusher absorbs concurrent WebSocket fan-out across thousands of active mobile sockets without straining PHP workers.

Inside React Native, infinite-scroll pod timelines paginate cursor-based MySQL queries and cache compressed meal thumbnails locally, keeping list transitions smooth on mid-range smartphones. Background Laravel queues absorb image resizing, weekly summary generation, and timezone-bucketed Firebase notification dispatches asynchronously.

Operational Outcomes

Combining empathetic peer pods, coach visibility, and friction-light mobile logging reshaped participant consistency across the programme:

  • Confident privacy-preserving sharing: Granular server-enforced visibility tiers let participants celebrate daily nutrition habits with peers without exposing sensitive weight numbers.
  • Immediate peer and coach feedback: Pusher live channels and targeted Firebase nudges turn isolated meal logging into responsive, supportive group encouragement.
  • Proactive coach intervention: Real-time adherence indicators in the React portal help coaches spot quiet dropouts early rather than weeks after disengagement.
  • Unified iOS and cross-platform experience: Seamless HealthKit step and weight syncing complements effortless mobile photo logging inside one cohesive React Native codebase.

01 — Questions

asked about this kind of project

How does the platform protect sensitive weight and health metrics inside social accountability groups?

Every health metric carries explicit visibility scopes enforced inside Laravel API resource transformers before payloads ever leave the server. Participants can share habit streaks, meal photos, and positive check-in badges with their peer pod while keeping exact scale weights, body measurements, and private journal entries visible strictly to themselves and their assigned coach.

Why pair Pusher WebSockets with Firebase Cloud Messaging instead of relying on one messaging layer?

Pusher excels at low-latency, authenticated presence channels while users are actively chatting inside a cohort pod or reacting to meal check-ins, without requiring us to operate custom WebSocket infrastructure on Google Cloud. Firebase Cloud Messaging complements it by waking backgrounded iOS and Android devices reliably for scheduled habit nudges and missed check-in alerts.

How does iOS HealthKit integration work inside a cross-platform React Native codebase?

We implemented a focused native Swift bridge module exposed cleanly to React Native TypeScript hooks. On iOS, users grant granular permissions to sync step counts and weigh-ins automatically into their private Laravel ledger, while cross-platform React Native screens present uniform meal logging and cohort experiences everywhere.

How are habit streaks and daily check-ins calculated fairly across travelers in different time zones?

Every user profile stores their current IANA timezone offset updated passively on mobile app open. Daily check-in windows, streak evaluations, and scheduled Firebase reminder jobs compute boundaries relative to the participant's local midnight rather than a fixed UTC cutoff.

What prevents toxic comparisons or unmoderated advice inside peer groups?

Cohorts are intentionally capped to small, goal-matched pods overseen by a verified wellness coach. Coaches receive real-time moderation flags inside the React web portal, can mute or redact inappropriate posts instantly via Pusher channel events, and rely on positive reinforcement reactions rather than public calorie leaderboards.

How are participant meal photos stored securely on Google Cloud?

Meal and progress images upload directly to private Google Cloud Storage buckets via short-lived signed URLs issued by Laravel. Public unauthenticated URLs do not exist; cohort peers only receive temporary signed access to photos explicitly marked shared within their active pod.

03 — Similar project?

describe what is different about yours

Build yours.

Tell me what exists, what you need and the deadline. Fixed price for a defined scope, or $55/day (8–9 hours work) with a written plan first.

Solitaire Corporate Park, Makarba, Ahmedabad, Gujarat 380015, India · IST (UTC+5:30) · --:-- IST · Mon–Fri 09:00–18:00 IST · US & EU overlap daily

No newsletter, no CRM. Just a reply.