How 3ved9969/ai-marketing-platform- works
This is a full-stack marketing CRM: users manage leads, campaigns, accounts, and analytics in the React UI; the FastAPI backend handles CRM operations and calls AI and scraping services. The AI service provides lead processing, content generation, campaign planning/analysis, and retrieval over ChromaDB; scraping discovers and enriches businesses, while Celery automation coordinates service calls and scheduled work. The README documents service-level wiring; several route and workflow implementations were not sampled, so those links are cited to the README rather than inferred from names.
Main entry points: ai-service/api_server.py AI REST API · content_workflow.py Content generation · main.py CRM API · scraper-service/api_server.py Scraper REST API
Components 23
CRM interface
- CRM pages
frontend/src/App.jsx - API clients
frontend/src/api/client.js
CRM backend
- CRM API
backend/app/main.py - CRM routes
backend/app/routes - CRM services
backend/app/services - Authentication
backend/app/services/auth_service.py - CRM database
backend/app/database.py
AI services
- AI REST API
ai-service/api_server.py - Lead processing
ai-service/chains/lead_generation_chain.py - Content generation
ai-service/workflows/content_workflow.py - Campaign planning
ai-service/workflows/campaign_workflow.py - Model routing
ai-service/llm/model_router.py - RAG retrieval
ai-service/rag/retriever.py - ChromaDB
ai-service/rag/vector_store.py - Session memory
ai-service/memory/session_memory.py
Discovery and automation
- Scraper REST API
scraper-service/api_server.py - Lead discovery
scraper-service/scraper_engine/orchestrator.py - Business profiles
scraper-service/business_intelligence_v1/business_intelligence/orchestrator/profile_orchestrator.py - Browser manager
scraper-service/scraper_engine/anti_ban/browser_manager.py - Celery pipeline
automation/pipeline.py
Other components
- CRM user
- Ollama models
- Redis broker
Connections 27
- CRM user → CRM pages: uses
frontend/src/App.jsx - CRM pages → API clients: requests data
- API clients → CRM API: calls API
README.md - CRM API → CRM routes: mounts routes
backend/app/main.py - CRM routes → CRM services: delegates
- CRM services → CRM database: reads and writes
- Authentication → CRM database: reads and writes
backend/app/services/auth_service.py - CRM API → AI REST API: calls over HTTP
README.md - CRM API → Scraper REST API: calls over HTTP
README.md - AI REST API → Lead processing: serves lead tasks
README.md - AI REST API → Content generation: serves content tasks
README.md - AI REST API → Campaign planning: serves campaign tasks
README.md - Lead processing → Model routing: gets LLM
ai-service/chains/lead_generation_chain.py - Content generation → Model routing: generates with
- Campaign planning → Content generation: uses workflow
ai-service/workflows/campaign_workflow.py - Model routing → Ollama models: routes inference
ai-service/llm/model_router.py - Lead processing → RAG retrieval: retrieves context
ai-service/chains/lead_generation_chain.py - RAG retrieval → ChromaDB: searches and indexes
ai-service/rag/retriever.py - Content generation → RAG retrieval: uses content memory
- Content generation → Session memory: uses session state
ai-service/workflows/content_workflow.py - Scraper REST API → Lead discovery: dispatches scraping
scraper-service/api_server.py - Scraper REST API → Business profiles: dispatches profiling
scraper-service/api_server.py - Lead discovery → Browser manager: scrapes with
- Business profiles → Browser manager: analyzes with
- Celery pipeline → Scraper REST API: requests leads
README.md - Celery pipeline → AI REST API: requests AI work
README.md - Celery pipeline → Redis broker: uses broker
README.md