A streaming offline first US stock ticker Android app based on Tiingo API free tier.
- Clean architecture
- OkHttp WebSocket + Moshi with multivariate JSON parsing + Retrofit
- Device DayNight support ( see ThemedTypedValues and attrs.xml)
- Latest AAC ViewModel + Jetpack Navigation + Room
- Coroutine + StateFlows
- Hilt - Focus on only constructor-based injection. Classes with non-injectable constructors are provided by delegate classes ( e.g DelegatedDispatchers)
- Joda BigMoney (Feel free to look at some of the historical
coretests for case failures with BigDecimal) - Various unit tests for
core,core-framework(infrastructure), AAC ViewModels and UI layers - Sample integration test (at
core-frameworkonly for now) - StrictMode friendly ( refer StrictModeDefaults)
- There were indeed some IO calls during OkHttp initialization. Hence why any
OkHttpClientinjection is provided via aProviderinstead - Lifecycle
launchis executing onDispatchers.Maindue toLifecycle.addObserverrequirements- Any first access to AAC ViewModel in
suspendblocks may incur IO thread penalty if you're not careful - Thus, always opt for
lazywhenever you're touching repository layers and below
- Any first access to AAC ViewModel in
- DayNight is surprisingly easy to implement once you start abusing
attrs - The current Gradle modules (
core,core-framework,candleflask-android) still doesn't scream correct to me. I'm all ears for opinions.
- Even more unit tests
- UI to ViewModel behavior tests
All contributions are welcomed. Simply branch out fromdevelop, follow the current commit messages style, squash, and
submit your Pull Request.
For integration tests, you can add your own Tiingo API key in the project local.properties via
INTEGRATION_TEST_API_KEY=myKeyValueRun ./gradlew testDebug to run all tests.
Since it was wired manually from scratch, feel free to extract the Tiingo datasource packages into your own projects/libraries. A Tiingo library was planned initially but scrapped due to lack of time. Therefore the models were intentionally left as exhaustive as possible as per the latest API spec.
This project is provided under the Apache 2.0 License




