How alonecol/stem-financelab works
STEM FinanceLab is a Streamlit educational simulator for financial management. The participant identifies themself, diagnoses financial knowledge, chooses a scenario and funding strategy, plans a budget, responds to execution events, and reviews financial results and learning feedback. The app coordinates these stages; the financial motor calculates cash flow, statements, and indicators, while persistence and reporting support review. Research-mode consent and the optional AI tutor are distinct capabilities. Edges follow the README and shown app imports/calls; unsampled implementation details are not inferred.
Main entry points: app.py Streamlit workflow · database.py Persistence operations · eventos.py Event selection · tutor_ia.py AI tutor
Components 21
Participant experience
- Streamlit workflow
app.py - Session state
core/session.py - Research consent
core/tcle.py - Knowledge diagnosis
data/questionario.py - Shared UI
core/ui.py
Simulation domain
- Scenario and choices
data/cenario.py - Finance concepts
data/conceitos.py - Funding options
data/cenario.py - Event scenarios
data/eventos.py - Event selection
core/eventos.py - Financial motor
core/motor_financeiro.py - Finance calculations
core/financeiro.py
Results and guidance
- Rule-based feedback
core/feedback.py - AI tutor
core/tutor_ia.py - Simulation report
core/relatorio.py
Persistence and configuration
- Persistence operations
core/database.py - SQLite database
database - Runtime configuration
core/config.py - Logging setup
core/logging_config.py
Other components
- Participant
- OpenAI API
Connections 21
- Participant → Streamlit workflow: uses
README.md - Streamlit workflow → Session state: initializes state
app.py - Streamlit workflow → Research consent: presents consent
app.py - Streamlit workflow → Knowledge diagnosis: loads diagnosis
app.py - Streamlit workflow → Shared UI: renders
app.py - Streamlit workflow → Scenario and choices: loads scenarios
app.py - Streamlit workflow → Finance concepts: loads concepts
app.py - Streamlit workflow → Funding options: records funding
app.py - Streamlit workflow → Event selection: selects events
app.py - Event selection → Event scenarios: imports events
core/eventos.py - Streamlit workflow → Financial motor: records decisions
app.py - Streamlit workflow → Finance calculations: uses calculations
app.py - Streamlit workflow → Rule-based feedback: generates feedback
app.py - Streamlit workflow → AI tutor: requests guidance
app.py - AI tutor → OpenAI API: requests completion
core/tutor_ia.py - Streamlit workflow → Simulation report: builds report
app.py - Streamlit workflow → Persistence operations: saves simulation
app.py - Persistence operations → SQLite database: reads and writes
core/database.py - Persistence operations → Runtime configuration: gets database path
core/database.py - Streamlit workflow → Runtime configuration: loads settings
app.py - Streamlit workflow → Logging setup: configures logging
app.py