Home
Softono
y

yaser-123

Professional software vendor delivering innovative solutions on the Softono platform. Specialized in both open-source and proprietary software development.

Total Products
1

Software by yaser-123

PayLoop
Open Source

PayLoop

<div align="center"> # ๐Ÿ”„ PayLoop ### *Smart Subscription Management & Automated Reminder System* [![Node.js](https://img.shields.io/badge/Node.js-43853D?style=for-the-badge&logo=node.js&logoColor=white)](https://nodejs.org/) [![Express.js](https://img.shields.io/badge/Express.js-404D59?style=for-the-badge)](https://expressjs.com/) [![MongoDB](https://img.shields.io/badge/MongoDB-4EA94B?style=for-the-badge&logo=mongodb&logoColor=white)](https://mongodb.com/) [![JWT](https://img.shields.io/badge/JWT-black?style=for-the-badge&logo=JSON%20web%20tokens)](https://jwt.io/) *Never miss a subscription renewal again with intelligent automated reminders* [๐Ÿš€ Live Demo](https://payloop-r4mr.onrender.com/) โ€ข [๐Ÿ“– Documentation](#-api-documentation) โ€ข [๐Ÿ› ๏ธ Installation](#-quick-start) </div> --- ## โœจ What is PayLoop? PayLoop is a **comprehensive subscription management ecosystem** that transforms how you track and manage recurring payments. Built with enterprise-grade security and intelligent automation, it delivers personalized renewal reminders through sophisticated workflow orchestration. ### ๐ŸŽฏ **Core Value Proposition** - **Zero Missed Renewals**: Advanced 4-tier reminder system (7โ†’5โ†’2โ†’1 days) - **Enterprise Security**: Multi-layered protection with Arcjet integration - **Intelligent Workflows**: Upstash-powered automation that adapts to your schedule - **Universal Compatibility**: Support for all major payment methods and currencies --- ## ๐Ÿš€ **Key Features** <table> <tr> <td width="50%"> ### ๐Ÿ” **Security & Authentication** - JWT-based secure authentication - Arcjet bot detection & rate limiting - Password encryption with bcrypt - Role-based access control ### ๐Ÿ“Š **Smart Management** - Real-time subscription tracking - Automated renewal calculations - Multi-currency support (USD, EUR, GBP, INR) - Flexible billing cycles </td> <td width="50%"> ### ๐Ÿ”” **Intelligent Reminders** - 4-tier reminder system (7, 5, 2, 1 days) - Workflow state management - Email template customization - Timezone-aware scheduling ### ๐Ÿ’ณ **Payment Integration** - Credit Card, PayPal, Bank Transfer - Subscription categorization - Price tracking & analytics - Status monitoring (Active/Inactive/Pending) </td> </tr> </table> --- ## ๐Ÿ› ๏ธ **Tech Stack** <div align="center"> | **Backend** | **Database** | **Security** | **Workflow** | **Tools** | |-------------|--------------|--------------|--------------|-----------| | Node.js + Express | MongoDB + Mongoose | Arcjet + JWT | Upstash Workflow | Day.js + Nodemailer | </div> --- ## โšก **Quick Start** ### Prerequisites ```bash Node.js v16+ | MongoDB | Upstash Account | Arcjet Account ``` ### 1๏ธโƒฃ **Clone & Install** ```bash git clone https://github.com/Yaser-123/PayLoop.git cd PayLoop npm install ``` ### 2๏ธโƒฃ **Environment Configuration** Create `.env.development.local`: ```env # Server Configuration PORT=5500 SERVER_URL=http://localhost:5500 NODE_ENV=development # Database DB_URI=your_mongodb_connection_string # Authentication JWT_SECRET=your_super_secure_jwt_secret JWT_EXPIRES_IN=1d # Security (Arcjet) ARCJET_KEY=your_arcjet_key ARCJET_ENV=development # Workflow Engine (Upstash) QSTASH_URL=http://127.0.0.1:8080 QSTASH_TOKEN=your_qstash_token # Email Service EMAIL_PASSWORD=your_gmail_app_password ``` ### 3๏ธโƒฃ **Launch Application** ```bash # Development Mode npm run dev # Production Mode npm start ``` --- ## ๐Ÿ“š **API Documentation** ### ๐Ÿ” **Authentication Endpoints** <details> <summary><strong>POST</strong> <code>/api/v1/auth/sign-up</code> - Register New User</summary> ```http POST /api/v1/auth/sign-up Content-Type: application/json { "name": "Mohamed Yaser", "email": "[email protected]", "password": "securePassword123" } ``` **Response:** ```json { "success": true, "message": "User created successfully!", "data": { "userId": "64a7f8b2c1d2e3f4a5b6c7d8", "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..." } } ``` </details> <details> <summary><strong>POST</strong> <code>/api/v1/auth/sign-in</code> - User Login</summary> ```http POST /api/v1/auth/sign-in Content-Type: application/json { "email": "[email protected]", "password": "securePassword123" } ``` </details> ### ๐Ÿ“‹ **Subscription Management** <details> <summary><strong>POST</strong> <code>/api/v1/subscriptions</code> - Create Subscription</summary> ```http POST /api/v1/subscriptions Authorization: Bearer <your_jwt_token> Content-Type: application/json { "name": "Netflix Premium", "price": 15.99, "currency": "USD", "frequency": "monthly", "category": "premium", "startDate": "2025-01-15T00:00:00.000Z", "paymentMethod": "credit_card" } ``` **Supported Values:** - **Categories**: `basic`, `premium`, `enterprise` - **Payment Methods**: `credit_card`, `paypal`, `bank_transfer` - **Frequencies**: `daily`, `weekly`, `monthly`, `yearly` - **Currencies**: `USD`, `EUR`, `GBP`, `INR` </details> <details> <summary><strong>GET</strong> <code>/api/v1/subscriptions/user/:userId</code> - Get User Subscriptions</summary> ```http GET /api/v1/subscriptions/user/64a7f8b2c1d2e3f4a5b6c7d8 Authorization: Bearer <your_jwt_token> ``` </details> --- ## ๐Ÿ—๏ธ **Project Architecture** ``` PayLoop/ โ”œโ”€โ”€ ๐Ÿš€ app.js # Application entry point โ”œโ”€โ”€ โš™๏ธ config/ โ”‚ โ”œโ”€โ”€ arcjet.js # Security configuration โ”‚ โ”œโ”€โ”€ env.js # Environment management โ”‚ โ”œโ”€โ”€ nodemailer.js # Email service setup โ”‚ โ””โ”€โ”€ upstash.js # Workflow client โ”œโ”€โ”€ ๐ŸŽฎ controllers/ โ”‚ โ”œโ”€โ”€ auth.controller.js # Authentication logic โ”‚ โ”œโ”€โ”€ subscription.controller.js # Subscription operations โ”‚ โ”œโ”€โ”€ user.controller.js # User management โ”‚ โ””โ”€โ”€ workflow.controller.js # Automated workflows โ”œโ”€โ”€ ๐Ÿ—ƒ๏ธ database/ โ”‚ โ””โ”€โ”€ mongodb.js # Database connection โ”œโ”€โ”€ ๐Ÿ›ก๏ธ middlewares/ โ”‚ โ”œโ”€โ”€ arcjet.middleware.js # Security layer โ”‚ โ”œโ”€โ”€ auth.middleware.js # JWT verification โ”‚ โ””โ”€โ”€ error.middleware.js # Error handling โ”œโ”€โ”€ ๐Ÿ“Š models/ โ”‚ โ”œโ”€โ”€ subscription.model.js # Subscription schema โ”‚ โ””โ”€โ”€ user.model.js # User schema โ”œโ”€โ”€ ๐Ÿ›ฃ๏ธ routes/ โ”‚ โ”œโ”€โ”€ auth.routes.js # Authentication routes โ”‚ โ”œโ”€โ”€ subscription.routes.js # Subscription routes โ”‚ โ”œโ”€โ”€ user.routes.js # User routes โ”‚ โ””โ”€โ”€ workflow.routes.js # Workflow routes โ””โ”€โ”€ ๐Ÿ”ง utils/ โ”œโ”€โ”€ email-template.js # Email templates โ””โ”€โ”€ send-email.js # Email utilities ``` --- ## ๐Ÿ”„ **Intelligent Workflow System** PayLoop's workflow engine automatically: 1. **๐ŸŽฏ Workflow Creation**: Triggers when new subscription is added 2. **๐Ÿ“… Smart Scheduling**: Calculates optimal reminder timing 3. **๐Ÿ”” Multi-Tier Alerts**: 7โ†’5โ†’2โ†’1 day reminder sequence 4. **โšก State Management**: Handles active/inactive/pending states 5. **๐Ÿ›‘ Auto-Cleanup**: Stops workflows for expired subscriptions ### **Workflow Timeline Example** ``` ๏ฟฝ Subscription Created โ†’ ๐Ÿ”„ Workflow Initiated โฐ 7 Days Before โ†’ ๐Ÿ“ง First Reminder โฐ 5 Days Before โ†’ ๐Ÿ“ง Second Reminder โฐ 2 Days Before โ†’ ๐Ÿ“ง Third Reminder โฐ 1 Day Before โ†’ ๐Ÿ“ง Final Reminder ๐Ÿ’ณ Renewal Date โ†’ ๐Ÿ”„ Workflow Complete ``` --- ## ๐Ÿ”’ **Enterprise Security** <table> <tr> <td width="50%"> ### **Authentication Layer** - โœ… JWT token-based auth - โœ… Bcrypt password hashing - โœ… Session management - โœ… Secure headers </td> <td width="50%"> ### **Protection Layer (Arcjet)** - โœ… Rate limiting (token bucket) - โœ… Bot detection & filtering - โœ… Shield protection - โœ… IP-based restrictions </td> </tr> </table> --- ## ๐Ÿš€ **Deployment Guide** ### **Production Environment Setup** 1. **Environment Configuration** ```bash # Create production environment file touch .env.production.local # Set production variables NODE_ENV=production DB_URI=your_production_mongodb_uri ``` 2. **Platform Deployment** (Render/Heroku/Vercel) ```bash # Build command npm install # Start command npm start ``` 3. **Environment Variables** (Set in your hosting platform) - `DB_URI` - Production MongoDB connection - `JWT_SECRET` - Production JWT secret - `ARCJET_KEY` - Production Arcjet key - `QSTASH_TOKEN` - Production Upstash token --- ## ๏ฟฝโ€๐Ÿ’ป **About the Developer** <div align="center"> ### **Mohamed Yaser** *Full-Stack Developer & Software Architect* [![LinkedIn](https://img.shields.io/badge/LinkedIn-0077B5?style=for-the-badge&logo=linkedin&logoColor=white)](https://www.linkedin.com/in/mohamedyaser08/) [![Twitter](https://img.shields.io/badge/Twitter-1DA1F2?style=for-the-badge&logo=twitter&logoColor=white)](https://x.com/tmohamedyaser) [![Portfolio](https://img.shields.io/badge/Portfolio-000000?style=for-the-badge&logo=About.me&logoColor=white)](https://mohdyaser.vercel.app/) [![Gmail](https://img.shields.io/badge/Gmail-D14836?style=for-the-badge&logo=gmail&logoColor=white)](mailto:[email protected]) </div> --- ## ๐Ÿค **Contributing** We welcome contributions! Here's how to get started: 1. **Fork** the repository 2. **Create** a feature branch: `git checkout -b feature/amazing-feature` 3. **Commit** your changes: `git commit -m 'Add amazing feature'` 4. **Push** to branch: `git push origin feature/amazing-feature` 5. **Open** a Pull Request --- ## ๏ฟฝ **License** This project is licensed under the **MIT License** - see the [LICENSE](LICENSE) file for details. --- <div align="center"> ### ๏ฟฝ **PayLoop - Smart Subscription Management** *Built with โค๏ธ by Mohamed Yaser* **โญ Star this repo if you find it helpful!** </div>

Workflow Automation Accounting Subscription Management
14 Github Stars