← Back to selected work
PERSONAL · FULL-STACK

Crypto DCA Simulator

Comparing recurring and lump-sum investments through an explicit simulation model.

Portfolio project

Java 21Spring Boot 3Next.jsTypeScriptMySQLChart.js

The problem

DCA and lump-sum strategies invest at different times. Comparing them requires consistent inputs and monetary calculations, then a clear presentation of invested capital and portfolio value over time.

My contribution

I built the Java/Spring Boot simulation backend and the Next.js/TypeScript interface, connecting strategy calculations, persistence, and chart-based results.

How the system connects

Next.js + Chart.js → Spring Boot simulation service → DCA strategy, Lump-sum strategy, MySQL
Simplified component view derived from the repository’s layered architecture.Open full-size diagram ↗

Engineering decisions

01

Represent strategies as interchangeable algorithms

Strategy and Factory patterns separate DCA and lump-sum calculations from orchestration. The service can select an algorithm while the controller continues to expose the same simulation contract.

02

Use decimal arithmetic for financial values

BigDecimal keeps monetary calculations out of binary floating-point arithmetic. This makes numeric handling explicit; rounding and the historical-data assumptions still belong to the simulation model.

03

Keep API contracts separate from persistence

Request and response DTOs define the interface, while repositories handle MySQL persistence. Next.js and Chart.js present the results without exposing database entities as the frontend contract.

What was delivered

An educational simulator using historical scenarios. Results depend on the selected period and simulation inputs.

Explore the sources

View résumé · PDF ↗Next projectP1Grid ↗