Skip to content

Latest commit

 

History

History
65 lines (46 loc) · 1.28 KB

File metadata and controls

65 lines (46 loc) · 1.28 KB

StockApp

A two-tier architecture demonstration project consisting of a Ktor-based backend API and an Android frontend application.

Components

  • StockAppServer: Backend REST API built with Ktor
  • StockAppViewer: Android frontend application using Jetpack Compose

Features

  • Real-time stock price fetching
  • Top 5 stocks display with dynamic sorting
  • Live price updates
  • Modern UI with Jetpack Compose
  • RESTful API communication via Retrofit

Backend (StockAppServer)

Technology Stack

  • Kotlin
  • Ktor Framework
  • Kotlin Serialization
  • Logging Framework

Setup

  1. Open StockAppServer in IntelliJ IDEA
  2. Run the server:
    ./gradlew run

Frontend (StockAppViewer)

Technology Stack

  • Jetpack Compose
  • ViewModel
  • Retrofit
  • Kotlin Coroutines

Setup

  1. Open StockAppViewer in Android Studio
  2. Default API endpoint: http://10.0.2.2:8080/stocks
  3. Run on Android Emulator

API Endpoints

Method Endpoint Description
GET /stocks Retrieve top 5 stocks with prices
GET / Health check endpoint

Project Structure

StockApp/
├── StockAppServer/    # Ktor Backend
├── StockAppViewer/    # Android Frontend
├── .gitignore
└── README.md