How kanishkp2906/amz_backend works
This repository appears to implement an Amazon price-tracking API: users can submit products for tracking, with product, price-history, and user data represented in separate schemas. Scraping, email delivery, request middleware, and supporting utilities are distinct runtime capabilities. The README is empty and the main API, database, and alerting implementations were not excerpted, so their interactions cannot be confirmed; the graph shows only relationships supported by the available excerpts or source index.
Main entry points: config.py Runtime config · scrape_script.py Amazon scraper · send_email.py SMTP sender · rate_limiter.py Rate limiter
Components 21
API and schemas
- API routes
routes.py - App entry
main.py - Product schema
schemas/products.py - Tracking schema
schemas/tracking.py - History schema
schemas/price_history.py - User schema
schemas/users.py
Price tracking
- Database access
database.py - Domain models
models.py - Amazon scraper
scrape_script.py
External integrations
- Email alerts
utils/email_alert.py - SMTP sender
utils/send_email.py
Runtime support
- Runtime config
config.py - CORS middleware
middleware/app_cors.py - Rate limiter
middleware/rate_limiter.py - Time utility
utils/current_time.py - URL shortener
utils/url_shortener.py
Other components
- API user
- Amazon pages
- ScrapingAnt API
- SMTP service
- Redis
Connections 9
- API user → API routes: requests
- Amazon scraper → ScrapingAnt API: fetches pages
scrape_script.py - Amazon scraper → Amazon pages: scrapes products
- SMTP sender → SMTP service: sends mail
utils/send_email.py - SMTP sender → Runtime config: reads settings
utils/send_email.py - Rate limiter → Runtime config: reads Redis URL
middleware/rate_limiter.py - Rate limiter → Redis: counts requests
middleware/rate_limiter.py - CORS middleware → Runtime config: reads origins
middleware/app_cors.py - Tracking schema → Product schema: embeds product
schemas/tracking.py