A Flask + React single-page app that estimates the financial return of pursuing Michigan State University’s Executive MBA program.
backend/ Flask app factory + JSON API (POST /api/calculate)
tax.py Filing-status-aware tax brackets
calculator.py Pure-Python projection (no pandas / numpy)
schemas.py Input/output dataclasses + validation
api.py Blueprint
frontend/ React + Vite + Tailwind SPA (Recharts for the chart)
tests/ pytest unit + API tests
pip install -e ".[dev]"
pytest # run the test suite
flask --app backend run --debug # serve API on http://localhost:5000
cd frontend
npm install
npm run dev # Vite on http://localhost:5173, proxies /api to :5000
cd frontend && npm install && npm run build && cd ..
flask --app backend run # serves the built SPA from /
docker build -t emba-roi .
docker run --rm -p 8000:8000 emba-roi
Or with gunicorn directly:
gunicorn -w 2 -b 0.0.0.0:8000 'backend:create_app()'
The included Procfile works for Render, Railway, Fly, Heroku-style deploys.
GET /healthz returns {"status": "ok"} for container/load-balancer probes.