
Enterprise Subscription Management & Reminder System
Designed and built a scalable subscription management system tailored for enterprise SaaS platforms — combining intelligent automation, secure multi-tenant architecture, and real-time lifecycle tracking to streamline subscription operations.
- Role
- Backend / Full-Stack Developer
- Timeline
- Feb 2025 - Mar 2025 (2 months)
- Stack
- Node.js, Express, MongoDB, Mongoose
The Problem
Modern SaaS businesses require reliable systems to manage subscription lifecycles, automate reminders, and ensure secure multi-tenant operations. Many existing solutions lack flexibility, scalability, or the ability to handle complex workflows with enterprise-grade reliability.
Architecture
Built on a modular Node.js/Express architecture with MongoDB, leveraging serverless workflows for asynchronous task execution and a secure multi-tenant RBAC system.
Implementation

Scalable API & Multi-Tenant Architecture
Developed a robust RESTful API using Node.js and Express with MongoDB and Mongoose for schema management. Designed the system to support multi-tenant environments with isolated data handling and scalable query performance.

Serverless Automation & Workflow Orchestration
Integrated Upstash QStash to orchestrate automated reminder workflows with durable execution. Implemented multi-stage notification sequences (7, 5, 2, 1 days) with retry logic and failure handling for reliability.
import dayjs from "dayjs";
// Handle subscription state transitions
function transitionSubscription(subscription, action) {
const { status, renewalDate } = subscription;
// Ensure only active subscriptions proceed
if (status !== "active") return status;
const today = dayjs();
const renewal = dayjs(renewalDate);
// Auto-expire if past renewal date
if (renewal.isBefore(today, "day")) {
return "expired";
}
switch (action) {
case "pause":
return "paused";
case "resume":
return "active";
case "cancel":
return "canceled";
case "renew":
return "active"; // resets lifecycle
default:
return status; // no change
}
}Subscription Lifecycle Engine & State Management
Engineered a robust state machine to manage subscription lifecycle transitions across key states including trial, active, paused, canceled, and expired. Designed deterministic transition rules to ensure only valid state changes occur, preventing inconsistent or invalid subscription behavior. Automated lifecycle events such as trial-to-active conversion, renewal handling, expiration checks, and pause/resume flows to reduce manual intervention. Integrated the state engine with background workflows and reminder systems to keep subscription status synchronized across asynchronous processes. Ensured data consistency and reliability across all user interactions, API operations, and scheduled jobs by centralizing state logic and maintaining a single source of truth for subscription status.

Security, Performance & Admin Systems
Implemented JWT authentication with RBAC roles (admin, manager, support, user) alongside Arcjet rate limiting and email verification. Optimized performance using pagination, field selection, and efficient queries. Built admin dashboards for monitoring subscriptions, workflows, and analytics.
Results
Lessons & Growth
This project pushed me to move beyond building features and focus on designing systems that can scale reliably in real-world SaaS environments. I gained hands-on experience with multi-tenant architecture, serverless workflow orchestration, and managing complex business logic through a centralized state machine. It also strengthened my understanding of security (RBAC, rate limiting) and performance optimization at scale, where decisions like query efficiency and pagination matter. Overall, it helped me transition from writing backend code to thinking more like a systems engineer—designing for reliability, scalability, and long-term maintainability.