Menu

Project Initialization

Relevant source files

The Project Initialization system automates the initial setup process when creating a new mobile app project from this template repository. This page documents the automated workflow, initialization actions, and the subsequent customization steps required for new projects.

Initialization Workflow Overview

When a developer creates a new repository using this template, GitHub automatically triggers the initialization workflow, which performs several setup tasks and creates issues for further manual configuration steps.


Sources: .github/actions/fill-project-name/action.yaml .github/actions/remove-unnecessary-files/action.yaml

Initialization Actions

Project Name Configuration

The initialization workflow automatically fills the project name in configuration files using the repository name. The workflow converts the repository name to snake_case and updates it in the melos.yaml and pubspec.yaml files.

Sources: .github/actions/fill-project-name/action.yaml7-29

Cleanup Process

The initialization workflow removes template-specific files that are not needed in new projects. These files are listed in a text file and removed during initialization.

Sources: .github/actions/remove-unnecessary-files/action.yaml1-18

Initialization Issues

The workflow creates several issues to guide developers through the remaining manual configuration steps. Each issue contains detailed instructions for specific setup tasks.

IssuePurposeKey Configuration Files
Application ID RenamingChange default app IDs to project-specific identifiersflavor/*.json, Android build files, iOS configuration
GitHub Auto AssignmentSet up PR reviewer auto-assignment.github/workflows/auto-assign.yaml
Firebase Hosting PreviewConfigure Firebase preview for the catalog app.github/workflows/firebase-hosting-pull-request.yaml
Splash Screen SetupAdd and configure app splash screensApp assets, pubspec.yaml
App Icon ConfigurationSet up app icons for Android and iOSApp assets

Sources: .github/initialization/README.md

Post-Initialization Manual Steps

Application ID Renaming

After initialization, you need to change the default application IDs to your project-specific identifiers using the provided script.

The script usage:

cd tools
chmod +x rename-application-id.sh
./rename-application-id.sh "com.example.android.app" "com.example.ios.app"

Sources: .github/initialization/RENAME_APPLICATION_ID.md1-33

GitHub Auto Assignment Configuration

To enable automatic reviewer assignment for pull requests:

  1. Configure the GitHub access token for the workflow
  2. Set up repository environment variables for reviewers

Sources: .github/initialization/GITHUB_AUTO_ASSIGNMENT.md1-49

Firebase Hosting Preview Setup

To enable Firebase Hosting previews for the catalog app, which allows viewing component previews on pull requests:

  1. Create a new Firebase project
  2. Initialize Firebase Hosting
  3. Run firebase init hosting:github
  4. Modify the workflow file to remove template conditions and update project configuration

Sources: .github/initialization/FIREBASE_HOSTING_PREVIEW.md1-112

Splash Screen Configuration

To add a custom splash screen to your application:

  1. Add flutter_native_splash dependency to apps/app/pubspec.yaml
  2. Add splash screen images to assets
  3. Configure splash screen properties
  4. Run the configuration command

Sources: .github/initialization/SPLASH_SCREEN.md1-88

App Icon Configuration

Guidelines for setting up app icons:

iOS

  • Uses a 1024x1024 master icon
  • Smaller sizes generated automatically by flutter_launcher_icons

Android Adaptive Icons

  • Requires foreground image (logo) and background (color or image)
  • Both images should be 1024x1024
  • Foreground icon should be sized at approximately 67% of the image area

Sources: .github/initialization/ABOUT_ICON.md1-33

For information about PR checks and continuous integration, see PR Checks Workflow.

For information about application initialization at runtime, see App Initialization.

Syntax error in textmermaid version 11.6.0