How mercenarya/castravision works
CastraVision is an early-stage marketing strategy assistant for SMEs. Its evidenced workflow is business-profile and campaign-data entry in the React app, followed by a strategy request validated and handled by Django, which retrieves relevant knowledge and generates a recommendation. Account and import endpoints persist profile and normalized campaign data; knowledge ingestion and embedding tasks support retrieval. The README also describes content generation, budget optimization, ad-platform integrations, dashboards, and exports, but the sampled implementation does not establish those runtime paths. The graph preserves the implemented workflow and notes that evidence limit.
Main entry points: rag.py Knowledge search · App.jsx Web application · strategy.py Strategy generation · views.py Strategy endpoint
Components 16
User interface
- Web application
CastraView/src/App.jsx
Application API
- Account API
CastraServices/account_api.py - Campaign import
CastraServices/account_api.py - Strategy endpoint
CastraServices/views.py - Business and imports
CastraServices/models.py - CSV preprocessing
Utils/data_preprocessing.py
Strategy services
- Request validation
CastraServices/schemas.py - Strategy generation
CastraServices/strategy.py - Prompt construction
CastraServices/prompts.py
Knowledge retrieval
- Knowledge search
CastraServices/rag.py - Knowledge chunks
CastraServices/models.py - Knowledge ingestion
CastraServices/management/commands/ingest_knowledge.py - Embedding worker
CastraServices/tasks.py - Task runtime
CastraVision/celery.py
Other components
- SME user
- OpenAI service
Connections 18
- SME user → Web application: enters profile
CastraView/src/App.jsx - Web application → Account API: sends account requests
CastraView/src/App.jsx - Web application → Campaign import: uploads campaign data
CastraView/src/App.jsx - Web application → Strategy endpoint: requests strategy
CastraView/src/App.jsx - Strategy endpoint → Request validation: validates request
CastraServices/views.py - Strategy endpoint → Strategy generation: generates recommendation
CastraServices/views.py - Account API → Business and imports: saves profile
CastraServices/account_api.py - Campaign import → Business and imports: saves normalized rows
CastraServices/account_api.py - Strategy generation → Prompt construction: builds prompt
CastraServices/strategy.py - Strategy generation → Knowledge search: searches context
CastraServices/strategy.py - Strategy generation → OpenAI service: requests completion
CastraServices/strategy.py - Prompt construction → Knowledge search: uses search results
CastraServices/prompts.py - Knowledge search → Knowledge chunks: queries chunks
CastraServices/rag.py - Knowledge search → OpenAI service: creates embeddings
CastraServices/rag.py - Knowledge ingestion → Knowledge search: ingests documents
CastraServices/management/commands/ingest_knowledge.py - Embedding worker → Knowledge search: gets embedding provider
CastraServices/tasks.py - Embedding worker → Knowledge chunks: updates embeddings
CastraServices/tasks.py - Task runtime → Embedding worker: provides task runtime
CastraServices/tasks.py