How junpatch/pricealert works
Project Type and Purpose
• PriceAlert is a full-stack e-commerce price-tracking application.
• Frontend: React + TypeScript (Vite) SPA for user interaction, product management, graphs, QR scanning.
• Backend: Django REST API with modular apps (accounts, products, notifications), Celery for async tasks, PostgreSQL for persistence, Redis as broker.
• Purpose: Let users register product URLs, define price-drop alerts, run periodic scraping, generate and send notifications via email.
File Structure & Architectural Patterns
• Two top-level directories: /frontend and /backend.
• Backend follows Django’s project-app structure (PriceAlert project + three apps).
• Uses MVC (Django Models, Views, Serializers as Controllers) and command pattern for Celery beat setup.
• Frontend organized by feature slices (Redux Toolkit), hooks, common components, pages.
• Asynchronous processing via Celery (Beat + Worker), external scrapers, notification services.
• Deployment artifacts: Dockerfile, docker-compose.dev.yml, Render blueprint (render.yaml), Vercel config.
Detailed Component Breakdown
• Accounts app (authentication endpoints)
• Products app (connectors, services, tasks)
• Notifications app (serializers, tasks, email templates)
• Management command setup_periodic_tasks as an initialization step.
• Template rendering for password reset emails.
• In async layer, call out three scheduled tasks: fetch_and_store_prices, check_price_alerts, send_price_alert_notifications.