How pakvakunchik/parser-for-marketplaces works
This is a FastAPI product-catalog API. Its main workflow accepts a barcode, looks up supplier data, creates or updates a product, and returns product details; a separate endpoint selects a product, cleans its raw data, generates AI text, and saves the result. The graph includes the API/UI entry points, domain services, integrations, and persistence. The README is empty, and several integrations were not excerpted, so their external-service links are shown as unverified or omitted.
Main entry points: routers.py Product routes · product_service.py Product service · product_repository.py Product repository · github_ai.py AI generator
Components 20
API and UI
- FastAPI app
src/main.py - Product routes
src/routers/routers.py - API schemas
src/schemas/schemas.py
Product workflows
- Product service
src/services/product_service.py - Supplier lookup
src/services/supplier_services.py - Raw data cleaner
src/services/rawdata_cleaner_service.py - Photo service
src/services/photo_service.py - Product constants
src/core/constants.py - Product errors
src/exceptions/product_exceptions.py
External integrations
- Supplier API client
src/integrations/supplier_api.py - AI generator
src/integrations/github_ai.py - AI prompts
src/integrations/ai/prompts.py - Runtime settings
src/core/config.py
Persistence
- Product repository
src/repositories/product_repository.py - Product model
src/database/models.py - Database sessions
src/database/session.py - Database
Other components
- API user
- Supplier service
- AI service
Connections 22
- API user → FastAPI app: sends requests
src/main.py - FastAPI app → Product routes: mounts routes
src/main.py - Product routes → Product service: handles barcode
src/routers/routers.py - Product routes → Product repository: selects product
src/routers/routers.py - Product routes → Raw data cleaner: cleans raw data
src/routers/routers.py - Product routes → AI generator: generates text
src/routers/routers.py - Product routes → Database sessions: gets session
src/routers/routers.py - Product routes → API schemas: validates responses
src/routers/routers.py - Product routes → Product constants: uses keywords
src/routers/routers.py - Product routes → Product errors: handles errors
src/routers/routers.py - Product service → Supplier lookup: looks up barcode
src/services/product_service.py - Supplier lookup → Supplier API client: fetches item
src/services/supplier_services.py - Product service → Product repository: reads and writes
src/services/product_service.py - Product service → Photo service: gets photo
src/services/product_service.py - Product repository → Product model: queries products
src/repositories/product_repository.py - Database sessions → Runtime settings: configures engine
src/database/session.py - Database sessions → Database: opens sessions
src/database/session.py - Product repository → Database: executes queries
src/repositories/product_repository.py - Product model → Database: persists product data
- Supplier API client → Supplier service: requests item data
- AI generator → AI service: requests generation
- AI generator → AI prompts: uses prompts
src/integrations/github_ai.py