33 lines
1.2 KiB
Markdown
33 lines
1.2 KiB
Markdown
# Architecture Documentation
|
|
|
|
## Overview
|
|
|
|
CalMiner is a web application for planning mining projects, estimating costs, returns, and profitability. It uses Monte Carlo simulations for risk analysis and supports multiple scenarios.
|
|
|
|
## System Components
|
|
|
|
- **Frontend**: Web interface for user interaction (to be defined).
|
|
- **Backend**: Python API server (e.g., FastAPI) handling business logic.
|
|
- **Database**: PostgreSQL with schema `bricsium_platform` (see `structure.sql`).
|
|
- **Simulation Engine**: Python-based Monte Carlo runs and stochastic calculations.
|
|
|
|
## Data Flow
|
|
|
|
1. User inputs scenario parameters via frontend.
|
|
2. Backend validates and stores in database.
|
|
3. Simulation engine runs Monte Carlo iterations using stochastic variables.
|
|
4. Results stored in `simulation_result` table.
|
|
5. Frontend displays outputs like NPV, IRR, EBITDA.
|
|
|
|
## Database Architecture
|
|
|
|
- Schema: `bricsium_platform`
|
|
- Key tables: Scenarios, parameters, consumptions, outputs, simulations.
|
|
- Relationships: Foreign keys link scenarios to parameters, consumptions, and results.
|
|
|
|
## Next Steps
|
|
|
|
- Define API endpoints.
|
|
- Implement simulation logic.
|
|
- Add authentication and user management.
|