How katharizasyah/simulasi-kredit-dummy works
This repository provides a local, authenticated Flask API for dummy vehicle-credit, budget, and refinancing simulations. A caller submits Rupiah amounts and profile inputs; the API validates them, applies configured defaults and reference coefficients, then returns simulation results and any excluded tenors. Credit and budget share a calculator; refinancing has separate validation and calculation. The README also documents an optional Azure Foundry agent integration. Runtime wiring is based on sampled app.py and calculator.py; the broader Foundry setup is documented, not verified in source.
Main entry points: calculator.py Credit / budget simulation · app.py API-key check · rates.json Reference rates · call_agent.py Agent invocation sample
Components 19
HTTP API
- Flask application
app.py - API-key check
app.py - Credit endpoint
app.py - Budget endpoint
app.py - Refinancing endpoint
app.py - Health endpoint
app.py - OpenAPI endpoint
app.py - OpenAPI response
app.py
Credit & Budget
- Credit / budget simulation
calculator.py - Input validation
calculator.py - Tenor result calculation
calculator.py - Reference rates
rates.json
Refinancing
- Refinancing validation
calculator.py - Refinancing simulation
calculator.py
API Integration
- OpenAPI definition
openapi.json - Agent invocation sample
call_agent.py
Other components
- API caller
- Foundry agent
- Simulation response
Connections 21
- API caller → Flask application: sends requests
- Foundry agent → Flask application: calls API
- Flask application → API-key check: checks API key
- API-key check → Credit endpoint: allows request
- API-key check → Budget endpoint: allows request
- API-key check → Refinancing endpoint: allows request
- API caller → Health endpoint: checks status
- API caller → OpenAPI endpoint: requests schema
- OpenAPI endpoint → OpenAPI response: calls
- OpenAPI response → OpenAPI definition: reads
- Credit endpoint → Credit / budget simulation: calls credit mode
- Budget endpoint → Credit / budget simulation: calls budget mode
- Credit / budget simulation → Input validation: validates inputs
- Credit / budget simulation → Tenor result calculation: calculates each tenor
- Credit / budget simulation → Reference rates: uses coefficients
- Refinancing endpoint → Refinancing simulation: calls
- Refinancing simulation → Refinancing validation: validates inputs
- Refinancing simulation → Reference rates: uses configuration
- Agent invocation sample → Foundry agent: invokes agent
- Credit / budget simulation → Simulation response: returns results
- Refinancing simulation → Simulation response: returns results