A sample stock market application for Android, built entirely with modern technologies like kotlin,Jetpack Compose, Coroutines, Flow, and Hilt. This project serves as a showcase of modern Android development practices, including a clean architecture and a reactive UI.
- Top Movers Home Screen: Displays top gainers, losers, and most actively traded stocks in a 2x2 scrollable grid format along with see more button.
- Company Listings: A searchable list of all available stocks with pull-to-refresh functionality and the list is locally cached using room .
- Company Details: A detailed screen for each company, showing its profile, description, and an interactive stock chart.
- Watchlist Management:
- Create multiple, named watchlists.
- Add stocks to any watchlist from the company details screen via a bottom sheet.
- View all watchlists in an expandable/collapsible list.
- Delete individual stocks from a watchlist.
- Delete entire watchlists with a confirmation dialog.
- Modern UI: Built with Material 3, featuring a floating capsule-shaped navigation bar and dynamic, scroll-aware top app bars.
stock-app-demo.mp4
- UI: Jetpack Compose with Material 3.
- Asynchronous Programming: Kotlin Coroutines and Flow.
- Dependency Injection: Hilt.
- Networking: Retrofit & OkHttp.
- Data Parsing: Moshi (for JSON) and a custom CSV parser.
- Database: Room for caching and watchlist storage.
- Navigation: Jetpack Navigation for Compose.
- Clean Architecture: Follows a clear separation of concerns between UI, Domain, and Data layers.
- MVVM (Model-View-ViewModel): For separating UI logic from business logic.
- MVI-like State Management: The UI is a function of a single
Stateobject, and all user actions are handled asEvents. - Repository Pattern: A single source of truth for all application data.
To build and run this project, you will need to get a free API key from Alpha Vantage.
- Clone the repository:
git clone https://github.com/TheHamckerCapy/Stock_app.git
- Open the project in Android Studio.
- Add your API key: Create a new file in
app/src/main/java/com/example/stock_app/Constants.kt. - Add your key to this file like so:
// In ApiConstants.kt package com.example.stock_app const val API_KEY = "YOUR_API_KEY_HERE"
- Build and run the app.