This project is a production-ready Subscription Management System API that handles real users, real money, and real business logic.
🔐 Features include: Authentication with JWTs, database integration with MongoDB, API scalability, and seamless communication with the frontend.
- Node.js - JavaScript runtime
- Express.js - Web framework
- MongoDB & Mongoose - Database & ORM
✅ Advanced Rate Limiting & Bot Protection
- Powered by Arcjet to secure the entire application.
✅ Database Modeling
- Structured with MongoDB & Mongoose to manage users and subscriptions.
✅ JWT Authentication
- Secure login, user management, and subscription handling.
✅ Global Error Handling
- Input validation, middleware integration, and standardized error responses.
✅ Logging Mechanisms
- Efficient logging for debugging and monitoring API performance.
✅ Automated Email Reminders
- Uses Upstash to schedule and send smart email notifications.
🔹 And much more, including clean architecture and code reusability.
-
Clone the repository:
git clone https://github.com/your-username/your-repo.git cd your-repo
-
Install dependencies:
npm install
-
Set up environment variables:
- Create a
.env
file in the root directory. - Add required credentials like JWT_SECRET, DB_URI, etc.
- Create a
-
Start the development server:
npm run dev
Method | Endpoint | Description |
---|---|---|
POST | /api/auth/signup |
Register a new user |
POST | /api/auth/login |
User login with JWT |
GET | /api/users |
Fetch all users (admin only) |
POST | /api/subscription |
Create a new subscription |
GET | /api/subscription/:id |
Fetch subscription details |
📌 More endpoints available in the documentation.
💡 Contributions are welcome! Feel free to submit issues or pull requests.
- Fork the repository
- Create a new branch:
git checkout -b feature-branch
- Commit changes:
git commit -m "Added new feature"
- Push:
git push origin feature-branch
- Open a Pull Request
This project is licensed under the MIT License.