update Readme

This commit is contained in:
Theo Tappe
2026-05-13 14:29:13 +02:00
parent 1eaa7d0896
commit 6f85cdc01e
+36 -110
View File
@@ -1,126 +1,52 @@
Bugs:
#### Motivation
- state management in Challenge (also asset select and user select)
- cash updating
- favorize system
This application was developed by Theo Tappe as a comprehensive technical showcase for my application and to have some fun with friends.
It demonstrates a full-stack approach, combining cross-platform development with a robust, automated infrastructure.
Concept:
- Challenge with other people with set amount of money and time with the goal goal to make as much money as possible
-
#### Frontend Architecture
Features:
- **Native Performance via KMP**:
By leveraging Kotlin Multiplatform, the app compiles to native binaries.
This ensures the UI remains fluid and responsive, meeting the high performance standards of modern applications.
- Search Stocks
- “Buy / Sell” Stocks
- Save / Get Data vie Alpaka API (probably the Broker API)
- Comparison with average
- Random Avatars using https://robohash.org/
- **Maximum Code Reuse with Compose Multiplatform**:
The entire UI layer is built using Compose Multiplatform, sharing code across all supported platforms.
This ensures feature parity and allows a single developer to maintain a multi-platform ecosystem efficiently.
Optional Features:
- **End-to-End Type Safety**:
To eliminate integration errors, Data Transfer Objects (DTOs) are shared between the frontend and backend.
This creates a "Single Source of Truth," ensuring the app and server are always in sync and reducing bugs during API communication.
- Leverage
- Analytics
- Challenge in specific Region / Sector etc
- Comparison with all-world etf
This is a Kotlin Multiplatform project targeting Android, Web, Desktop (JVM), Server.
#### Backend Setup
* [/composeApp](./composeApp/src) is for code that will be shared across your Compose Multiplatform applications.
It contains several subfolders:
- [commonMain](./composeApp/src/commonMain/kotlin) is for code thats common for all targets.
- Other folders are for Kotlin code that will be compiled for only the platform indicated in the folder name. For
example, if you want to use Apples CoreCrypto for the iOS part of your Kotlin app,
the [iosMain](./composeApp/src/iosMain/kotlin) folder would be the right place for such calls. Similarly, if you
want to edit the Desktop (JVM) specific part, the [jvmMain](./composeApp/src/jvmMain/kotlin) folder is the
appropriate location.
* [/server](./server/src/main/kotlin) is for the Ktor server application.
* [/shared](./shared/src) is for the code that will be shared between all targets in the project.
The most important subfolder is [commonMain](./shared/src/commonMain/kotlin). If preferred, you
can add code to the platform-specific folders here too.
- **Zero-Trust Validation**:
While the client provides instant feedback for a smooth UX, all data is strictly validated on the backend.
This ensures the system remains secure and resilient against manipulated client-side requests.
### Build and Run Android Application
- **Financial Data Integrity**:
To avoid the precision errors common with floating-point math,
money is handled via a dedicated Cash class using Long values for both major and minor units,
which ensures accuracy for all financial calculations.
To build and run the development version of the Android app, use the run configuration from the run widget
in your IDEs toolbar or build it directly from the terminal:
- **Real-World Data Integration**:
The application integrates with the Alpaca API to fetch market data.
- on macOS/Linux
#### Infrastructure & DevOps
```shell
./gradlew :composeApp:assembleDebug
```
- on Windows
The application is deployed on a self-managed production environment that I have maintained for several years,
hosting services like Nextcloud, GitLab, Homeassistant or Vaultwarden (Bitwarden server).
This project follows Infrastructure as Code principles:
```shell
.\gradlew.bat :composeApp:assembleDebug
```
- **Orchestration with Kubernetes via K3S**:
Backend services are containerized and managed within a K3S cluster.
This setup ensures high availability, automated rollouts, and efficient resource management.
### Build and Run Desktop (JVM) Application
- **Reproducible Systems via NixOS**:
K3S runs on NixOS, allowing for entirely declarative and reproducible system configurations.
This minimizes "it works on my machine" issues and ensures a stable production environment.
To build and run the development version of the desktop app, use the run configuration from the run widget
in your IDEs toolbar or run it directly from the terminal:
- on macOS/Linux
```shell
./gradlew :composeApp:run
```
- on Windows
```shell
.\gradlew.bat :composeApp:run
```
### Build and Run Server
To build and run the development version of the server, use the run configuration from the run widget
in your IDEs toolbar or run it directly from the terminal:
- on macOS/Linux
```shell
./gradlew :server:run
```
- on Windows
```shell
.\gradlew.bat :server:run
```
### Build and Run Web Application
To build and run the development version of the web app, use the run configuration from the run widget
in your IDE's toolbar or run it directly from the terminal:
- for the Wasm target (faster, modern browsers):
- on macOS/Linux
```shell
./gradlew :composeApp:wasmJsBrowserDevelopmentRun
```
- on Windows
```shell
.\gradlew.bat :composeApp:wasmJsBrowserDevelopmentRun
```
- for the JS target (slower, supports older browsers):
- on macOS/Linux
```shell
./gradlew :composeApp:jsBrowserDevelopmentRun
```
- on Windows
```shell
.\gradlew.bat :composeApp:jsBrowserDevelopmentRun
```
---
Learn more about [Kotlin Multiplatform](https://www.jetbrains.com/help/kotlin-multiplatform-dev/get-started.html),
[Compose Multiplatform](https://github.com/JetBrains/compose-multiplatform/#compose-multiplatform),
[Kotlin/Wasm](https://kotl.in/wasm/)…
We would appreciate your feedback on Compose/Web and Kotlin/Wasm in the public Slack
channel [#compose-web](https://slack-chats.kotlinlang.org/c/compose-web).
If you face any issues, please report them on [YouTrack](https://youtrack.jetbrains.com/newIssue?project=CMP).
- **Virtualization with Proxmox**:
The entire stack is hosted on a Proxmox VE cluster.
This allows me to manage an internal network including TrueNAS for storage, OPNsense for networking and NixOS for deploying.