How ashfaq-ahamed-a/complicart works
ComplyCart is a mobile-led Legal Metrology compliance auditing platform. The documented workflow is a seller or auditor submitting a listing URL, the backend scraping the listing, extracting declaration fields, evaluating rules, and returning a compliance result; it also exposes catalog management. The README documents a seller dashboard and physical label scanning, but the Flutter source is not present in the supplied tree, so those capabilities are represented only at the app level. Backend relationships follow the excerpts and source index; the database and REST boundary are documented in the README.
Main entry points: analysis_service.py Analysis orchestration · main.py FastAPI application · catalog.py Catalog routes · analyze.py URL analysis routes
Components 16
Mobile App
- Seller dashboard and scanners
ComplyCart-app
Backend API
- FastAPI application
ComplyCart-backend/app/main.py - URL analysis routes
ComplyCart-backend/app/api/analyze.py - Catalog routes
ComplyCart-backend/app/api/catalog.py - Health route
ComplyCart-backend/app/api/health.py
Compliance Analysis
- Analysis orchestration
ComplyCart-backend/app/services/analysis_service.py - Listing scraper
ComplyCart-backend/app/services/scraper_service.py - Field extraction
ComplyCart-backend/app/services/field_extraction_service.py - Compliance rules
ComplyCart-backend/app/services/rule_engine.py
Catalog and Data
- Seller and analysis models
ComplyCart-backend/app/models/models.py - Database session
ComplyCart-backend/app/db/session.py - Catalog schemas
ComplyCart-backend/app/schemas/catalog.py - PostgreSQL
Other components
- Seller or auditor
- E-commerce listing sites
- Gemini API
Connections 18
- Seller or auditor → Seller dashboard and scanners: uses
- Seller dashboard and scanners → FastAPI application: REST requests
- FastAPI application → URL analysis routes: registers
ComplyCart-backend/app/main.py - FastAPI application → Catalog routes: registers
ComplyCart-backend/app/main.py - FastAPI application → Health route: registers
ComplyCart-backend/app/main.py - URL analysis routes → Analysis orchestration: calls
ComplyCart-backend/app/api/analyze.py - Analysis orchestration → Listing scraper: scrapes listing
ComplyCart-backend/app/services/analysis_service.py - Analysis orchestration → Field extraction: extracts fields
ComplyCart-backend/app/services/analysis_service.py - Analysis orchestration → Compliance rules: validates fields
ComplyCart-backend/app/services/analysis_service.py - Listing scraper → E-commerce listing sites: fetches pages
ComplyCart-backend/app/services/scraper_service.py - Field extraction → Gemini API: extracts fields
ComplyCart-backend/app/services/field_extraction_service.py - Analysis orchestration → Seller and analysis models: queries and saves
ComplyCart-backend/app/services/analysis_service.py - URL analysis routes → Seller and analysis models: uses models
ComplyCart-backend/app/api/analyze.py - Catalog routes → Seller and analysis models: queries catalog
ComplyCart-backend/app/api/catalog.py - Catalog routes → Catalog schemas: uses schemas
ComplyCart-backend/app/api/catalog.py - Database session → PostgreSQL: connects to
- Analysis orchestration → PostgreSQL: reads and writes
ComplyCart-backend/app/services/analysis_service.py - Catalog routes → PostgreSQL: reads and writes
ComplyCart-backend/app/api/catalog.py