How crealify/anilbhattarai_portfolio works
Project Type & Purpose
• This is a Flutter-based client-side portfolio app (no custom backend).
• It targets Android, iOS, Web, Windows, macOS, and Linux from one codebase (lib/main.dart).
• It is deployed as a static web site (GitHub Pages/Cloudflare) and as native apps via respective app stores.
File Structure & Key Components
• lib/main.dart – the single entry point for all platforms.
• pubspec.yaml / pubspec.lock – declares assets (images), dependencies, fonts, etc.
• android/… – Android host code (Kotlin MainActivity.kt), Gradle build scripts, resource folders.
• ios/… – iOS host code (Swift AppDelegate.swift), Xcode project, asset catalogs.
• windows/…, macos/…, linux/… – native host code with CMake files and platform runners embedding the Flutter engine.
• .github/workflows/static.yml – CI pipeline for building & deploying the web version.
Core Architectural Elements
a. Flutter Application Layer
– Dart UI code (lib/…)
– Widgets (presentation)
– State management (if any)
b. Flutter Framework
– Rendering, gestures, widgets library
c. Flutter Engine
– Skia, Dart runtime, platform channels
d. Host Platforms
– Android: MainActivity → embeds FlutterEngine
– iOS: AppDelegate → FlutterEngine
– Desktop & Linux: CMake scopes & main.cpp launcher
– Web: index.html + JavaScript-compiled Dart (via flutter.js)
e. Assets & Dependencies
– assets/images/…, pubspec-managed images
– Third-party plugins (if any) auto-registered via generated plugin registrant files
f. CI/CD Pipeline
– GitHub Actions job builds web output
– Deploys to GitHub Pages / Cloudflare
Relationships & Data Flow
• Build Flow: lib/ + pubspec.yaml → flutter build <platform> → platform artifact
• Runtime Flow (for mobile/desktop):
1. OS launches host binary/Activity/Delegate
2. Host code instantiates FlutterEngine
3. Engine loads compiled Dart & assets
4. Dart UI renders in a window or view
• Web Flow: Browser loads index.html → loads flutter.js → initializes Dart runtime → renders canvas.