How kphanipavan/iiitb_menu works
Main Components
• Core Application (Flutter Code): The heart of the project is the Flutter application, with its main logic and UI defined in the lib directory. Here you find constants (constants.dart), models (globalModel.dart, imageSearch.dart, initialPageIndexFunction.dart), views (homePage.dart, about.dart, bus.dart, etc.) and reusable widgets.
• Cross-Platform Native Integrations: Directories for Android, iOS, Linux, macOS, and Windows show that platform-specific integrations (build scripts, configurations) are maintained separately but share the core Flutter code.
• Web/PWA Delivery: The web folder contains PWA configuration files (index.html, manifest.json), enabling the app to be installed as a PWA on devices. Additionally, scripts (pwaOffline.patch, fixOfflinePWA.sh) indicate customizations to support offline functionality.
• CI/CD Pipeline: The .github/workflows folder shows automated build and deployment setups (e.g., gh-pages.yml), which are crucial for continuous deployment to GitHub Pages.
• Data and Automation Scripts: The scripts directory houses utilities like scrapeToJson.py, menu.csv, and others, indicating an automated mechanism to update or process menu data.
Interactions and Relationships
• The Flutter Core interacts with the respective platform layers. Emphasize that although the UI and business logic are shared, each platform folder (android, ios, etc.) provides specific configurations and integrations.
• CI/CD Integration: Represent the CI/CD tools and GitHub Actions workflows. Show how commits trigger testing and build processes, which eventually deploy to GitHub Pages or update native app packages.
• Data Updating Process: Highlight the flow from raw menu data (provided in CSV/script files) through automated scripts (scrapeToJson.py) to the Flutter application, possibly via JSON files that the app consumes.
Architectural Patterns and Design Principles
• Cross-Platform Development: The design leverages Flutter’s “write once, run anywhere” principle. Clearly separate the shared code (lib directory) from platform-specific configurations.
• Progressive Web App (PWA) Principles: For the web/PWA part, note the emphasis on offline support and installation mechanisms – include components that manage caching and manifest-based configurations.
• Continuous Integration/Continuous Deployment (CI/CD): The architecture includes automated workflows for building, testing, and deploying the app. Show pipelines as separate but integrated processes interacting with the main code repository.
• Modular and Reusable Code: With distinct directories for models, views, and widgets, it follows a modular design approach that enhances maintainability.
Final Detailed Elements
• Every component is labeled – from “lib (core logic)” to “android (native integration)” and “web (PWA configuration)”.