How project-marimo/marimo works
Project Type and Purpose
• This is a full‑stack, automotive maintenance system consisting of:
• A cross‑platform mobile client (Flutter/Dart) that connects via Bluetooth to an OBD2 scanner, runs on‑device AI for tire wear and expert Q&A, and communicates with a backend via REST.
• A Java Spring Boot monolithic server offering authenticated REST APIs, business logic for car data, card benefits, insurance, navigation and payment management.
• A MySQL relational database and Redis cache, deployed in Docker on AWS EC2, fronted by Nginx, with Jenkins pipelines for CI/CD.
Main Architectural Zones
• Mobile Client Zone
• Flutter UI screens (home, map, monitoring, payment, insurance, signin, tire diagnosis).
• State management via Provider.
• Bluetooth module ↔ OBD2 scanner for real‑time vehicle data.
• On‑device AI: Gemma3 for chat/expert AI; MobileNetV2 for tire wear detection.
• HTTP client services for REST calls to backend.
• Backend Server Zone
• API Layer: Controllers grouped by domain (auth, car, card, insurance, navigation, payment, external).
• Service Layer: Business logic, algorithmic processing, external API integration (Fintech, Opinet).
• Data Layer: JPA repositories ↔ MySQL; RedisCache for user card‑benefit caching.
• Security: Spring Security with JWT filters.
• Configuration, aspects, converters, exception handling.
• Infrastructure Zone
• Docker container running Spring Boot.
• Nginx reverse proxy (SSL termination, routing).
• AWS RDS (MySQL), AWS EC2 (app server), Redis 7.0.
• CI/CD: Jenkins builds Docker images, deploys to AWS.
• External services: SSAFY financial network for card data; Opinet fuel price API.
Architectural Patterns and Design Principles
• Layered architecture on backend (Controller → Service → Repository).
• Domain‑driven package organization (auth, car, card, insurance, navigation, payment).
• Provider pattern on Flutter for separation of UI and state.
• On‑device AI for latency reduction and privacy.
• Caching to solve N+1 and improve performance (Redis + fetch join).