How abood-syr/reson-mate works
This is a FastAPI exchange-rate and metals-price service. Its main result path is quote collection (scheduled or manually requested), provider fallback and validation, persistence of timestamped quotes, then public or API-key-protected quote responses. Separate capabilities include instrument and plan administration, API-key usage limits, public/admin web pages, and health checks. The graph reflects the sampled source and README; some route internals and page-serving wiring were not shown, so those links are omitted or marked unverified.
Main entry points: updater.py Quote updater · api.py API routes · main.py Application startup · security.py API security
Components 19
API and interfaces
- API routes
app/routes/api.py - Public site
app/web/public.html - Admin page
app/web/admin.html - Request schemas
app/schemas/__init__.py
Quote collection
- Update scheduler
app/services/scheduler.py - Quote updater
app/services/updater.py - Gemini provider
app/services/gemini.py - Scraper fallback
app/services/scraper.py
Data and cache
- Domain models
app/models/__init__.py - Database setup
app/core/database.py
Access and operations
- API security
app/core/security.py - Client IP handling
app/core/network.py - Application startup
app/main.py
Other components
- Site visitor
- API client
- Gemini and Search
- Quote source sites
- PostgreSQL
- Redis
Connections 27
- Site visitor → Public site: opens
README.md - Site visitor → Admin page: opens
README.md - API client → API routes: requests quotes
README.md - API routes → Request schemas: validates with
app/routes/api.py - API routes → API security: authorizes with
app/routes/api.py - API security → Client IP handling: resolves client IP
app/core/security.py - API security → Redis: checks rate limits
app/core/security.py - API security → PostgreSQL: checks keys and quotas
app/core/security.py - API routes → PostgreSQL: reads and manages
app/routes/api.py - API routes → Redis: limits and caches
README.md - Application startup → API routes: registers routes
app/main.py - Application startup → Update scheduler: starts worker
app/main.py - Application startup → Gemini provider: configures provider
app/main.py - Application startup → Scraper fallback: configures provider
app/main.py - Update scheduler → Quote updater: runs updates
app/services/scheduler.py - Quote updater → PostgreSQL: loads instruments and saves quotes
app/services/updater.py - Quote updater → Redis: locks and invalidates cache
app/services/updater.py - Quote updater → Domain models: builds quote records
app/services/updater.py - Quote updater → Gemini provider: requests observations
- Quote updater → Scraper fallback: requests observations
- Gemini provider → Gemini and Search: searches and grounds
app/services/gemini.py - Scraper fallback → Quote source sites: fetches pages
app/services/scraper.py - Gemini provider → Request schemas: validates response
app/services/gemini.py - Scraper fallback → Request schemas: returns observations
app/services/scraper.py - Application startup → Database setup: initializes data
app/main.py - Database setup → PostgreSQL: seeds plans and views
app/core/database.py - Database setup → Domain models: creates domain records
app/core/database.py