How markalmax/retrack works
1. Project type and runtime
- retrack is a Flutter client application: one Dart codebase targeting Android, iOS, web, Linux, macOS, and Windows.
- There is no visible backend or cloud service in the repo; the app appears to be primarily a local device media management/player UI.
2. Primary application entrypoint
- lib/main.dart is the app bootstrap point and likely wires together the top-level widget tree, routing, and theme.
- All business/UI features under lib/ hang off this entrypoint.
3. Feature surface in lib/Screens
- The app is organized around a small set of screens:
- songs_page.dart for browsing songs
- playlist_page.dart for browsing playlists
- song.dart and playlist.dart as the corresponding domain/UI models or screen components
- This suggests a navigation model centered on songs vs. playlists as the main user-facing boundaries.
4. Data acquisition layer
- lib/Services/media_scanner.dart is the key non-UI service.
- From its name and placement, it likely scans local device storage/media sources and produces song metadata for the UI.
- This service is the main boundary between the Flutter app and device-level media access.
5. Likely internal data flow
- The app likely flows from:
- app startup in main.dart
- media discovery via media_scanner.dart
- transformation into song/playlist objects in song.dart / playlist.dart
- rendering and interaction in songs_page.dart / playlist_page.dart
- The architecture is therefore service → model → screen rather than server-driven.
6. Platform integration boundaries
- Native platform folders exist for Android, iOS, Linux, macOS, Windows, and web, but they mostly contain generated or standard Flutter shell code.
- The only obvious custom native hook is android/app/src/main/kotlin/.../MainActivity.kt, which is the Android embedding entrypoint.
- On iOS and macOS, the standard AppDelegate.swift / MainFlutterWindow.swift wrappers indicate Flutter is the UI layer with minimal native logic.
7. Platform shell vs shared app logic
- The android/, ios/, macos/, linux/, and windows/ directories form the platform adapters that launch the Flutter engine.
- The shared architecture lives almost entirely in lib/, making the repo a classic single shared presentation layer with thin platform runners.
8. Web packaging
- web/index.html and web/manifest.json show the app can also be packaged for browser deployment.
- The web side appears standard Flutter-generated scaffolding rather than a separate web architecture.
9. Build and dependency management
- pubspec.yaml / pubspec.lock define the Flutter/Dart dependencies and assets.
- analysis_options.yaml indicates linting/static analysis is part of the development workflow.
- android/build.gradle.kts, iOS Podfiles, and platform-specific project files are standard Flutter build integration points.
10. CI/CD and repo automation
- .github/workflows/build.yml suggests automated builds or validation in GitHub Actions.
- This is the main repository-level delivery pipeline visible in the tree.
11. Testing footprint
- Platform test folders exist for iOS and macOS (RunnerTests), but there is no obvious Dart test suite in the tree shown.
- That implies limited or scaffold-level automated testing, with the core app logic concentrated in shared Dart code.
12. Architecture summary for diagramming
- Draw this repo as a Flutter cross-platform shell with:
- a shared Dart application core in lib/
- a media-scanning service feeding song/playlist features
- screen-level presentation for songs and playlists
- thin native launchers per platform
- GitHub Actions handling build automation
- No external API boundary is evident; the main integration boundary is device/local media access.
Main entry points: main.dart App start · song.dart Song model · playlist.dart Playlist model · media_scanner.dart Media scanner
Components 15
Shared Dart app
Cross-platform Flutter application logic in lib/
- App start · Bootstraps the shared widget tree and top-level app setup
lib/main.dart - Songs page · Primary browsing screen for songs
lib/Screens/songs_page.dart - Playlists · Primary browsing screen for playlists
lib/Screens/playlist_page.dart - Song model · Represents song data and related screen state
lib/Screens/song.dart - Playlist model · Represents playlist data and related screen state
lib/Screens/playlist.dart - Media scanner · Scans local media sources and produces song metadata
lib/Services/media_scanner.dart
Platform shells
Native launchers and embedding wrappers for each target platform
- Android host · Android embedding entrypoint for the Flutter engine
android/app/src/main/kotlin/com/example/retrack/MainActivity.kt - iOS host · iOS Flutter wrapper and app delegate
ios/Runner/AppDelegate.swift - macOS host · macOS Flutter wrapper and window host
macos/Runner/MainFlutterWindow.swift - Linux host · Linux runner and Flutter shell
linux/runner/main.cc - Windows host · Windows runner and Flutter shell
windows/runner/main.cpp - Web shell · Browser packaging and app boot scaffolding
web/index.html
Delivery
Build and automation entrypoints
- Dart deps · Flutter package dependencies and assets
pubspec.yaml - Lint rules · Static analysis and lint configuration
analysis_options.yaml - CI build · GitHub Actions workflow for build and validation
.github/workflows/build.yml
Connections 16
- App start → Media scanner: uses · App startup wires in local media discovery
- App start → Songs page: opens · Main app route reaches the songs browsing UI
- App start → Playlists: opens · Main app route reaches the playlists browsing UI
- Media scanner → Song model: produces · Scanner outputs song data consumed by the UI
- Song model → Songs page: renders in · Song objects are displayed on the songs screen
- Playlist model → Playlists: renders in · Playlist objects are displayed on the playlists screen
- Song model → Playlist model: groups into · Songs can be organized into playlists
- Android host → App start: launches · Android shell starts the shared Flutter app
- iOS host → App start: launches · iOS shell starts the shared Flutter app
- macOS host → App start: launches · macOS shell starts the shared Flutter app
- Linux host → App start: launches · Linux shell starts the shared Flutter app
- Windows host → App start: launches · Windows shell starts the shared Flutter app
- Web shell → App start: loads · Web packaging loads the shared Flutter app in browser
- Dart deps → App start: configures · Dependencies and assets shape the Flutter app build
- Lint rules → App start: constrains · Linting and analysis apply to the shared Dart code
- CI build → Dart deps: builds · CI uses the project configuration to build and validate