EMBA_ROI

Michigan State EMBA ROI Calculator

A Flask + React single-page app that estimates the financial return of pursuing Michigan State University’s Executive MBA program.

Features

Architecture

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

Local development

Backend (Python 3.10+)

pip install -e ".[dev]"
pytest                          # run the test suite
flask --app backend run --debug # serve API on http://localhost:5000

Frontend (Node 20+)

cd frontend
npm install
npm run dev                     # Vite on http://localhost:5173, proxies /api to :5000

Production-equivalent (single port)

cd frontend && npm install && npm run build && cd ..
flask --app backend run         # serves the built SPA from /

Production

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.

Health check

GET /healthz returns {"status": "ok"} for container/load-balancer probes.