Aller au contenu principal

GET STARTED

Quickstart

This guide will help you quickly create your first Flutter app with Codika. This is just to get your first project running - the real power of Codika's professional tooling will be covered in subsequent guides. If you haven't installed Codika yet, follow our installation guide first.

Create Your Project

Everything starts with a simple command. For this quickstart guide, we'll use the --default flag to streamline the process and avoid overwhelming you with too many questions:

codika create --default

This command configures many aspects of your project automatically while only asking for four essential pieces of information: your app identifiers, GitHub repository preferences, and Firebase configuration. The CLI will display all the chosen defaults as it progresses, giving you insight into what's being configured behind the scenes.

Project Identifiers

First, you'll enter basic information to identify your app:

? Enter project name ( default: My App ) MyQuickstartApp
? Enter app name ( default: My Quickstart App ) My Quickstart App
? Enter organization identifier ( default: com.example ) com.yourcompany
  • Project name: Used to create the Flutter project (no spaces, lowercase recommended)
  • App name: The user-friendly name that appears on device home screens
  • Organization identifier: Uniquely identifies your app in app stores (reverse domain format)

GitHub Configuration

Codika uses the GitHub CLI (gh) to automate repository creation:

? How would you like to setup your Git repository?
❯ ◉ Create a new GitHub repository
◯ Enter repository URL manually
◯ Setup repository later

If you choose to create a GitHub repository, Codika will:

  • Use your GitHub authentication from the gh CLI
  • Let you select which organization to create it under
  • Configure repository settings like name and visibility
  • Set up the initial connection to the remote repository

If you don't use GitHub or prefer to set up your repository manually, you can select "Enter repository URL manually" and provide your repository URL (preferably SSH) from any version control provider.

This repository integration becomes essential later when setting up automated deployment pipelines.

Firebase Configuration

Codika automates Firebase project setup across all your environments:

? Configure Firebase? (Y/n) Y

? How to set up Firebase for the Development ?
❯ ◉ Create new
◯ Link existing
◯ Skip Firebase setup for Development

? How to set up Firebase for the Production ?
◯ Create new
◯ Link existing
❯ ◉ Same as Development
◯ Skip Firebase setup for Production

With Codika, you can:

  • Create new Firebase projects automatically
  • Link to existing Firebase projects if you already have them
  • Reuse one Firebase project across different environments
  • Skip Firebase integration for certain environments

After you make your selection, Codika handles all the configuration file downloads and integrates everything into your app. Your project will be Firebase-ready the moment creation is complete - no manual configuration required.

What's Happening Behind the Scenes

While you're answering just a few simple questions, Codika is handling dozens of complex tasks that would normally take hours of manual work:

  • Setting up multiple environments: Creating separate development and production setups with distinct configurations and app identifiers
  • Making your app look professional: Generating all app icons and splash screens at the right resolutions for iOS, Android, and web platforms
  • Preparing for global users: Adding internationalization support with generated localization files
  • Keeping up with store requirements: Updating Gradle, Java, and SDK versions to meet the latest App Store and Google Play requirements
  • Making development easier:
    • Creating .env files for each environment
    • Configuring build.gradle(.kts) to read dart-define values
    • Adding pre-build scripts in iOS to extract environment variables
  • Handling the native platform complexities:
    • Configuring Info.plist, build phases, and Podfile for iOS
    • Setting up proper Android manifests and resource files
  • Future-proofing your workflow:
    • Setting up Flutter Version Management (FVM) to lock your project to a specific Flutter version
    • Initializing Git repository with proper branch structure

Codika Configuration File

After setup, Codika generates a configuration file at .codika/config/codika.yaml that captures your choices. This file is valuable for:

  1. Understanding what was configured
  2. Version-controlling your Codika settings
  3. Recreating the same project setup later

Here's a simplified example:

projectName: quickstart_project
appName: QuickStart Project
organisationName: com.example
git: true
gitRemoteUrl: "git@github.com:Your-Organization/quickstart-project.git"
starterProject: flutter_starter
environments:
- dev
- prod
firebaseProjects:
dev: your-dev-project-id
prod: your-prod-project-id
components:
- core_app_icon
- core_splash_screen
- core_localizations
- core_firebase

You can use this file to recreate the same setup with:

codika create -c .path/to/codika.yaml

Run Your App

Once Codika finishes creating your project, you can immediately run it with the pre-configured launch configurations:

Navigate to the Run and Debug panel to find these launch configurations:

  • DEV | Debug
  • DEV | Profile
  • DEV | Release
  • PROD | Debug
  • PROD | Profile
  • PROD | Release

Project Structure Overview

Codika creates a standard Flutter project structure with additional files for multi-environment support:

your_project/
├── .codika/config/ # Configuration storage
│ ├── codika.yaml # Project configuration
│ ├── dev/ # Dev environment configs
│ └── prod/ # Production environment configs
├── android/ # Android platform code
├── assets/images/
│ ├── app_icon/ # App icon assets
│ └── splash_screen/ # Splash screen assets
├── codika/config/ # Visual customization
│ ├── splash_screen.yaml # Splash screen settings
│ └── app_icon.yaml # App icon settings
├── ios/ # iOS platform code
├── lib/ # Standard Flutter source
│ ├── main_dev.dart # Dev entry point
│ ├── main_prod.dart # Production entry point
│ └── ... # Your application code
└── test/ # Test files

Customizing Your App

Codika makes it easy to customize your app's visuals. Under the hood, it uses Flutter Launcher Icons and Flutter Native Splash packages to generate all the required assets for different platforms. To update these assets, simply run:

codika update-visuals

For detailed instructions on customizing these assets, see the Modify App Icon and Splash Screen guide.

Deployment Pipeline Preview

After getting your app running locally, Codika offers powerful deployment automation capabilities. To take advantage of these features, you'll first need to complete the Codika Configuration Guide to set up your credentials and accounts.

Once configured, you can set up a complete CI/CD pipeline with minimal effort:

codika app config codemagic
codika app config app-store
codika app config play-store
codika app config ci-cd

This command creates workflow configurations that handle signing, environment variables, and build settings. Once configured, you can deploy your app with simple commands:

# Creates a new version branch and triggers CI build
codika app build

# Deploys code-push updates via Shorebird
codika app patch

# Moves builds between environments (dev → prod)
codika app promote

These commands transform complex DevOps tasks into single-line commands, letting you focus on building features rather than wrestling with deployment processes.

What's Next?

This quickstart has helped you create a basic Flutter project with some professional elements, but it's just the beginning of what Codika offers. The real power of Codika lies in its deployment automation capabilities, which transform time-consuming DevOps tasks into simple commands.

To experience the full value of Codika's professional tooling:

  1. Start with the Configuration Guide to set up your credentials and accounts
  2. Then move to Zero to Stores to learn how Codika can:
    • Automate CI/CD pipeline setup with Codemagic
    • Handle app signing and distribution
    • Manage over-the-air updates with Shorebird
    • Streamline deployments to app stores

Codika is designed to eliminate the complexity of professional mobile app infrastructure, letting you focus on building great apps rather than wrestling with deployment processes.