How jamesbuhanan/songify works
Project type & purpose
• This is a multi‑module Android sample app showcasing “massively scalable” modular architecture.
• It uses a single‑Activity + Circuit navigation engine + Hilt DI + Gradle “focus” plugins to load only the modules you care about.
• Features are broken into :feature:<name>:public, :feature:<name>:internal, and :feature:<name>:app modules.
• Shared libraries (e.g. :library:spotify, :library:retrofit, :library:design, etc.) follow a public/internal split for UseCases & implementations.
Main components
A. Build Infrastructure
– Gradle “build-logic” conventions & plugins (SongifyRootPlugin, SettingsPlugin, etc.)
– Gradle wrapper, settings.gradle, mkdocs.yml, detekt/lint configs, the “focus” plugin
B. Application Host
– :app module (EntryPointActivity, LemmusApplication)
– Hilt DI graph / AndroidInjector
– Circuit navigation engine
C. Feature Modules (per feature)
– Public (Screen key, data classes)
– Internal (Contract, Presenter, View, Compose UI)
– App (Hilt module wiring start screens)
D. Library Modules
– Common libraries: Compose‑Extensions, Coroutines, Design, Loading UI, BottomNavigation
– Domain/use‑case libraries: Home, Detail, Search, Premium, Session
– Network: Retrofit, Spotify API
E. External Services
– Spotify REST API
– CI/CD (affectedModuleDetector, GraphAssert)
Relationships & interactions
• The single :app module bootstraps Hilt and Circuit.
• Circuit routes ScreenKey → looks up the matching Presenter/View contributed by a feature/*/internal module.
• Presenters invoke UseCase interfaces from library/*:public.
• UseCase implementations live in library/*:internal, some of which call the library/retrofit module.
• library/retrofit module uses Retrofit + Moshi to call Spotify endpoints and returns model objects to UseCases.
• UI components (Jetpack Compose screens) render state from Presenters.
• Gradle “focus” plugin instructs the build system to only configure & compile the modules involved in the current workflow.
Architectural patterns & principles
– Clean Architecture (UI → Presentation → Domain → Data → External)
– Unidirectional Data Flow via Circuit (Presenter emits state → View renders → events back to Presenter)
– SOLID modularization: public vs internal boundaries enforced by GraphAssert
– Dependency Injection by Hilt modules in feature/*:app and library/*:internal
Final checklist
[ ] All layers clearly separated and labeled
[ ] Each module cluster labeled with its Gradle path
[ ] Callouts for key frameworks: Hilt, Circuit, Retrofit, Moshi, Gradle Focus