{"id":27093621,"url":"https://github.com/yash-kk/blink","last_synced_at":"2026-04-06T09:33:42.745Z","repository":{"id":284331839,"uuid":"954548188","full_name":"Yash-KK/Blink","owner":"Yash-KK","description":"Decentralized Uptime Monitoring","archived":false,"fork":false,"pushed_at":"2025-03-28T13:26:30.000Z","size":758,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-21T18:56:07.714Z","etag":null,"topics":["bun","nextjs","prisma","solana","tailwind","turborepo"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/Yash-KK.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-03-25T08:52:48.000Z","updated_at":"2025-09-10T14:31:03.000Z","dependencies_parsed_at":"2025-09-21T18:52:07.989Z","dependency_job_id":"068a2eee-b162-41c5-b928-a2e313fa2c95","html_url":"https://github.com/Yash-KK/Blink","commit_stats":null,"previous_names":["yash-kk/blink"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Yash-KK/Blink","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Yash-KK%2FBlink","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Yash-KK%2FBlink/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Yash-KK%2FBlink/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Yash-KK%2FBlink/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Yash-KK","download_url":"https://codeload.github.com/Yash-KK/Blink/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Yash-KK%2FBlink/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31466629,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-06T08:36:52.050Z","status":"ssl_error","status_checked_at":"2026-04-06T08:36:51.267Z","response_time":112,"last_error":"SSL_read: 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":["bun","nextjs","prisma","solana","tailwind","turborepo"],"created_at":"2025-04-06T08:39:03.529Z","updated_at":"2026-04-06T09:33:42.728Z","avatar_url":"https://github.com/Yash-KK.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🚀 Blink – Decentralized Uptime Monitoring Platform\n\n**Blink** is a decentralized uptime monitoring platform designed to track website availability in real time. It uses a modular architecture powered by **TurboRepo** with four apps, ensuring efficiency, scalability, and flexibility. Validators are compensated with **Solana wallets** at the end of each month.\n\n---\n\n## 🛠️ Architecture\n\nBlink consists of **four apps**:\n1. **Front-end** – Built with **Next.js**, providing a sleek and responsive UI for users to monitor website uptime.\n2. **API** – An **HTTP Bun server** that handles requests from the front-end and interacts with the Hub and Validators.\n3. **Hub** – A **WebSocket Bun server** responsible for distributing website URLs to Validators every minute. It listens for validation responses and triggers callback functions on completion.\n4. **Validator** – A **WebSocket Bun server** that performs the actual website validation by sending HTTP requests and returning the status to the Hub.\n\n---\n\n## 🔗 Flow Overview\n\n1. **Website Submission:** Users submit websites to monitor through the front-end.\n2. **Distribution:** The API sends the list of websites to the Hub.\n3. **Callback-based Validation:** \n    - The Hub assigns a **unique request ID** to each website request and sends it to the Validators over a WebSocket connection.\n    - When the Validator receives the request, it performs the uptime check by sending an HTTP request to the website.\n    - Once the validation is complete, the Validator sends the response back to the Hub, including the original request ID.\n    - The Hub uses the request ID to **trigger the corresponding callback function**, ensuring that the correct website status is updated.\n4. **Real-time Updates:** The Hub sends the validation results back to the front-end, updating the website status in real-time.\n5. **Payment:** Validators are compensated with **Solana wallet payments** at the end of each month.\n\n---\n\n## ⚙️ Tech Stack\n\n- **TurboRepo** – Monorepo management.\n- **Next.js** – Front-end app with a modern UI.\n- **Bun** – For the API, Hub, and Validator servers.\n- **WebSockets** – Real-time communication between the Hub and Validators.\n- **Solana Wallets** – For decentralized validator payments.\n\n---\n\n\n## ⚙️ Callback-based Architecture Explained\n\nIn this architecture, a **WebSocket connection** exists between the **Hub** and the **Validator**. When the Hub sends a request, it specifies a **callback function** that should be triggered upon receiving the corresponding response.\n\n### 🛠️ How It Works:\n- The Hub maintains a **Global Callback List**, which tracks all pending requests.\n- Each request is assigned a **unique identifier** (e.g., `requestID`) and is stored in the callback list as a key-value pair:\n\n- When the Validator sends a response, the Hub looks for the corresponding `requestID` in the callback list.\n- The matching callback function is executed, and the `requestID` is removed from the list to **prevent memory leaks or redundant calls**.\n\n### ✅ Benefits:\n- Ensures that each response is mapped to its original request.\n- Enables **asynchronous, non-blocking communication** between the Hub and Validator.\n- Prevents stale or redundant callbacks by cleaning up the callback list.\n\n---\n\n![image](https://github.com/user-attachments/assets/ff139aea-5a8c-4f0a-b13f-db531214aa55)\n\n---\n\nhttps://github.com/user-attachments/assets/1291bc0a-aee4-4d09-85c9-48a912fed91d\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyash-kk%2Fblink","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyash-kk%2Fblink","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyash-kk%2Fblink/lists"}