AI-powered "Consequence Engine" that simulates outcomes for real-life decisions. Input a scenario, get ranked possibilities with probability labels, behavioral reasoning, and ripple effects. Includes a smarter alternative and 30-day projection to help users act with clarity, foresight, and reduced regret.
Consequence-Engine/
├── backend/ # Python Flask API
│ ├── app.py
│ └── requirements.txt
└── frontend/ # React (Vite) + Tailwind CSS
├── src/
│ ├── components/
│ │ ├── InputBox.jsx
│ │ ├── OutcomeCard.jsx
│ │ ├── ResultsGrid.jsx
│ │ ├── SmarterDecision.jsx
│ │ └── ProjectionSection.jsx
│ ├── App.jsx
│ ├── main.jsx
│ └── index.css
├── index.html
├── package.json
└── vite.config.js
- Python 3.10+
- Node.js 20.19+ (or 22.12+)
cd backend
pip install -r requirements.txt
python app.pyThe Flask API will be available at http://localhost:5000.
POST /simulate
Request body:
{ "scenario": "I am thinking about quitting my job to start a business." }Response:
{
"outcomes": [
{
"label": "Most Likely",
"probability": 0.72,
"outcome": "...",
"reasoning": "...",
"rippleEffect": "..."
},
{ "label": "Likely", "probability": 0.20, "outcome": "...", "reasoning": "...", "rippleEffect": "..." },
{ "label": "Less Likely", "probability": 0.08, "outcome": "...", "reasoning": "...", "rippleEffect": "..." }
],
"betterDecision": "...",
"projection": {
"mentalState": "...",
"performance": "...",
"riskLevel": "..."
}
}Open a second terminal:
cd frontend
npm install
npm run devThe app will be available at http://localhost:5173.
The Vite dev server automatically proxies
/simulaterequests tohttp://localhost:5000, so both servers must be running simultaneously.
cd frontend
npm run buildThe static output will be in frontend/dist/.