Breakeven
Breakeven shows Ghana Stock Exchange investors the exact price that gets their money back after fees.
- Fintech product
- 2026
- Founder · Full-stack engineering

- rise needed just to break even in the worked example
- 4.6%rise needed just to break even in the worked example
- database migrations so far
- 36database migrations so far
- commits in the first three weeks
- 100commits in the first three weeks
The brief
A 20% price rise is not a 20% profit. On the Ghana Stock Exchange, fees come off when you buy and again when you sell: brokerage plus four levies. Most investors only find out what that cost them after they sell. I built Breakeven to answer one question first: at what price do I actually get my money back?
What it does
- Break-even price for every holding, with each fee shown line by line
- Sell simulator and target prices: what lands in your account at a given price, and the price you need for the profit you want
- Email alerts when a stock reaches a level you chose
- Dividends, with a second break-even that counts what you have already been paid
- Statement import: upload an IC Securities statement or contract note and your trades fill in
- Plans paid by Mobile Money or card
It is live for IC Securities. Fee rules are stored as data, so adding a broker or a market does not mean rewriting code.
How I built it
The fee engine is a plain Java library with no framework in it. Rates are tiered by trade size, and each fee line is rounded on its own, the way a broker does it. That makes net proceeds jump at tier edges, so the break-even price can't be solved with a formula. The engine scans price ticks until it finds the first one that pays you back. Its tests are real contract notes, and they must match to the pesewa.
The back end is Java 25 and Spring Boot 4 on PostgreSQL, with plain SQL through Spring JDBC and Flyway migrations. It is split into modules for alerts, billing, digests, referrals and a staff console with an audit trail. Prices come from the broker's feed every 15 minutes during trading hours.
The web app is Next.js 16 and React 19, installable as a PWA. Sign-in uses a JWT that stays in an httpOnly cookie behind a small proxy, so the browser's JavaScript never holds it. Cloudflare Turnstile keeps bots off the forms.
Statements are parsed from PDF in memory with PDFBox and never stored. The only thing kept is a keyed hash of the account number, so the same statement can't be imported twice.
Payments run on Paystack, and email goes out through Resend.
Where it runs
The app runs on one Hetzner server with Docker Compose: Caddy, Next.js, Spring Boot and Postgres. Cloudflare sits in front, and the server's firewall only accepts web traffic that comes through Cloudflare. A GitHub Actions pipeline runs the tests, builds the images, deploys over SSH with a rolling restart and checks the app is healthy. The database is backed up every night.
The marketing site at breakeven.live is a separate static Next.js build on Cloudflare Workers. Its free calculators re-implement the fee maths in TypeScript, and the build fails if their answers differ from the app's test cases.