How josiahdahl/sar-alerts works
Main Components
a. Frontend Layer:
• Vue.js Components (found in backend/resources/assets/js/components)
• Widget System (Widget.vue as base component)
• Specialized Widgets (Weather, Tides, Time, Notice, Wind)
• Store Management (store.js)
b. Backend Layer (Laravel):
• API Controllers (in backend/app/Http/Controllers/Api)
• Authentication System
• Service Providers
• Data Models
• Integration Contracts
c. Data Services Layer (Python):
• Flask API (api/app.py)
• Job Workers
• Data Providers
• RabbitMQ Message Queue
d. External Services:
• Weather API (OpenWeatherMap)
• Tides Data (GC Tides)
• Time Services
• Notification Services
[Client Layer] → [Backend Layer] → [Data Services Layer]
• ↑ ↕ ↕
• ┴────────────────────┘
Component Relationships
• Frontend widgets ↔ Laravel API Controllers
• Laravel Controllers ↔ Integration Contracts
• Integration Contracts ↔ Python Data Services
• Data Services ↔ External APIs
• RabbitMQ connecting Backend and Data Services
Key Elements to Highlight
a. Modular Widget System:
• How widgets connect to different data sources
• Component hierarchy
b. Data Flow:
• API request paths
• Job queue processing
• Data update cycles
c. Integration Points:
• External API connections
• Service contracts
• Database interactions
Additional Details
Specific components:
• Authentication flow
• Database tables (users, widgets, data_sources, etc.)
• Cache layer
• Job scheduling system
Architectural Patterns to Emphasize
• Service Provider Pattern (shown in backend/app/Providers)
• Repository Pattern (for data access)
• Contract-based Integration Pattern
• Event-driven architecture (with RabbitMQ)
• Component types (services, controllers, models)
• Integration points