Add initial implementation of CalMiner with project structure, environment setup, and core features
- Create .env.example for environment variables - Update README with project structure and development setup instructions - Implement FastAPI application with API routes for scenarios and parameters - Add database models for scenarios, parameters, and simulation results - Introduce validation middleware for JSON requests - Create services for running simulations and generating reports - Add testing strategy and directory structure in documentation
This commit is contained in:
@@ -8,8 +8,10 @@ CalMiner is a web application for planning mining projects, estimating costs, re
|
||||
|
||||
- **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`).
|
||||
- **Database**: PostgreSQL.
|
||||
- **Configuration**: Environment variables and settings loaded via `python-dotenv` and stored in `config/` directory.
|
||||
- **Simulation Engine**: Python-based Monte Carlo runs and stochastic calculations.
|
||||
- **API Routes**: FastAPI routers defined in `routes/` for scenarios, simulations, consumptions, and reporting endpoints.
|
||||
|
||||
## Data Flow
|
||||
|
||||
@@ -22,8 +24,15 @@ CalMiner is a web application for planning mining projects, estimating costs, re
|
||||
## Database Architecture
|
||||
|
||||
- Schema: `bricsium_platform`
|
||||
- Key tables: Scenarios, parameters, consumptions, outputs, simulations.
|
||||
- Relationships: Foreign keys link scenarios to parameters, consumptions, and results.
|
||||
- Key tables include:
|
||||
|
||||
- `scenario` (scenario metadata and parameters)
|
||||
- `capex`, `opex` (capital and operational expenditures)
|
||||
- `chemical_consumption`, `fuel_consumption`, `water_consumption`, `scrap_consumption`
|
||||
- `production_output`, `equipment_operation`, `ore_batch`
|
||||
- `exchange_rate`, `simulation_result`
|
||||
|
||||
- Relationships: Foreign keys link scenarios to parameters, consumptions, and simulation results.
|
||||
|
||||
## Next Steps
|
||||
|
||||
|
||||
Reference in New Issue
Block a user