{"id":30223701,"url":"https://github.com/yaser-123/payloop","last_synced_at":"2026-04-13T12:01:57.230Z","repository":{"id":305157923,"uuid":"1022091939","full_name":"Yaser-123/PayLoop","owner":"Yaser-123","description":"⚡ PayLoop - Subscription management platform with automated workflows, multi-currency support, JWT authentication, and Arcjet security.","archived":false,"fork":false,"pushed_at":"2025-07-18T15:11:42.000Z","size":954,"stargazers_count":12,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-14T12:52:58.484Z","etag":null,"topics":["arcjet","express-api","jwt-auth","mongodb","nodejs","payment-tracking","rest-api","subscription-management","upstash","workflow-automation"],"latest_commit_sha":null,"homepage":"https://payloop-r4mr.onrender.com/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Yaser-123.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-07-18T12:45:11.000Z","updated_at":"2025-08-01T05:02:29.000Z","dependencies_parsed_at":"2025-07-18T17:36:25.719Z","dependency_job_id":"efe9a73c-d9b0-49c0-a5c6-26d34a78074f","html_url":"https://github.com/Yaser-123/PayLoop","commit_stats":null,"previous_names":["yaser-123/payloop"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Yaser-123/PayLoop","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Yaser-123%2FPayLoop","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Yaser-123%2FPayLoop/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Yaser-123%2FPayLoop/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Yaser-123%2FPayLoop/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Yaser-123","download_url":"https://codeload.github.com/Yaser-123/PayLoop/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Yaser-123%2FPayLoop/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31751705,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-13T09:16:15.125Z","status":"ssl_error","status_checked_at":"2026-04-13T09:16:05.023Z","response_time":93,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["arcjet","express-api","jwt-auth","mongodb","nodejs","payment-tracking","rest-api","subscription-management","upstash","workflow-automation"],"created_at":"2025-08-14T12:52:57.305Z","updated_at":"2026-04-13T12:01:57.167Z","avatar_url":"https://github.com/Yaser-123.png","language":"JavaScript","readme":"\u003cdiv align=\"center\"\u003e\n\n# 🔄 PayLoop\n\n### *Smart Subscription Management \u0026 Automated Reminder System*\n\n[![Node.js](https://img.shields.io/badge/Node.js-43853D?style=for-the-badge\u0026logo=node.js\u0026logoColor=white)](https://nodejs.org/)\n[![Express.js](https://img.shields.io/badge/Express.js-404D59?style=for-the-badge)](https://expressjs.com/)\n[![MongoDB](https://img.shields.io/badge/MongoDB-4EA94B?style=for-the-badge\u0026logo=mongodb\u0026logoColor=white)](https://mongodb.com/)\n[![JWT](https://img.shields.io/badge/JWT-black?style=for-the-badge\u0026logo=JSON%20web%20tokens)](https://jwt.io/)\n\n*Never miss a subscription renewal again with intelligent automated reminders*\n\n[🚀 Live Demo](https://payloop-r4mr.onrender.com/) • [📖 Documentation](#-api-documentation) • [🛠️ Installation](#-quick-start)\n\n\u003c/div\u003e\n\n---\n\n## ✨ What is PayLoop?\n\nPayLoop 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.\n\n### 🎯 **Core Value Proposition**\n- **Zero Missed Renewals**: Advanced 4-tier reminder system (7→5→2→1 days)\n- **Enterprise Security**: Multi-layered protection with Arcjet integration\n- **Intelligent Workflows**: Upstash-powered automation that adapts to your schedule\n- **Universal Compatibility**: Support for all major payment methods and currencies\n\n---\n\n## 🚀 **Key Features**\n\n\u003ctable\u003e\n\u003ctr\u003e\n\u003ctd width=\"50%\"\u003e\n\n### 🔐 **Security \u0026 Authentication**\n- JWT-based secure authentication\n- Arcjet bot detection \u0026 rate limiting\n- Password encryption with bcrypt\n- Role-based access control\n\n### 📊 **Smart Management**\n- Real-time subscription tracking\n- Automated renewal calculations\n- Multi-currency support (USD, EUR, GBP, INR)\n- Flexible billing cycles\n\n\u003c/td\u003e\n\u003ctd width=\"50%\"\u003e\n\n### 🔔 **Intelligent Reminders**\n- 4-tier reminder system (7, 5, 2, 1 days)\n- Workflow state management\n- Email template customization\n- Timezone-aware scheduling\n\n### 💳 **Payment Integration**\n- Credit Card, PayPal, Bank Transfer\n- Subscription categorization\n- Price tracking \u0026 analytics\n- Status monitoring (Active/Inactive/Pending)\n\n\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/table\u003e\n\n---\n\n## 🛠️ **Tech Stack**\n\n\u003cdiv align=\"center\"\u003e\n\n| **Backend** | **Database** | **Security** | **Workflow** | **Tools** |\n|-------------|--------------|--------------|--------------|-----------|\n| Node.js + Express | MongoDB + Mongoose | Arcjet + JWT | Upstash Workflow | Day.js + Nodemailer |\n\n\u003c/div\u003e\n\n---\n\n## ⚡ **Quick Start**\n\n### Prerequisites\n```bash\nNode.js v16+ | MongoDB | Upstash Account | Arcjet Account\n```\n\n### 1️⃣ **Clone \u0026 Install**\n```bash\ngit clone https://github.com/Yaser-123/PayLoop.git\ncd PayLoop\nnpm install\n```\n\n### 2️⃣ **Environment Configuration**\nCreate `.env.development.local`:\n```env\n# Server Configuration\nPORT=5500\nSERVER_URL=http://localhost:5500\nNODE_ENV=development\n\n# Database\nDB_URI=your_mongodb_connection_string\n\n# Authentication\nJWT_SECRET=your_super_secure_jwt_secret\nJWT_EXPIRES_IN=1d\n\n# Security (Arcjet)\nARCJET_KEY=your_arcjet_key\nARCJET_ENV=development\n\n# Workflow Engine (Upstash)\nQSTASH_URL=http://127.0.0.1:8080\nQSTASH_TOKEN=your_qstash_token\n\n# Email Service\nEMAIL_PASSWORD=your_gmail_app_password\n```\n\n### 3️⃣ **Launch Application**\n```bash\n# Development Mode\nnpm run dev\n\n# Production Mode\nnpm start\n```\n\n---\n\n## 📚 **API Documentation**\n\n### 🔐 **Authentication Endpoints**\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003ePOST\u003c/strong\u003e \u003ccode\u003e/api/v1/auth/sign-up\u003c/code\u003e - Register New User\u003c/summary\u003e\n\n```http\nPOST /api/v1/auth/sign-up\nContent-Type: application/json\n\n{\n  \"name\": \"Mohamed Yaser\",\n  \"email\": \"1ammar.yaser@gmail.com\",\n  \"password\": \"securePassword123\"\n}\n```\n\n**Response:**\n```json\n{\n  \"success\": true,\n  \"message\": \"User created successfully!\",\n  \"data\": {\n    \"userId\": \"64a7f8b2c1d2e3f4a5b6c7d8\",\n    \"token\": \"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\"\n  }\n}\n```\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003ePOST\u003c/strong\u003e \u003ccode\u003e/api/v1/auth/sign-in\u003c/code\u003e - User Login\u003c/summary\u003e\n\n```http\nPOST /api/v1/auth/sign-in\nContent-Type: application/json\n\n{\n  \"email\": \"1ammar.yaser@gmail.com\",\n  \"password\": \"securePassword123\"\n}\n```\n\u003c/details\u003e\n\n### 📋 **Subscription Management**\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003ePOST\u003c/strong\u003e \u003ccode\u003e/api/v1/subscriptions\u003c/code\u003e - Create Subscription\u003c/summary\u003e\n\n```http\nPOST /api/v1/subscriptions\nAuthorization: Bearer \u003cyour_jwt_token\u003e\nContent-Type: application/json\n\n{\n  \"name\": \"Netflix Premium\",\n  \"price\": 15.99,\n  \"currency\": \"USD\",\n  \"frequency\": \"monthly\",\n  \"category\": \"premium\",\n  \"startDate\": \"2025-01-15T00:00:00.000Z\",\n  \"paymentMethod\": \"credit_card\"\n}\n```\n\n**Supported Values:**\n- **Categories**: `basic`, `premium`, `enterprise`\n- **Payment Methods**: `credit_card`, `paypal`, `bank_transfer`\n- **Frequencies**: `daily`, `weekly`, `monthly`, `yearly`\n- **Currencies**: `USD`, `EUR`, `GBP`, `INR`\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eGET\u003c/strong\u003e \u003ccode\u003e/api/v1/subscriptions/user/:userId\u003c/code\u003e - Get User Subscriptions\u003c/summary\u003e\n\n```http\nGET /api/v1/subscriptions/user/64a7f8b2c1d2e3f4a5b6c7d8\nAuthorization: Bearer \u003cyour_jwt_token\u003e\n```\n\u003c/details\u003e\n\n---\n\n## 🏗️ **Project Architecture**\n\n```\nPayLoop/\n├── 🚀 app.js                      # Application entry point\n├── ⚙️ config/\n│   ├── arcjet.js                  # Security configuration\n│   ├── env.js                     # Environment management\n│   ├── nodemailer.js              # Email service setup\n│   └── upstash.js                 # Workflow client\n├── 🎮 controllers/\n│   ├── auth.controller.js         # Authentication logic\n│   ├── subscription.controller.js # Subscription operations\n│   ├── user.controller.js         # User management\n│   └── workflow.controller.js     # Automated workflows\n├── 🗃️ database/\n│   └── mongodb.js                 # Database connection\n├── 🛡️ middlewares/\n│   ├── arcjet.middleware.js       # Security layer\n│   ├── auth.middleware.js         # JWT verification\n│   └── error.middleware.js        # Error handling\n├── 📊 models/\n│   ├── subscription.model.js      # Subscription schema\n│   └── user.model.js              # User schema\n├── 🛣️ routes/\n│   ├── auth.routes.js             # Authentication routes\n│   ├── subscription.routes.js     # Subscription routes\n│   ├── user.routes.js             # User routes\n│   └── workflow.routes.js         # Workflow routes\n└── 🔧 utils/\n    ├── email-template.js          # Email templates\n    └── send-email.js              # Email utilities\n```\n\n---\n\n## 🔄 **Intelligent Workflow System**\n\nPayLoop's workflow engine automatically:\n\n1. **🎯 Workflow Creation**: Triggers when new subscription is added\n2. **📅 Smart Scheduling**: Calculates optimal reminder timing\n3. **🔔 Multi-Tier Alerts**: 7→5→2→1 day reminder sequence\n4. **⚡ State Management**: Handles active/inactive/pending states\n5. **🛑 Auto-Cleanup**: Stops workflows for expired subscriptions\n\n### **Workflow Timeline Example**\n```\n� Subscription Created → 🔄 Workflow Initiated\n⏰ 7 Days Before → 📧 First Reminder\n⏰ 5 Days Before → 📧 Second Reminder  \n⏰ 2 Days Before → 📧 Third Reminder\n⏰ 1 Day Before → 📧 Final Reminder\n💳 Renewal Date → 🔄 Workflow Complete\n```\n\n---\n\n## 🔒 **Enterprise Security**\n\n\u003ctable\u003e\n\u003ctr\u003e\n\u003ctd width=\"50%\"\u003e\n\n### **Authentication Layer**\n- ✅ JWT token-based auth\n- ✅ Bcrypt password hashing\n- ✅ Session management\n- ✅ Secure headers\n\n\u003c/td\u003e\n\u003ctd width=\"50%\"\u003e\n\n### **Protection Layer (Arcjet)**\n- ✅ Rate limiting (token bucket)\n- ✅ Bot detection \u0026 filtering\n- ✅ Shield protection\n- ✅ IP-based restrictions\n\n\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/table\u003e\n\n---\n\n## 🚀 **Deployment Guide**\n\n### **Production Environment Setup**\n\n1. **Environment Configuration**\n   ```bash\n   # Create production environment file\n   touch .env.production.local\n   \n   # Set production variables\n   NODE_ENV=production\n   DB_URI=your_production_mongodb_uri\n   ```\n\n2. **Platform Deployment** (Render/Heroku/Vercel)\n   ```bash\n   # Build command\n   npm install\n   \n   # Start command  \n   npm start\n   ```\n\n3. **Environment Variables** (Set in your hosting platform)\n   - `DB_URI` - Production MongoDB connection\n   - `JWT_SECRET` - Production JWT secret\n   - `ARCJET_KEY` - Production Arcjet key\n   - `QSTASH_TOKEN` - Production Upstash token\n\n---\n\n## �‍💻 **About the Developer**\n\n\u003cdiv align=\"center\"\u003e\n\n### **Mohamed Yaser** \n*Full-Stack Developer \u0026 Software Architect*\n\n[![LinkedIn](https://img.shields.io/badge/LinkedIn-0077B5?style=for-the-badge\u0026logo=linkedin\u0026logoColor=white)](https://www.linkedin.com/in/mohamedyaser08/)\n[![Twitter](https://img.shields.io/badge/Twitter-1DA1F2?style=for-the-badge\u0026logo=twitter\u0026logoColor=white)](https://x.com/tmohamedyaser)\n[![Portfolio](https://img.shields.io/badge/Portfolio-000000?style=for-the-badge\u0026logo=About.me\u0026logoColor=white)](https://mohdyaser.vercel.app/)\n[![Gmail](https://img.shields.io/badge/Gmail-D14836?style=for-the-badge\u0026logo=gmail\u0026logoColor=white)](mailto:1ammar.yaser@gmail.com)\n\n\u003c/div\u003e\n\n---\n\n## 🤝 **Contributing**\n\nWe welcome contributions! Here's how to get started:\n\n1. **Fork** the repository\n2. **Create** a feature branch: `git checkout -b feature/amazing-feature`\n3. **Commit** your changes: `git commit -m 'Add amazing feature'`\n4. **Push** to branch: `git push origin feature/amazing-feature`\n5. **Open** a Pull Request\n\n---\n\n## � **License**\n\nThis project is licensed under the **MIT License** - see the [LICENSE](LICENSE) file for details.\n\n---\n\n\u003cdiv align=\"center\"\u003e\n\n### � **PayLoop - Smart Subscription Management**\n*Built with ❤️ by Mohamed Yaser*\n\n**⭐ Star this repo if you find it helpful!**\n\n\u003c/div\u003e\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyaser-123%2Fpayloop","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyaser-123%2Fpayloop","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyaser-123%2Fpayloop/lists"}