Scalable BackendAsync WorkflowsJWT Auth

Subscription
Intelligence
Platform

A production-grade backend system for managing subscriptions, automating reminders, and optimizing recurring expenses through intelligent automation.

Tech Stack

Node.jsExpress.jsMongoDBUpstash (Redis + Workflows)ArcjetJWTNodemailer
01 — The Problem

Money leaves quietly, one forgotten subscription at a time.

Users subscribe to services, forget about them, and keep getting charged. Without a centralized tracking system, there's no visibility into what's being spent or when renewals are due.

Existing solutions are either too simple (spreadsheets) or too expensive (third-party SaaS tools). The gap is a backend system anyone can self-host, own, and extend.

02 — The Solution

A backend system that works while you don't.

01

Subscription Tracking

Full CRUD for subscription records — name, amount, renewal date, category, and status.

POST /api/subscriptions
02

Automated Reminders

Upstash workflows trigger email reminders at 7, 5, 3, 1, and 0 days before renewal.

workflow.trigger()
03

JWT Authentication

Stateless, secure authentication with access tokens. No session state on the server.

Authorization: Bearer <token>
04

Rate Limiting

Arcjet protects all endpoints from abuse, bots, and brute-force attacks.

arcjet.protect()
03 — Architecture

Layered for
clarity.

Each layer has a single responsibility. The client never touches the database. The database never knows about business logic.

Client / API ConsumerREST requests
Express API LayerRoutes + Middleware
Service LayerBusiness Logic
MongoDBPersistent storage
UpstashAsync job queue + workflows
Email ServiceNodemailer reminders
04 — Engineering Decisions

Decisions made with intent.

Decision 01

JWT over sessions

Stateless auth means any service or instance can validate a token without shared session state — ready for horizontal scaling.

jsonwebtoken
Decision 02

Arcjet for protection

Built-in rate limiting, bot detection, and shield rules applied at the middleware level without manual implementation.

arcjet/node
Decision 03

Upstash Workflows for async jobs

Durable, serverless-friendly async execution. If the server restarts, pending jobs are not lost.

@upstash/workflow
Decision 04

Centralized error middleware

A single error handler catches all thrown errors, formats the response, and logs appropriately — no try/catch sprawl.

errorHandler.middleware.js
Decision 05

Clean service-layer separation

Controllers only handle HTTP concerns. Services own the logic. Models own the data shape. Each layer is independently testable.

MVC + Service pattern
05 — Performance & Reliability

Built to stay up.

🛡️

Abuse Prevention

Rate limiting via Arcjet blocks brute-force and bot traffic before it reaches any business logic.

Async Automation

Upstash workflows run entirely outside the request cycle, keeping API response times fast.

🗄️

Optimized DB Schema

MongoDB indexes on userId and renewalDate for fast subscription lookups and filtering.

📋

Request Logging

Middleware-level logging tracks every incoming request for observability and debugging.

06 — Product Thinking
"Not just a tracker. A system that actively saves you money."

Tracking alone is passive. The product thinking behind SubTracker was about intelligent automation — the system should surface the right information at the right time, without the user having to ask.

Reminders at 7, 5, 3, 1, and 0 days. Not because best practice says so — because user testing shows people need multiple nudges to act on financial decisions.

07 — Impact

What this demonstrates.

SaaS-ReadyScalable Backend

Architecture patterns directly applicable to real SaaS infrastructure and microservice environments.

Zero TrustSecurity Model

JWT stateless auth + Arcjet protection shows understanding of layered, production-grade security.

AutomatedReliability System

Async workflows via Upstash demonstrate mastery of event-driven and background job architectures.

system design summary

const stack = "Node.js + Express + MongoDB";

const auth = "JWT stateless";

const jobs = "Upstash async workflows";

const security = "Arcjet rate limiting";

// production-grade. self-hostable. scalable.

Want to see more?

Let's build something
production-ready.