Skip to content

Rafetikus/renewly

 
 

Repository files navigation

Renewly

A Node.js REST API for subscription management with automated renewal reminders, budget tracking, and analytics.

Features

  • 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

Quick Start

Prerequisites: Node.js v18+, MongoDB

git clone https://github.com/nazarli-shabnam/renewly.git
cd renewly
npm install

Create .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-password
npm run dev

API Endpoints

Authentication: 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

Example

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"}'

Tech Stack

Node.js | Express.js | MongoDB | JWT | Arcjet | Upstash QStash | Nodemailer


Made with ❤️ by @nazarli-shabnam

About

A Node.js REST API for tracking subscriptions with automated email reminders. Features JWT auth, MongoDB, and workflow-based notifications.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • JavaScript 100.0%