From a legacy PHP monolith to a CRM-connected platform built for global reach.
A global non-profit spiritual organization operating across 180+ countries had outgrown its custom PHP platform — a monolith with no CRM connectivity, mounting technical debt, and a scalability ceiling that made every course launch a risk. CloudAlgo led a deliberate full-platform rebuild: a Next.js 14 application with a Node.js backend, Salesforce as the CRM backbone, Stripe for payments and donations, and AWS Cognito for passwordless authentication. The result is a modern, maintainable platform the client has continued to expand for two-plus years — adding course types, membership tiers, content features, and integrations — the clearest signal that the architecture was right.
The challenge
What needed solving.
The client had served its global community for years on a custom PHP platform. But the system had accumulated enough technical debt that every new feature became a negotiation with legacy constraints. More critically, there was no CRM integration: member data, course enrollments, and user activity lived in separate silos with no unified view, no automation, and no path to real-time reporting.
- No CRM connectivity — member records, course enrollments, and user activity lived in separate systems with no single source of truth and no automation between them.
- Feature delivery was slow. New requests required navigating a legacy PHP codebase with no modern tooling, no standardized patterns, and no onboarding documentation for new contributors.
- Traffic spikes during major course launches and enrollment windows pushed the PHP system toward its scalability ceiling.
- Without standardized development patterns, every new contributor increased the risk of regressions and maintenance became progressively harder with every release.
The solution
What we built.
CloudAlgo led a full-platform rebuild — not a gradual migration, but a deliberate re-architecture. The new platform is a Next.js 14 application (React 18, Pages Router) deployed on Heroku, with a Node.js backend that normalizes data contracts across six external systems, Salesforce as the unified CRM backbone, and Heroku Marketing Cloud for campaign and transactional email automation.
Course & Event Platform
A complete enrollment system for in-person courses, online workshops, ticketed events, youth programs, and retreats. Users can discover offerings via geo-based center finder (Google Maps + Autocomplete), register, pay via Stripe with saved payment methods and coupon support, and receive Apple Wallet passes and QR codes for in-person check-in — all within a single cohesive experience.
Authentication & Identity
Authentication runs on AWS Cognito with Cognito Passwordless Auth — enabling one-tap magic link and OTP logins alongside traditional email/password flows. This reduced friction at account creation and login significantly, critical for an audience spanning a wide age range and range of technical comfort across 180+ countries.
Membership & Content Platform
A complete membership lifecycle covering tier selection, billing, renewal, and personalized content gating. The content layer includes Daily Sky (daily inspiration), a guided meditation audio/video library, Ask Gurudev Q&A, a wisdom article and video collection, and a global audio player that persists playback state across page navigation.
Donation Platform
A full donation lifecycle built on Salesforce, Stripe, and Salesforce Community Cloud — one-time and recurring giving options, automated Salesforce sync per transaction, a donor self-service portal (giving history, tax receipts, payment method management), campaign and fund attribution, and Marketing Cloud acknowledgement emails triggered on transaction confirmation. This replaced a manual, spreadsheet-driven process with the organization's first fully auditable, end-to-end donation tracking system.
CRM-Connected Analytics
Every significant user action — page views, course views, checkout initiation, purchases — is tracked through Segment into Salesforce, enabling the marketing team to build audience segments, trigger Marketing Cloud automations, and report on enrollment funnel performance with no manual data entry.
Engineering depth
Technical highlights.
Six External Systems, One Clean Backend Layer
The platform integrates Salesforce, Salesforce Community Cloud, Stripe, AWS Cognito, Segment, and Heroku Marketing Cloud — each with distinct data models and failure modes. CloudAlgo built a Node.js backend layer that normalizes data contracts, handles retries, and decouples the frontend from individual vendor APIs. A Salesforce schema change doesn't cascade into the UI. A Stripe webhook failure doesn't leave the client state inconsistent.
Enforced Conventions at Scale
With a large team and 4,500+ commits over two years, ad-hoc patterns accumulate fast. Enforced conventions kept the codebase navigable: a custom useRouter hook that automatically preserves UTM parameters across every navigation; a useEntityTracking hook that standardizes analytics event payloads so no developer can accidentally fire a malformed track event; Pino structured logging replacing console.log throughout; React Query for consistent server-state management; and global modal and alert context providers preventing z-index conflicts and duplicated state logic scattered across features.
82% SSR Payload Reduction
One major performance initiative reduced a key centers page SSR payload from 228 kB to 42 kB — an 82% reduction — by selectively deferring non-critical data to client-side fetches. Combined with Next.js SWC compilation, WebP image conversion at build time, and ongoing bundle analysis via @next/bundle-analyzer, the platform handles course launch traffic spikes without degradation.
Multi-Environment CI/CD with Sentry Monitoring
Three environments — development, QA, and production — each with distinct API credentials, feature flags, and Salesforce org connections. Heroku pipelines coordinate promotion from QA to production. Sentry monitors error rates post-deploy, and structured Pino logs give the engineering team clean, searchable production visibility without opening a dashboard.
The results
Measurable outcomes.
| Metric | Before | After |
|---|---|---|
| Platform foundation | Legacy PHP monolith — no modern tooling | Next.js 14, React 18, modular architecture on Heroku |
| CRM integration | None — siloed member and enrollment data | Salesforce as unified source of truth for all member activity |
| Donation tracking | Manual, spreadsheet-driven process | Full Salesforce-backed lifecycle with automated receipts and donor portal |
| Authentication | Email/password only | AWS Cognito with passwordless magic link and OTP |
| Feature delivery | Weeks — navigating legacy constraints | Days — clean architecture and reusable components |
| SSR payload (centers page) | 228 kB | 42 kB (82% reduction) |
| Analytics pipeline | No structured pipeline | Segment → Salesforce with full enrollment funnel visibility |
| Deployment | Manual | Heroku multi-environment pipelines with Sentry error monitoring |
The CloudAlgo difference
What this shows about how we work.
We rebuild when rebuilding is right.
A gradual migration would have preserved the constraints of the PHP platform while adding complexity. We made the case for a clean break, designed the new architecture to handle the client's actual integration requirements from day one, and delivered a platform the team could own and extend without re-engaging us for every change.
Integration depth requires an abstraction layer.
Six external systems with distinct data models is a coordination problem, not a configuration problem. Our Node.js backend treats integration complexity as a first-class architectural concern — not something left for the frontend to handle ad hoc.
Enforced conventions pay for themselves.
A custom useRouter hook, a standardized analytics event contract, global context providers for modals and alerts — these feel like overhead in week one. By year two, with 4,500+ commits from a large team, they're the reason the codebase is still navigable and safe to work in.
Ongoing engagement is the real metric.
The strongest signal that a platform was built right is that the client keeps building on it. Two years in, the client is adding course types, membership tiers, content features, and integrations — not rewriting.
Technology stack
Work with us
Facing a similar challenge?
Tell us about your data problem — we'll scope it and respond within one business day.