⚙️ PHP / Laravel

🇮🇳 India

You're Wonderful Project (YWP) Digital Platform

CLIENT: Indian | SERVICE: Mental health and Wellness platformt

Project Overview

You’re Wonderful Project  (YWP) is a non-governmental organization (NGO) dedicated to raising awareness about mental health, connecting individuals to mental health professionals, and providing text-based peer support. To scale their impact and streamline their operations, YWP required a comprehensive digital platform. The project involved developing a robust web application to serve as their public hub for resources, alongside a powerful administrative backend to manage dynamic page content, recruitment, publications, and seamlessly process global donations and recurring subscriptions.

Objectives

  1. Centralized Content Management: Provide the YWP team with a dynamic Admin Panel to manage static pages, campaigns, galleries, blogs, policies, and research reports without requiring developer intervention.
  2. Frictionless Donation System: Implement a secure, reliable payment gateway to handle both one-time donations and recurring subscriptions, ensuring supporters have full control over managing or canceling their contributions to support mental health initiatives.
  3. Streamlined Recruitment: Create a portal (“Work with YWP”) to accept, track, and manage applications from professionals, therapists, and volunteers wanting to join the organization’s peer support efforts.
  4. Information Accessibility: Build a structured repository for the organization’s knowledge base, including advisory board details, historical timelines, FAQs, and newsletters to better serve their community.

Challenges

  1. Dynamic Content Architecture: Designing a database and routing structure flexible enough to allow administrators to edit specific sections of various pages (e.g., Mission, History) dynamically to keep mental health resources up to date.
  2. Subscription Lifecycle Management: Handling the complexities of recurring donations, including webhook integration for automated status updates, successful payment captures, and user-initiated cancellations.
  3. Asset Management: Efficiently handling and serving a large volume of media uploads, including high-resolution gallery images, PDF reports, and campaign media, while maintaining fast page load speeds.

Solution Approach

The platform was engineered using a modern, scalable PHP stack, prioritizing maintainability and security.

  1. Framework & Architecture: Built on Laravel 12, leveraging its MVC architecture for clean separation of concerns. This allowed for rapid development of complex features like the comprehensive admin routing and resource controllers.
  2. Payment Gateway Integration: Integrated the Razorpay API to handle complex financial transactions. We implemented custom webhook listeners (/razorpay/webhook) to sync subscription statuses with the local database in real-time.
  3. Dynamic Page Content: Developed a custom PageContentController architecture that allows administrators to target and update specific sections of any public page via a structured, user-friendly interface.
  4. Frontend Tooling: Utilized Vite as the frontend build tool for blazing-fast hot module replacement during development and highly optimized asset bundling for production.

Real-World Difficulties Faced

  1. Webhook Synchronization: During testing, we encountered race conditions where Razorpay webhooks would occasionally arrive out of order (e.g., a subscription creation webhook arriving slightly after a payment success webhook). We resolved this by implementing idempotent webhook handlers and robust database locking mechanisms within Laravel’s queue system.
  2. Testing Payment Flows: Simulating various payment failures and subscription renewals in a local environment was challenging. We built a dedicated /settings/test-razorpay admin interface to easily toggle between test/live modes and trigger simulated events without leaving the dashboard.

Results & Impact

  1. Operational Autonomy: The comprehensive admin dashboard eliminated the organization’s reliance on external developers for content updates, saving significant time and resources.
  2. Reliable Revenue Stream: The implementation of automated Razorpay subscriptions provided YWP with a predictable, recurring revenue stream, with automated receipts and user-managed cancellation flows reducing administrative overhead.
  3. Enhanced Credibility: The structured presentation of Research Papers, Annual Reports, and Policies significantly boosted the organization’s transparency and public trust, which is crucial in the mental health sector.

Key Learnings

  1. Design for Graceful Degradation: When dealing with third-party payment gateways, it is critical to design UI components that handle timeouts gracefully, providing clear feedback to donors rather than generic error pages.
  2. Granular Content Management: Rather than giving admins a single massive WYSIWYG editor for an entire page, breaking pages down into manageable “sections” (as seen in the /page-content/{page}/{section} routing) leads to a much more resilient and visually consistent frontend design.

Tools Used

  1. Backend: PHP 8.2+, Laravel 12 Framework
  2. Frontend Build Tool: Vite
  3. Database: Relational Database (MySQL/SQLite)
  4. Payment Processing: Razorpay API (razorpay/razorpay package)
  5. Testing & Quality Assurance: Pest PHP, Laravel Pint

Conclusion

The “You’re Wonderful Project;” (YWP) platform stands as a highly functional, bespoke solution tailored to the unique needs of a modern mental health NGO. By combining a flexible content management system with a robust, automated donation pipeline, the platform empowers the YWP team to focus on their core mission—providing vital peer support and mental health awareness—rather than administrative bottlenecks.

Want Result Like This

Contact us for better visuals, creative designs, and powerful digital solutions that make your brand stand out.