An open API service indexing awesome lists of open source software.

https://github.com/nivindulakshitha/subscription-tracker

Skip the basic CRUD - this Backend is all about building a production-ready Subscription Management System with real users, real money, and real business logic. JWT authentication, database modeling, API architecture, security, automated workflows, and much more!
https://github.com/nivindulakshitha/subscription-tracker

api arcjet expressjs javascript mongodb nodejs upstash

Last synced: about 1 year ago
JSON representation

Skip the basic CRUD - this Backend is all about building a production-ready Subscription Management System with real users, real money, and real business logic. JWT authentication, database modeling, API architecture, security, automated workflows, and much more!

Awesome Lists containing this project

README

          

# πŸš€ Subscription Management System API

## πŸ€– Introduction
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.

## βš™οΈ Tech Stack
- **Node.js** - JavaScript runtime
- **Express.js** - Web framework
- **MongoDB & Mongoose** - Database & ORM

## πŸ”‹ Features

βœ… **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**.

## πŸš€ Getting Started

### πŸ”§ Installation

1. Clone the repository:
```sh
git clone https://github.com/your-username/your-repo.git
cd your-repo
```

2. Install dependencies:
```sh
npm install
```

3. Set up environment variables:
- Create a `.env` file in the root directory.
- Add required credentials like JWT_SECRET, DB_URI, etc.

4. Start the development server:
```sh
npm run dev
```

---

## πŸ— API Endpoints

| 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.**

---

## 🎯 Contributing

πŸ’‘ Contributions are welcome! Feel free to submit issues or pull requests.

1. Fork the repository
2. Create a new branch: `git checkout -b feature-branch`
3. Commit changes: `git commit -m "Added new feature"`
4. Push: `git push origin feature-branch`
5. Open a Pull Request

## πŸ“œ License

This project is licensed under the **MIT License**.

### ⭐ If you found this useful, don’t forget to give a star! 🌟