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
- βοΈ 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.
- βοΈ
BuildConfigturned on with example of reading config fromlocal.propertiesfile. - βοΈ 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.
- Checkout the cloned repo
- Navigate to repo directory in your terminal
You have two options for customizing this template:
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
- Used to rename
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.exampleto 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
CircuitApptoYourAppNameApp - Keeps WorkManager files by default (use
--remove-workmanagerto exclude) - Creates a fresh git repository with descriptive initial commit
- Removes template-specific files
Option 2: Manual Customization π§
If you prefer manual control, complete these tasks:
- Rename the package from
app.exampleto 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) π
These still need to be done manually after using the script:
- Update
.editorconfigbased 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.jsonfile - 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
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
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 |