How catrilao/manga-tracker works
MangaDex Tracker runs a batch sync: its CLI entrypoint loads configuration and infrastructure, selects active manga, fetches and parses chapters, validates a sync plan, stores new chapters, and notifies Discord. The service also records per-manga audit outcomes. The README documents cold-start notification suppression and anomaly checks, both represented in the planning stage. Edges follow the sampled entrypoint, controller, and service calls; unsampled internals are not inferred.
Main entry points: services.py Manga sync service · main.py Application entrypoint · postgres.py Postgres repository · controllers.py Batch controller
Components 17
Application flow
- Application entrypoint
src/main.py - Configuration
src/config.py - Batch controller
src/core/controllers.py - Manga sync service
src/core/services.py - Domain models
src/domain/models.py
Scraping and planning
- Scraper factory
src/infrastructure/scrapers/factory.py - MangaDex scraper
src/infrastructure/scrapers/plugins/mangadex/scraper.py - Chapter parser
src/infrastructure/scrapers/parser.py - Sync planner
src/core/use_cases.py
Persistence
- DB connection
src/infrastructure/database/connection.py - Postgres repository
src/infrastructure/database/postgres.py - Database schema
supabase/migrations
Notifications
- Discord notifier
src/infrastructure/notifications/discord.py
Other components
- CLI operator
- PostgreSQL
- MangaDex API
- Discord webhook
Connections 31
- CLI operator → Application entrypoint: runs
- Application entrypoint → Configuration: loads
- Application entrypoint → DB connection: opens
- Application entrypoint → Postgres repository: creates
- Application entrypoint → Scraper factory: creates
- Application entrypoint → Chapter parser: creates
- Application entrypoint → Discord notifier: creates
- Application entrypoint → Manga sync service: creates
- Application entrypoint → Batch controller: creates
- Application entrypoint → Batch controller: runs
- Batch controller → Postgres repository: gets active IDs
- Batch controller → Manga sync service: syncs manga
- MangaDex scraper → Scraper factory: registers scraper
- Scraper factory → MangaDex scraper: creates scraper
- Manga sync service → Postgres repository: loads manga
- Manga sync service → Scraper factory: selects scraper
- Manga sync service → MangaDex scraper: fetches chapters
- MangaDex scraper → MangaDex API: requests chapter data
- Manga sync service → Chapter parser: parses chapters
- Chapter parser → Domain models: creates chapter models
- Manga sync service → Postgres repository: loads metadata
- Manga sync service → Sync planner: calculates plan
- Sync planner → Domain models: returns sync plan
- Manga sync service → Postgres repository: stores planned chapters
- Manga sync service → Discord notifier: sends chapter notifications
- Discord notifier → Discord webhook: posts webhook
- Manga sync service → Postgres repository: marks notified
- Manga sync service → Postgres repository: saves audit
- DB connection → PostgreSQL: connects
- Postgres repository → PostgreSQL: queries and updates
- Database schema → PostgreSQL: defines schema