BrightLife Membership Platform (Backend)
Layered SPA + modular monolith Django REST API with JWT authentication, payment verification, automated receipt generation, and VPS deployment for healthcare membership management.
.png)
Overview
BrightLife Backend is a production-grade Django REST API designed for the Bangladesh healthcare market. It powers a decoupled React/Vite SPA via an HTTPS edge (Nginx → Gunicorn → Django) while PostgreSQL and dedicated media storage manage transactional data. The modular monolith handles the complete membership lifecycle: JWT-based authentication, multi-step application processing with nested serializers, nominee/share validation, payment verification with screenshot uploads, and auto-generated receipts with QR codes, all deployed on VPS with SSL/TLS.
Key Results
The Challenge
BrightLife Health Services needed a robust backend API to power their digital membership platform. Their existing system had no proper API layer:
- No REST API - Frontend had to rely on form submissions and page reloads
- No authentication system - Shared admin passwords with no token-based auth
- No payment verification API - Confirmations via WhatsApp with no audit trail
- No receipt generation endpoint - Receipts created manually without unique numbers
- No nominee validation - Share percentages calculated manually without backend validation
- No file upload handling - Documents stored locally without proper media management
- No API documentation - Developers had no reference for endpoint integration
They needed a modern REST API with JWT authentication, proper data validation, file handling, auto-generated receipts, and comprehensive API documentation.
The Solution
I formalized architecture patterns that keep the platform production-ready, independently deployable, and future-proof:
Layered SPA Deployment
React/Vite SPA communicates exclusively via HTTPS with Nginx terminating SSL, proxying to Gunicorn and Django, while PostgreSQL and dedicated media storage manage persistence for clear presentation → edge → application → data separation.
Modular Monolith
Package-by-feature Django modules (users, membership, payments, core services) own their models/serializers/viewsets, with shared authentication, permissions, and utilities centralized to keep the codebase cohesive without microservice overhead.
Resource-Oriented REST API
Versioned /api/v1 endpoints built with DRF are stateless, JWT-secured, and organized around resources, following a schema-first approach with auto-generated Swagger and ReDoc documentation for backward-compatible integrations.
Operational Readiness
AlmaLinux VPS hardened with Nginx SSL termination, Gunicorn workers, PostgreSQL 15, and systemd services to support independent frontend/backend releases and straightforward scaling paths.
Key Features
JWT Authentication
Secure token-based auth with access + refresh rotation, token blacklisting, and role-based permissions.
Nested Serializers
Complex form handling with nested data structures for nominees, addresses, and medical history.
Share Validation
Custom validator ensuring nominee share percentages equal exactly 100% with detailed error messages.
Payment API
Screenshot upload endpoint with transaction ID tracking, bKash/Nagad/Bank support, and admin verification workflow.
Receipt Generation
Auto-generated unique receipt numbers with QR code generation and PDF-ready response data.
API Documentation
Swagger UI + ReDoc with complete endpoint documentation, authentication flows, and request/response samples.
Tech Stack
Framework
Authentication
Database
File Handling
Documentation
DevOps
Screenshots
.png)
Django Admin - Site Administration with Membership & Payment Management
.png)
OpenAPI Swagger UI - REST API Documentation with Auth & Membership Endpoints
.png)
ReDoc Documentation - Detailed API Schema with Request/Response Samples
.png)
API Endpoint Structure - Authentication, Membership, and Payment Routes
.png)
Nested Serializer Schema - Complex Form Data Handling
.png)
Django Admin Dashboard - Application & Payment Verification Workflow
Achievements
- Automated 95% of previously manual application processing
- Reduced data entry errors from ~15% to <1% with validation
- 100% audit trail for all payment verifications
- Generated 1,000+ PDF-ready receipts automatically with QR codes
- Zero security incidents since launch with JWT + HTTPS
- Mobile-friendly design increased application submissions by 40%
- Admin workload reduced by 80%
- API response time < 200ms average
- Documented layered SPA → edge → application → data model for dev + ops alignment
- Modular monolith guidelines keep feature teams shipping without microservice overhead
The BrightLife platform transformed our membership management completely. What used to take our team 3+ hours of manual processing is now done automatically in minutes. The payment verification system with auto-receipts saved us countless hours and eliminated disputes. Highly recommended for any healthcare organization looking to modernize their membership management!
Related Projects
.png)
BrightLife Membership Platform (Frontend)
Modern React TypeScript application with multi-step forms, real-time validation, PDF generation, and optimized performance for healthcare membership management.
.png)
Arriva Soft Digital Platform
Modern React TypeScript corporate website with hero carousel, mega menu navigation, interactive dashboards, and responsive design for digital transformation services.
Thinkland Learning Lab
Remote-first curriculum platform with live coding lessons and student analytics.