How jyonkov/motech works
Main Components
a. Core Platform Components:
• Platform Server (motech-platform-server)
• Platform Common (motech-platform-common)
• Platform Scheduler (motech-platform-scheduler)
• Platform Server API (motech-platform-server-api)
b. Service Modules:
• Appointments Service
• Outbox Service
• IVR (Interactive Voice Response) Service
• Pill Reminder Service
• Decision Tree Service
• TAMA (Treatment Advice through Mobile Alerts) Service
Client Layer
• Web Interface (VxmlControllers)
• IVR Interface
Service Layer
• Authentication Services
• Event Handling Services
• Business Logic Services
Data Access Layer
• DAO Implementations
• CouchDB Storage
• REST Implementations
Integration Layer
• OSGi Framework
• Event System
• Scheduler System
Key Relationships to Highlight
a. Event Flow:
• Event propagation from ServerEventRelay through EventListeners
• Relationship between MotechScheduler and event handling
b. Data Flow:
• Flow from Controllers → Services → DAOs → Database
• Integration points between different modules
Specific Implementation Details
Key architectural patterns:
• OSGi-based modularity
• Event-driven architecture
• MVC pattern in web components
• Repository pattern in data access
• Decision tree-based rule engine
Component Relationships
• OSGi service dependencies
• Event subscriptions
• Database access patterns
• API calls between modules
Technical Specifications
Annotations for:
• CouchDB as the primary database
• Java-based implementation
• OSGi framework
• Spring dependency injection
• Drools rule engine integration