Skip to content

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!

License

Notifications You must be signed in to change notification settings

nivindulakshitha/Subscription-Tracker

Repository files navigation

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

    git clone https://github.com/your-username/your-repo.git
    cd your-repo
  2. Install dependencies:

    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:

    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! 🌟

About

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!

Topics

Resources

License

Stars

Watchers

Forks