Separation of Concerns (SoC)
Overview
Separation of Concerns is a design principle for separating a system into distinct sections, each addressing a separate concern. In OCapistaine, we apply this to both code architecture and workflow design.
Application in OCapistaine
Code Architecture
| Layer | Concern | Implementation |
|---|
| Data Collection | Web scraping & OCR | src/firecrawl_utils.py |
| Configuration | Data sources & settings | src/config.py |
| Orchestration | CLI & workflow control | src/crawl_municipal_docs.py |
| Storage | Document persistence | ext_data/ directory |
Workflow Separation
| Workflow | Responsibility |
|---|
| Firecrawl | Document acquisition |
| OCR Processing | Text extraction from PDFs |
| RAG System | Semantic search & Q&A |
| N8N Orchestration | Multi-channel integration |
Benefits
- Maintainability - Changes to one concern don't affect others
- Testability - Each component can be tested independently
- Scalability - Components can be scaled based on load
- Collaboration - Team members can work on different concerns simultaneously