A production-ready Subscription Management System API with rate limiting, JWT authentication, email reminders, and workflow automation.
π Table of Contents
- π€ Introduction
- βοΈ Tech Stack
- π Features
- π€Έ Quick Start
- πΈοΈ Snippets
- π Assets
- π Contacts
SubDub is a Subscription Management System API designed to help users track, manage, and get notified about upcoming subscription renewals.
It comes with:
- JWT authentication for secure user sessions
- MongoDB & Mongoose models for subscriptions and users
- Arcjet middleware for bot detection and rate limiting
- Upstash Workflows to schedule email reminders before renewals
- Nodemailer templates for beautiful, responsive reminder emails
- Node.js β runtime environment
- Express.js β web framework
- MongoDB β NoSQL database
- Arcjet β security & rate-limiting middleware
- Upstash QStash β workflows for scheduling reminders
- Nodemailer β email delivery service
β Advanced Rate Limiting and Bot Protection: with Arcjet that helps you secure the whole app.
β Database Modeling: Models and relationships using MongoDB & Mongoose.
β JWT Authentication: User CRUD operations and subscription management.
β Global Error Handling: Input validation and middleware integration.
β Logging Mechanisms: For better debugging and monitoring.
β Email Reminders: Automating smart email reminders with workflows using Upstash.
and many more, including code architecture and reusability
git clone https://github.com/Itssanthoshhere/Subscription-Tracker-Api.git
cd Subscription-Tracker-Api
npm install
Create .env.development.local
:
# PORT
PORT=5500
SERVER_URL="http://localhost:5500"
# ENVIRONMENT
NODE_ENV=development
# DATABASE
DB_URI=
# JWT AUTH
JWT_SECRET=
JWT_EXPIRES_IN="1d"
# ARCJET
ARCJET_KEY=
ARCJET_ENV="development"
# UPSTASH
QSTASH_URL=http://127.0.0.1:8080
QSTASH_TOKEN=
# NODEMAILER
EMAIL_PASSWORD=
npm run dev
API will be running at: π http://localhost:5500
Sample Subscription JSON
{
"name": "Netflix Premium",
"price": 15.99,
"currency": "USD",
"frequency": "monthly",
"category": "Entertainment",
"startDate": "2025-01-20T00:00:00.000Z",
"paymentMethod": "Credit Card"
}
- Arcjet β https://arcjet.com
- Upstash QStash β https://upstash.com
- MongoDB Atlas β https://www.mongodb.com/atlas
- Nodemailer β https://nodemailer.com
π€ Santhosh VS
- GitHub: Itssanthoshhere
- LinkedIn: Santhosh VS
If you liked this project, give it a β and share it with others!