Menu

Overview

Relevant source files

This document provides an introduction to the Flutter Mobile Project Template, a comprehensive starting point for developing mobile applications with Flutter. The template is structured as a monorepo using Melos for package management and implements a modular, scalable architecture with clear separation of concerns.

For detailed instructions on setting up the development environment and getting started with the template, see Getting Started.

Template Structure Overview

The Flutter Mobile Project Template is organized into a monorepo structure that separates applications from reusable packages:

Sources: pubspec.yaml5-26 docs/ARCHITECTURE.md6-24

Dependency Hierarchy

The template enforces a strict dependency hierarchy to maintain clean architecture principles:

Sources: docs/ARCHITECTURE.md26-41 pubspec.yaml9-26

Key Features

The Flutter Mobile Project Template provides:

  1. Scalable Architecture: Modular design with clear separation between core, feature, and utility modules
  2. Developer Experience: Pre-configured development tools and workflows
  3. CI/CD Integration: GitHub Actions workflows for automated checks and deployments
  4. State Management: Riverpod for predictable state management
  5. Routing: Type-safe routing using GoRouter
  6. Theming: Comprehensive design system with light/dark mode support
  7. Internationalization: Built-in localization support
  8. Environment Configuration: Support for development, staging, and production environments
  9. Code Generation: Automated code generation for boilerplate reduction

Sources: pubspec.yaml28-190 melos.yaml pubspec.lock

Project Workspace Management

The project uses Melos to manage the workspace and dependencies across packages. This enables coordinated operations across all packages:

CommandDescription
melos bootstrapInstall all dependencies and link packages
melos run genGenerate code, including build_runner and l10n
melos run testRun tests across all packages
melos run fixApply fixes and linting across all packages
melos run upgradeUpgrade dependencies across all packages

Sources: pubspec.yaml75-226 docs/GET_STARTED.md28-46

Project Initialization Flow

When using this template to create a new project, it runs through an initialization process:

Sources: .github/workflows/initialization.yaml

Application Architecture

The app uses a layered architecture pattern with clean separation of concerns:

Sources: docs/NEW_FEATURE.md docs/ARCHITECTURE.md

Development Environment

The template is configured for consistent development environments using:

  1. Mise: For managing Flutter SDK versions
  2. Melos: For monorepo management
  3. Mason: For code generation and scaffolding
  4. VS Code/IntelliJ IDEA: Pre-configured IDE settings

The template supports multiple environment configurations (development, staging, production) with different configurations for app names, bundle IDs, and API endpoints.

Sources: docs/GET_STARTED.md3-98 apps/app/README.md1-31

Contribution and Extension

The template is designed to be extended with new features using the provided tools:

  1. Create new feature packages using Mason bricks:

    mason make features_package
    
  2. Configure the routing system to include the new feature

  3. Add new UI components to the catalog app for preview and testing

Sources: docs/NEW_FEATURE.md1-239 apps/catalog/README.md1-31