{"id":50892987,"url":"https://github.com/manojkp08/segwise-webhook-service","last_synced_at":"2026-06-15T22:01:58.321Z","repository":{"id":361978791,"uuid":"977067878","full_name":"manojkp08/segwise-webhook-service","owner":"manojkp08","description":"A robust \u0026 scalable webhook processing system","archived":false,"fork":false,"pushed_at":"2026-06-02T03:13:58.000Z","size":137,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2026-06-02T05:09:05.038Z","etag":null,"topics":["celery","fastapi","google-cloud-platform","postgresql","python","redis","streamlit"],"latest_commit_sha":null,"homepage":"https://webhooktesting-segwiseassessmentmanoj.streamlit.app/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/manojkp08.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-05-03T10:58:19.000Z","updated_at":"2026-06-02T03:14:03.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/manojkp08/segwise-webhook-service","commit_stats":null,"previous_names":["manojkp08/segwise-webhook-service"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/manojkp08/segwise-webhook-service","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/manojkp08%2Fsegwise-webhook-service","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/manojkp08%2Fsegwise-webhook-service/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/manojkp08%2Fsegwise-webhook-service/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/manojkp08%2Fsegwise-webhook-service/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/manojkp08","download_url":"https://codeload.github.com/manojkp08/segwise-webhook-service/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/manojkp08%2Fsegwise-webhook-service/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34381762,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-15T02:00:07.085Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["celery","fastapi","google-cloud-platform","postgresql","python","redis","streamlit"],"created_at":"2026-06-15T22:01:55.579Z","updated_at":"2026-06-15T22:01:58.313Z","avatar_url":"https://github.com/manojkp08.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🌟 Webhook Delivery Service\n\u003e A robust \u0026 scalable webhook processing system\n\n![Architecture Diagram](https://img.shields.io/badge/Architecture-Cloud_Ready-blueviolet?style=flat\u0026logo=azure-pipelines)  \n![Performance](https://img.shields.io/badge/Performance-⚡_Millisecond_Latency-success)  \n![Reliability](https://img.shields.io/badge/Reliability-99.99%25_Uptime-brightgreen)\n\n[![FastAPI](https://img.shields.io/badge/FastAPI-005571?style=for-the-badge\u0026logo=fastapi)](https://fastapi.tiangolo.com/)\n[![Python](https://img.shields.io/badge/Python-3776AB?style=for-the-badge\u0026logo=python\u0026logoColor=white)](https://www.python.org/)\n[![Redis](https://img.shields.io/badge/Redis-DC382D?style=for-the-badge\u0026logo=redis\u0026logoColor=white)](https://redis.io/)\n[![PostgreSQL](https://img.shields.io/badge/PostgreSQL-316192?style=for-the-badge\u0026logo=postgresql\u0026logoColor=white)](https://www.postgresql.org/)\n[![Docker](https://img.shields.io/badge/Docker-2496ED?style=for-the-badge\u0026logo=docker\u0026logoColor=white)](https://www.docker.com/)\n\n## 📌 Overview\n\nModern applications rely heavily on real-time event notifications. This project delivers a high-performance webhook service that:\n\n- ⚡ Ingests webhooks with millisecond latency\n- 🔄 Delivers payloads with exponential backoff retries (up to 5 attempts)\n- 🔒 Verifies webhook signatures for security\n- 📊 Provides complete visibility into delivery status\n\nBuilt for e-commerce platforms, payment processors, and SaaS applications needing reliable webhook infrastructure.\n\n## 🔥 Why Webhooks Matter\n\nWebhooks power critical workflows:\n\n- 💳 Payment gateways notifying about transactions\n- 🔄 GitHub triggering CI/CD pipelines\n- 👥 CRM systems syncing customer data\n\n**Our solution solves:**\n\n| Problem | Solution |\n|---------|----------|\n| 📮 Lost webhooks | Automatic retries with exponential backoff |\n| 👁️ No delivery visibility | Full attempt history logging |\n| 🔐 Security risks | Payload signature verification |\n\n## 🏗️ Architecture\n\n### Tech Stack\n\n| Category | Technology | Purpose |\n|----------|------------|---------|\n| Backend | Python + FastAPI | Blazing fast API endpoints |\n| Async | Celery + Redis | Background task processing |\n| Database | PostgreSQL (GCP Cloud SQL) | Reliable data persistence |\n| Caching | Redis Cloud | Queue management + subscription caching |\n| Monitoring | Streamlit Dashboard | Real-time delivery analytics |\n\n## 📸 Screenshots\n\n  \u003cdiv class=\"gallery\"\u003e\n      \u003cdiv class=\"img-container\"\u003e\n          \u003cimg src=\"https://github.com/user-attachments/assets/2c1a5f6e-11c3-43da-9b09-136ce30c382c\" alt=\"Screenshot 1\"\u003e\n          \u003cdiv class=\"img-caption\"\u003eDesktop interface with file browser\u003c/div\u003e\n      \u003c/div\u003e\n       \u003cdiv class=\"img-container\"\u003e\n          \u003cimg src=\"https://github.com/user-attachments/assets/dcd3048e-93e5-44c4-b4b3-261b28111cac\" alt=\"Screenshot 2\"\u003e\n          \u003cdiv class=\"img-caption\"\u003eSystem configuration window\u003c/div\u003e\n      \u003c/div\u003e\n       \u003cdiv class=\"img-container\"\u003e\n           \u003cimg src=\"https://github.com/user-attachments/assets/9f4b6512-56da-40e2-a624-dc4a610d2f45\" alt=\"Screenshot 3\"\u003e\n          \u003cdiv class=\"img-caption\"\u003eApplication with terminal view\u003c/div\u003e\n      \u003c/div\u003e\n      \u003cdiv class=\"img-container\"\u003e\n            \u003cimg src=\"https://github.com/user-attachments/assets/6f17532a-69d2-46f4-9c2c-03afedfb1950\" alt=\"Screenshot 4\"\u003e\n            \u003cdiv class=\"img-caption\"\u003eTerminal with command outputs\u003c/div\u003e\n       \u003c/div\u003e\n      \u003cdiv class=\"img-container\"\u003e\n           \u003cimg src=\"https://github.com/user-attachments/assets/ceb2b39b-1eb6-40e5-9319-5c24c3921357\" alt=\"Screenshot 5\"\u003e\n           \u003cdiv class=\"img-caption\"\u003eSystem settings dialog\u003c/div\u003e\n       \u003c/div\u003e\n       \u003cdiv class=\"img-container\"\u003e\n          \u003cimg src=\"https://github.com/user-attachments/assets/f579a591-46eb-4657-9a10-2838d44f8075\" alt=\"Screenshot 6\"\u003e           \n          \u003cdiv class=\"img-caption\"\u003eCode or text editor interface\u003c/div\u003e\n      \u003c/div\u003e\n       \u003cdiv class=\"img-container\"\u003e\n          \u003cimg src=\"https://github.com/user-attachments/assets/054d7cb3-0875-4547-8246-e6f0e83aa81a\" alt=\"Screenshot 7\"\u003e\n          \u003cdiv class=\"img-caption\"\u003eSystem information display\u003c/div\u003e\n       \u003c/div\u003e\n       \u003cdiv class=\"img-container\"\u003e\n          \u003cimg src=\"https://github.com/user-attachments/assets/e5fe3785-13ad-444a-b82b-34aba1cd5585\" alt=\"Screenshot 8\"\u003e\n          \u003cdiv class=\"img-caption\"\u003eTerminal with system information\u003c/div\u003e\n      \u003c/div\u003e\n   \u003c/div\u003e\n\n## 🔄 Workflows\n\n### 1. Webhook Processing\n![Webhook Processing](https://github.com/user-attachments/assets/79cb01d0-4327-4b1c-acf6-8be2d5a39fe0)\n\n### 2. Database Schema\n![Database Schema](https://github.com/user-attachments/assets/2cbed41e-7d9d-41ab-83f1-26e56ad8cf1a)\n\n### 3. Data Fetching Flow\n![Data Fetching Flow](https://github.com/user-attachments/assets/65a10e75-e108-4a58-a687-d423be553094)\n\n### 4. Data Update Flow\n![Data Update Flow](https://github.com/user-attachments/assets/6631b681-dd78-47ed-b8e7-914065258486)\n\n### 5. Deployment Architecture\n![Deployment Architecture](https://github.com/user-attachments/assets/0c028a0d-139f-46ea-9092-d50a68c92d8e)\n\n## 🏃 Local Setup (1 Minute)\n```bash\n# 1. Clone repo\ngit clone https://github.com/manojkp08/segwise-webhook-service.git\n\n# 2. Go into the project file\ncd segwise-webhook-service\n\n# 3. Run services \ndocker-compose up --build  # Starts API + Worker + Streamlit\n```\n\n### 🔧 Port Conflict Fixes (If Needed)\n- If ports are already allocated (Error: \"port is already allocated\"):\n\n**Option 1: Quick Port Change**  \nEdit `docker-compose.yml` and change these lines:\n```yaml\nservices:\n  redis:\n    ports:\n      - \"6381:6379\"  # Change 6381 to any free port (e.g., 6382)\n  \n  streamlit:\n    ports:\n      - \"8502:8501\"  # Change 8502 to any free port (e.g., 8503)\n  \n  web:\n    ports:\n      - \"8001:8000\"  # Change 8001 to any free port (e.g., 8002)\n```\n\n**Option 2: Kill Occupied Ports (Linux/Mac)**\n```bash\nsudo lsof -i :8501  # Check which process uses port 8501\nkill -9 \u003cPID\u003e       # Replace \u003cPID\u003e with the process ID from above\n```\n\n\n\n## 📡 API Documentation\n(Full API documentation can be found at https://docs.google.com/document/d/1mwhyYywsMIbqxx-ZCbivbzKzG3M394B47ILTwtQzyrY/edit?usp=sharing)\n\n1. Create Subscription\nPOST - https://segwise-webhook-service.onrender.com/api/v1/subscriptions/\nExample:\nInput:\n```\n{\n  \"target_url\": \"https://hook.eu2.make.com/oa7dkj27u6dsx5lcnj7siwcldjg4uj1v\",\n  \"secret\": \"2c6d8d1d-01d5-4898-8188-f3cadfd44163\",\n  \"event_types\": [\"payment.processed\"]\n}\n```\n\nOutput:\n```\n{\n    \"target_url\": \"https://hook.eu2.make.com/oa7dkj27u6dsx5lcnj7siwcldjg4uj1v\",\n    \"event_types\": [\n        \"payment.processed\"\n    ],\n    \"id\": \"e5b40e29-5f9d-4c83-8562-6bd0cd3a4e74\",\n    \"is_active\": true,\n    \"created_at\": \"2025-05-04T06:04:41.250794Z\",\n    \"updated_at\": null\n}\n```\n\n2. Injest Webhook\nPOST - https://segwise-webhook-service.onrender.com/api/v1/ingest/{subscription_id}\nExample:\nInput:\n```\n{\n  \"event\": \"payment.processed\",\n  \"amount\": 34567\n}\n```\nOutput:\n```\n{\n    \"status\": \"accepted\",\n    \"delivery_id\": \"b3827820-5992-46c1-9866-16940b53093f\",\n    \"subscription_id\": \"e5b40e29-5f9d-4c83-8562-6bd0cd3a4e74\"\n}\n```\n\n3. Delivery Logs\nGET - https://segwise-webhook-service.onrender.com/api/v1/status/delivery/{delivery_id}\nExample\nOutput:\n```\n{\n    \"delivery_id\": \"b3827820-5992-46c1-9866-16940b53093f\",\n    \"attempts\": [\n        {\n            \"attempt_number\": 0,\n            \"status\": \"queued\",\n            \"status_code\": null,\n            \"timestamp\": \"2025-05-04T06:05:33.813352\"\n        }\n    ]\n}\n```\n\n\n## 🧠 Redis Architecture\n\n1. Queues:\ncelery: Stores pending delivery tasks\n\n2. Caching:\nsubscription:{id}: Caches subscription details (TTL: 5m)\n\nKey Commands:\n\n```bash\nredis-cli KEYS '*'          # List all keys\nredis-cli LLEN celery       # Check queue length\nredis-cli FLUSHDB           # Clear all data (dev only)\n```\n\n## ☁️ Production Deployment\n\n| Service | Provider | Details |\n|---------|----------|---------|\n| PostgreSQL | GCP Cloud SQL | Managed database service |\n| Redis | Redis Cloud | Through Google Cloud Free tier |\n| Streamlit UI | Streamlit Community Cloud | Analytics dashboard |\n| Fast API | Render | Free tier |\n\n\u003cp align=\"center\"\u003e\nMade with ❤️ by Manoj\n\u003c/p\u003e\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmanojkp08%2Fsegwise-webhook-service","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmanojkp08%2Fsegwise-webhook-service","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmanojkp08%2Fsegwise-webhook-service/lists"}