A secure, scalable, and modern API for managing subscriptions with built-in user authentication, Arcjet protection, and role-based authorization.
- 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"
# 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 prodUses Arcjet to defend against:
- DDoS attacks
- Bot traffic
- Rate limiting
Middleware is applied globally before route handling.
Automatically triggers reminders:
- 7, 5, 2, and 1 day(s) before subscription renewal
- Uses Upstash Workflows + Day.js
- Backend: Node.js + Express
- Database: MongoDB + Mongoose
- Authentication: JWT
- Workflow: Upstash
- Security: Arcjet
- Email Notifications: Nodemailer
Credit to - JSM