How osama-yusuf/repo-radar works
Main Components
• Frontend: The client-side application built with React and Material UI (evidenced by the README and the frontend directory’s files such as App.jsx, index.html, and vite.config.js). This is the smart dashboard that displays repository monitoring status, logs, and user interactions.
• Backend: A Node.js (Express) service (found in the “backend” directory with server.js and swagger.js). It handles business logic, interactions with the GitHub REST API, and database operations with SQLite.
• Webhook Listener: A dedicated service (in the “webhook-listener” directory) built using Node.js. It’s responsible for receiving webhooks from GitHub and triggering actions (like running custom scripts or forwarding notifications).
• Database: Although not explicitly seen as a file in the file tree, the README mentions SQLite as the database. Represent it as a separate component that the Backend communicates with.
• External APIs & Services: Particularly the GitHub REST API v3, which is used for monitoring repositories and retrieving commit histories.
• Docker & Deployment Infrastructure: Since the project includes Dockerfiles in multiple folders alongside a docker-compose.yaml, include Docker containers and the orchestration layer as part of the deployment and environment management.
Relationships and Interactions
• The Frontend communicates with the Backend via RESTful API endpoints (display data and submit commands like “Add Project” actions).
• The Backend periodically calls GitHub’s API to check repository statuses, interacting with the GitHub REST API.
• When repository changes occur, GitHub sends webhooks directly to the Webhook Listener.
• The Webhook Listener processes these notifications and triggers workflow updates or automation in the Backend (if required).
• The Backend handles business logic, logging, and stores state and history in the SQLite database.
• Docker Compose orchestrates the multi-container deployment for Frontend, Backend, and Webhook Listener.
Architectural Patterns and Design Principles
• Separation of Concerns: Different services for UI, business logic, and webhook handling.
• Service-Oriented Architecture/Microservices: Splitting the responsibilities between independent backend services.
• Containerization: Using Docker to encapsulate environments, as indicated by the Dockerfiles and docker-compose configuration.
• Real-Time Data Flow: Emphasis on real-time change monitoring and notifications from GitHub.
Relevant Technologies
• Frontend: React, Material UI, Vite.
• Backend: Node.js, Express, Swagger for API documentation.
• Webhook Listener: Node.js environment.
• Database: SQLite.
• External: GitHub REST API v3.
• DevOps: Docker and Docker Compose for deployment.