How aksoyhlc/order-project-tracking works
Main Components
• User Interface (UI) Layer: Represented by the Flutter “lib/view” directory, this layer contains all the screens, forms, and widgets (e.g., login, setup, dashboard/home, customer management, order management, project management, profile, statistics view, and partial/shared UI components).
• Business Logic / Controller Layer: Found in the “lib/controller” directory. This layer implements key use cases—managing customers, orders, projects, global states, sidebar interactions, and database interactions.
• Data Model Layer: Included under “lib/model”; these files define the structures for customers, orders, projects, and users.
• Database Component: The SQLite database is provided as an asset (assets/db/db.db). It serves as the local persistence layer that the controllers access (via classes in “lib/controller/db”).
• Platform & Build Configuration: The folders android, ios, linux, macos, windows, and web hold platform-specific configurations and build scripts. Although these are largely wrappers provided by Flutter, they indicate that the application is distributed across multiple platforms.
• Setup & Authentication: The README explains a one-time setup screen used to configure initial credentials. This can be modeled as a component that manages user authentication and profile settings.
Relationships and Interactions
• The Controller Layer communicates with the Data Model Layer to manipulate data objects. It also manages the persistence by reading from and writing to the SQLite database.
• The Setup Component initializes application configuration (e.g., initial email/password), after which the user is authenticated and navigates through the various UI screens.
• Platform-specific wrappers (android, ios, etc.) serve as entry-points, launching the Flutter engine that then instantiates the UI and business logic.
Important Architectural Patterns
• The separation clearly illustrates a layered architecture similar to MVC/MVVM:
• UI/View (presentation).
• Controller (business logic).
• Model (data structures and persistence).
• The project encapsulates cross-platform concerns by isolating platform-specific code in distinct directories while keeping core logic in the shared Dart code under “lib.”
• The single-device, offline-first design indicates a design optimized for local data storage and processing, with a decoupled interface for potential future synchronization (as seen in the online version mentioned).
Specific Technologies & Frameworks
• Flutter: The core UI framework and runtime managing multi-platform support.
• SQLite: The local database engine (accessed via the mobile_db and other DB-specific controllers).
• Dart: Primary programming language for both UI and business logic.
• Platform-specific build tools: Gradle for Android, Xcode for iOS/macOS, CMake for Linux/Windows, etc.
Essential Elements
• Each major component should have a clear label (e.g., “UI Layer – Flutter Widgets”, “Controller Layer – Business Logic”, “Database – SQLite”, “Platform Wrappers – Android / iOS / Web”, etc.).
• Notes or labels that indicate key technologies (Flutter, SQLite, Dart) and architectural patterns (MVC/MVVM).