How maelgangloff/domain-watchdog works
Main Components
• Frontend Client:
• Represented by the assets directory.
• Built with TypeScript (React components, pages, hooks, and utility functions).
• Provides the user interface for domain search, authentication, watchlist management, and displaying tracking details.
• Backend Service:
• Exposes API endpoints for both domain monitoring (RDAP queries, search, and tracking) and managing user inputs.
• Database & Data Layer:
• Managed indirectly by Doctrine (see the migrations, Repository classes, and Entity definitions).
• Stores key data such as domain details, watchlists, user information, domain events, and connector configurations.
• External Services and Connectors:
• RDAP servers for querying domain details.
• A set of connector providers (OVH, GANDI, NAMECHEAP, etc.) that are integrated via APIs to trigger domain purchasing.
• Webhook integrations (for notifications via email, Slack, Mattermost, Discord, etc.).
• Job Scheduler/Message Bus:
• Symfony Messenger and the Scheduler (commands and message handlers) deal with asynchronous tasks like domain ordering, processing watchlists, updating RDAP servers, and sending notifications.
• Docker & Deployment Infrastructure:
• Dockerfile, docker-compose.yml, and frankenphp directory denote containerized deployment ensuring a consistent runtime environment.
• Environment files (.env, .env.test) add configuration flexibility.
Relationships and Interactions
• The Backend processes requests through Controllers, fetching data (or triggering tasks) by interacting with Services that encapsulate business logic.
• The Backend interacts with a Relational Database via Doctrine (Entities and Migrations) to read/write domain information, watchlists, and user data.
• Background jobs and scheduled tasks (via Schedule classes and Symfony Messenger) process actions like sending detailed notifications, updating server data, or validating connector credentials. These tasks can be depicted as asynchronous workflows.
• Notifications are triggered by events in the backend (via Notifiers) and may result in emails and webhook-based chat messages.
Architectural Patterns & Technologies
• MVC Pattern: The Symfony controllers (in src/Controller) act as the entry point of requests, with Services and Entities forming the model and business logic.
• Asynchronous Processing: Use of message queues and schedulers (in src/Message, src/MessageHandler, and src/Scheduler) to decouple long-running tasks.
• API-First Design: With clearly defined API endpoints (documented through controllers and API resource classes) that the React frontend consumes.
• Docker-Based Deployment: Containerization ensures consistency between development, testing, and production.
• Extensive Use of Configuration: With many YAML files in config (routing, doctrine, security, etc.) to fine-tune framework behavior.