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.