BACK
SOFTWARE

cv-web-app

Author

Flutter Web monorepo (Melos + pub workspaces) with two apps - a public CV site and a desktop-only admin dashboard - built on Clean Architecture with BLoC/Cubit state, GetIt + Injectable DI, auto_route, Freezed models, and a Firebase backend (Firestore, Auth, Hosting, Analytics). CI/CD via GitHub Actions with dev and prod flavors.

MONOREPO STRUCTURE

The workspace is managed with Melos (pub workspaces). Three core packages form the shared foundation: core/domain defines Freezed entities and repository interfaces; core/data implements those interfaces with Firestore and mock datasources; core/shared provides AppTheme, localization, DI configuration, and shared widgets. Three feature packages (cv_content, admin_content, auth) contain the presentation layers. Two thin app shells (cv_app, admin_app) wire everything together.

This layout means every layer is independently testable. The mock datasource in core/data lets the admin app run in dev flavor without a live Firebase project - the same DI container, different @dev-annotated bindings.

STACK

State management is BLoC/Cubit with Freezed union states. Dependency injection uses GetIt + Injectable with @dev / @prod environment annotations. Routing is auto_route v11 with a micro-router pattern per feature. Models are Freezed + json_serializable. Pages use flutter_hooks for concise stateful logic; complex animation screens use StatefulWidget with multi-controller animations. Sentry captures runtime errors in production.

The Firebase backend handles Firestore (CV data), Authentication (admin login), Hosting (both apps), and Analytics. Firestore rules are versioned alongside the code.

CI/CD

GitHub Actions builds and deploys both apps on every push. Push to develop deploys both apps to Firebase dev hosting (live preview channels). Push to main promotes to production. Pull requests get ephemeral preview channels so each PR is independently reviewable in a browser without a local Flutter setup.

KEY TAKEAWAYS

  • Two Flutter Web apps from one Melos monorepo - shared domain, data, and design system
  • Clean Architecture with mock and production datasources in the same DI container
  • BLoC/Cubit + Freezed union states across all features
  • CI/CD with dev, prod, and per-PR preview channel deploys to Firebase Hosting
  • Sentry error reporting in production