Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

hossain-khan/android-compose-app-template

Repository files navigation

Android - Circuit App Template

An Android App template that is preconfigured with ⚑️ Circuit UDF architecture.

Tip

Google also has an official architectural template available for starter apps. https://github.com/android/architecture-templates

What do you get in this template? πŸ“œ

  • βœ”οΈ Circuit library setup for the app
  • βœ”οΈ Metro Dependency Injection for all Circuit Screens & Presenter combo
  • βœ”οΈ GitHub Actions for CI
  • βœ”οΈ Google font for choosing different app font.
  • βœ”οΈ BuildConfig turned on with example of reading config from local.properties file.
  • βœ”οΈ Kotlin formatter plugin for code formatting and linting
  • βœ”οΈ Work Manager for scheduling background tasks

Warning

This template is only for Android app setup. If you are looking for a multi-platform supported template, look at the official Circuit example apps included in the project repository.

Post-process after cloning πŸ§‘β€πŸ­

  1. Checkout the cloned repo
  2. Navigate to repo directory in your terminal

You have two options for customizing this template:

Option 1: Automated Customization (Recommended)

Option 1: Automated Customization (Recommended) πŸ€–

Run the setup script to automatically handle most of the configuration:

Script Usage:

./setup-project.sh <package-name> <AppName> [flags]

Parameters:

  • <package-name> - Your app's package name in reverse domain notation (e.g., com.mycompany.appname)
  • <AppName> - Your app's class name in PascalCase (e.g., TodoApp, NewsApp, MyPhotos)
    • Used to rename CircuitApp β†’ {AppName}App
    • Becomes your main Application class name
    • Sets app display name in strings.xml
    • Used in git commit messages

Examples:

# Basic usage - keeps examples and WorkManager by default
./setup-project.sh com.mycompany.appname MyAppName
# Remove WorkManager if you don't need background tasks
./setup-project.sh com.mycompany.appname MyAppName --remove-workmanager
# Keep the script for debugging (useful during development)
./setup-project.sh com.mycompany.appname MyAppName --keep-script

What the script does automatically:

  • Renames package from app.example to your preferred package name
  • Preserves subdirectory structure (ui/theme/, di/, circuit/, work/, data/)
  • Updates app name and package ID in XML and Gradle files
  • Renames CircuitApp to YourAppNameApp
  • Keeps WorkManager files by default (use --remove-workmanager to exclude)
  • Creates a fresh git repository with descriptive initial commit
  • Removes template-specific files
Option 2: Manual Customization πŸ”§

Option 2: Manual Customization πŸ”§

If you prefer manual control, complete these tasks:

  • Rename the package from app.example to your preferred app package name.
  • Update directory structure based on package name update
  • Update app name and package id in XML and Gradle
  • Rename CircuitApp*** to preferred file names
  • Remove Example*** files that were added to showcase example usage of app and Circuit.
  • Remove WorkManager and Worker example files if you are not using them.
Additional Manual Steps (Both Options) πŸ“

Additional Manual Steps (Both Options) πŸ“

These still need to be done manually after using the script:

  • Update .editorconfig based on your project preference
  • Update your app theme colors (use Theme Builder )
  • Generate your app icon (use Icon Kitchen )
  • Update/remove repository license
  • Configure renovate for dependency management or remove renovate.json file
  • Choose Google font for your app, or remove it.
  • Verify Android Gradle Plugin (AGP) version compatibility with your development environment in gradle/libs.versions.toml

Demo πŸ“Ή

Here is a demo of the template app containing screens shown in the πŸ“– circuit tutorial documentation.

The demo showcases the basic Circuit architecture pattern with screen navigation and state management.

Circuit-Template-App-DEMO.mp4

Templated Apps

Here are some apps that has been created using the template.

πŸ“± App Repo URL
Weather Alert https://github.com/hossain-khan/android-weather-alert
Remote Notify https://github.com/hossain-khan/android-remote-notify
TRMNL Display https://github.com/usetrmnl/trmnl-android
TRMNL Buddy https://github.com/hossain-khan/trmnl-android-buddy

About

An Android App template that is preconfigured with Circuit UDF architecture.

Topics

Resources

License

Stars

Watchers

Forks

Contributors 5

AltStyle γ«γ‚ˆγ£γ¦ε€‰ζ›γ•γ‚ŒγŸγƒšγƒΌγ‚Έ (->γ‚ͺγƒͺγ‚ΈγƒŠγƒ«) /