Pattern: MVVM (Model-View-ViewModel)
- Model:
HighlightData
,ApiService
,RetrofitAnkiNetwork
- View:
MainActivity
, Composables (UI components) - ViewModel: (optional) Manages UI-related data and API calls
Python Flask API (Server Side) https://github.com/meisei4/ankikindle
Pattern: MVC with Services
- Model: SQLAlchemy models (e.g.,
Lookup
) - View: Flask routes (API endpoints)
- Controller: Route handlers
- Service:
VocabHighlightService
(business logic)
- User Interaction: User highlights text in the Android app.
- API Request: App sends highlight data to Flask API via Retrofit.
- API Processing: Flask controller forwards request to service.
- Business Logic: Service processes data, updates database, interacts with AnkiConnect.
- Response: Flask API returns success/failure to the app.
- UI Update: App updates UI based on API response.
- Client-Side (Android App): MVVM pattern.
- Server-Side (Flask API): MVC pattern with Services.
- Full-Stack Architecture: Combines MVVM and MVC with Services for clear separation of concerns.