How bachtly/affiliate-crawl-sales-bot works
Project type and purpose
• This is an automation/ETL-style bot written in Python that periodically:
• Crawls products from e-commerce sites (Shopee, Lazada)
• Fetches affiliate links via third-party services (Accesstrade)
• Generates marketing content from templates
• Publishes content to social media (Facebook)
• It uses a scheduler to orchestrate end-to-end “flows,” persists data in MongoDB, and supports monitoring via Docker-Compose + Loki.
File structure
• Top-level entrypoint: app.py (launches scheduler and flows)
• config/ holds configuration logic (config.py)
• flows/ defines business flows (e.g. FlowDocongso.py, FlowTuivinu_deprecated.py)
• services/ implements domain services, subdivided by adapter type (adapters/, link/, marketing/, post/, product/, publishing/)
• models/ defines MongoDB document schemas (ProductModel.py, deprecated PublishingModel)
• utils/ contains reusable helpers; per instructions only include Crawler here
• monitor/ holds monitoring stack (docker-compose.yaml, Loki configs)
• requirements.txt, Makefile, and Docker artifacts govern build and runtime
README for additional insights
• Design Overview section clarifies two sub-flows: product flow (crawl → affiliate link → content → DB) and publishing flow (retrieve from DB → publish)
• Mentions scheduler as the entrypoint for each “flow”