How ps428/amy works
Project Type and Purpose
• AMY is clearly a full-stack mobile (and web) application built in Flutter.
• Its purpose is to allow students to donate their unused mess card balance as meals to people in need (e.g., gardeners, guards).
• The README and file structure show two distinct sections for users and administrators, along with backend Firebase integration (authentication, database, etc.).
File Structure
• Top-Level Directories:
– “Flutter/amy” and “amy” directories contain similar structures for Flutter application code (Android, iOS, web).
– Assets such as fonts, images, and logos are stored in the “Assets” directory and in each app’s assets folder.
• Code Organization:
– The “lib” directory holds the main Dart source files.
– Inside “lib”, separate routing directories for “admin” and “user” flows indicate a clean separation of concerns (e.g., AHomeScreen vs. UHomeScreen, donation flows, etc.).
– Shared services and utilities include files like authentication_service.dart, firebase_options.dart, constants.dart, and validator.dart.
• Environmental and Build Configurations:
– Standard Flutter configurations (pubspec.yaml, android/ and ios/ projects, firebase.json) are present.
– The presence of directories for web (public and Flutter/amy/web) means that web targets are supported too.
Extract Architectural Insights From the README
• The README explains the purpose and gives details on the different UI pages (loading, login, signup, user home, donation confirmation, admin screens such as billing, inventory, etc.).
• It describes the navigation flow for both user and admin sides and emphasizes Firebase for authentication and data handling.
• The layout of the file structure and the provided screenshots hint at a layered architecture: UI presentation, routing & navigation, business logic (services like authentication), and backend integration (Firebase).
a. Main Components
– Flutter Mobile & Web Client: Represented by the UI modules/screens.
• User Interface: Login, Signup, Home, Donation, Confirmation, My Account, etc.
• Admin Interface: Admin home, Serve Meal, Billing, Inventory.
– Backend / Cloud Services:
• Firebase Authentication
• Firebase Database/Firestore (for donation records, user data, admin actions)
• Firebase Hosting/Storage (if used for assets)
– Supporting Assets: Fonts, images, and other media assets stored locally and potentially served via Firebase or CDN.
b. Relationships and Interactions
– The Flutter client (both user and admin channels) communicates with the Firebase backend.
– Requests for authentication, donation submissions, and admin actions are sent from the UI to the authentication service and Firebase services.
– Navigation components (routed via the “lib/routes” directories) direct flows between screens.
– The Firebase configuration (via firebase_options.dart) acts as a connector between the app and Firebase’s services.
c. Architectural Patterns and Design Principles
– Separation of Concerns: Distinguish between UI (screens and widgets), routing logic (organized in separate route folders), and service layers (authentication, Firebase integrations).
– MVC/MVVM-like Pattern: Although Flutter inherently uses a widget-based architecture, logically separate the presentation (UI screens) and business logic (services, validators).
– Modular Routing: Clear division of user and admin flows simplifies mapping and maintenance.
– Use of External Services: Dependency on Firebase for authentication and database operations is central.
d. Of Relevant Technologies, Frameworks, and Libraries
– Flutter (for cross-platform mobile, web, and desktop UI)
– Firebase (Auth, Database/Firestore, Storage, Hosting)
– Dart (programming language)
– Standard Flutter libraries and any additional packages from pubspec.yaml (for charts, animations like confetti, etc.)