Skip to content

A secure and scalable Subscription Tracker API built with Node.js, Express, and MongoDB. Features include full user authentication, subscription management, Arcjet DDoS protection, and role-based authorization.

Notifications You must be signed in to change notification settings

dagimgetaw/subscription-tracker-api

Repository files navigation

Subscription Tracker API

A secure, scalable, and modern API for managing subscriptions with built-in user authentication, Arcjet protection, and role-based authorization.

Features

  • User authentication (create, update, delete users in protected routes)
  • Reminder workflow (send reminders before renewal dates)
  • Arcjet integration for DDoS/bot protection
  • Role-based authorization middleware
  • RESTful API design
  • Create subscription
  • MongoDB integration with Mongoose
  • Configurable environment with easily switchable "dev" and "prod"

Installation

# Clone the repository
https://github.com/dagimgetaw/subscription-tracker-api.git

# Enter to repo
cd subscription-tracker-api

# Install dependencies
npm install

# Set up your development & production env file and fill the required values
cp .env.development.local
cp .env.production.local

# To start the development server
npm run dev

# To start the production server
npm run prod

Arcjet Middleware

Uses Arcjet to defend against:

  • DDoS attacks
  • Bot traffic
  • Rate limiting

Middleware is applied globally before route handling.

Reminder Workflow

Automatically triggers reminders:

  • 7, 5, 2, and 1 day(s) before subscription renewal
  • Uses Upstash Workflows + Day.js

Tech Stack

  • Backend: Node.js + Express
  • Database: MongoDB + Mongoose
  • Authentication: JWT
  • Workflow: Upstash
  • Security: Arcjet
  • Email Notifications: Nodemailer

Credit to - JSM

About

A secure and scalable Subscription Tracker API built with Node.js, Express, and MongoDB. Features include full user authentication, subscription management, Arcjet DDoS protection, and role-based authorization.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published