A Node.js REST API for subscription management with automated renewal reminders, budget tracking, and analytics.
- JWT authentication | Subscription CRUD | Email reminders (7, 5, 2, 1 days)
- Budget tracking | Analytics | Price history | Health scores
- Trial management | Webhooks | Export (JSON/CSV) | Rate limiting
Prerequisites: Node.js v18+, MongoDB
git clone https://github.com/nazarli-shabnam/renewly.git
cd renewly
npm installCreate .env.development.local:
PORT=3000
NODE_ENV=development
SERVER_URL=http://localhost:3000
DB_URI=mongodb://localhost:27017/renewly
JWT_SECRET=your-secret-key
JWT_EXPIRES_IN=7d
ARCJET_KEY=your-arcjet-key
QSTASH_TOKEN=your-qstash-token
QSTASH_URL=https://qstash.upstash.io/v2
EMAIL_USER=your-email@gmail.com
EMAIL_PASSWORD=your-gmail-app-passwordnpm run devAuthentication: POST /api/v1/auth/sign-up, sign-in, sign-out
Subscriptions: GET|POST|PUT|DELETE /api/v1/subscriptions, PUT /:id/cancel, GET /upcoming-renewals, GET /analytics, GET /export, GET /:id/price-history, GET /:id/health-score, GET /trials
Users: GET /api/v1/users/:id, GET|POST|PUT /budget, GET|PUT /notifications
Webhooks: GET|POST|PUT|DELETE /api/v1/webhooks
curl -X POST http://localhost:3000/api/v1/subscriptions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_TOKEN" \
-d '{"name": "Netflix", "price": 15.99, "currency": "USD", "frequency": "monthly", "category": "entertainment", "paymentMethod": "Credit Card", "startDate": "2024-01-01"}'Node.js | Express.js | MongoDB | JWT | Arcjet | Upstash QStash | Nodemailer
Made with ❤️ by @nazarli-shabnam