How okwama/woosh works
Project Type and Purpose
• This is a full-stack, cross-platform sales management application called “whoosh.”
• Frontend: Flutter mobile & desktop client (Android, iOS, Web, Windows, macOS, Linux).
• Backend: Node.js/Express API (the api/controllers directory), intended to be deployed behind a REST interface.
• Purpose: Enable sales reps/managers to log in, browse products, place orders, manage journey plans, check-ins, leave requests, and generate/report analytics.
High-Level Components
A. Client (Flutter Application)
• UI Layer
– Pages & Widgets (lib/pages/*, lib/widgets/*)
• Business Logic / State Controllers
– GetX controllers (lib/controllers/*)
• Data Layer / Services
– REST calls & file uploads (lib/services/*)
– Models (lib/models/*)
– Utilities (lib/utils/*)
– Routing (lib/routes/app_routes.dart)
– Platform projects (Android, iOS, Web, Windows, macOS, Linux) under /android, /ios, /web, /windows, /macos, /linux
B. API Server (Node.js/Express)
• Controllers (api/controllers/*.js) – e.g., analyticsController.js
• (Implicit) Service/Model/Data-access layers – these would be developed or unzipped from api.zip.
• Exposes REST endpoints consumed by the Flutter client via ApiService
C. Database
D. CI/CD & DevOps
• Codemagic config (codemagic.yaml)
• CI scripts (ci_scripts/post-clone.sh)
Relationships & Data Flows
• The Flutter client initiates HTTPS/REST calls (via api_service.dart) to the API server.
• The API server performs CRUD, analytics aggregation, and media management, then reads/writes to the database and/or object storage (e.g., S3 or similar).
• The client may upload images/files to external storage via multi-platform upload services (image_upload.*, universal_file.*).
• CI/CD pipeline builds & deploys both client and server components.
Architectural Patterns & Principles
• Layered Architecture on the client: Presentation (Pages/Widgets) → Controller (GetX) → Service (API) → Model.
• RESTful API design on the server.
• Single-repository monorepo structure containing client, server, docs, and CI configs.
• Modular code grouping by feature (e.g., pages/journeyplan, services, models) to enforce separation of concerns.
• Each component clearly labeled (e.g., “AuthController”, “CartController”, “ApiService”).
• Version control annotation (e.g., Git) and CI/CD triggers if desired.