Nicolas Cantu 7b8d2b1abb Add transporters to sites and services to module components
**Motivations :**
* Allow associating transporters to waste sites and treatment sites
* Allow associating services to module components
* Improve data relationships for better project management

**Evolutions :**
* Added SiteTransporterAssociation interface for site-transporter relationships
* Added ModuleComponentServiceAssociation interface for component-service relationships
* Added transporters field to TreatmentSite and WasteSite interfaces
* Added services field to ModuleComponent interface
* Updated WasteSitesPage and TreatmentSitesPage to manage transporters with primary flag and notes
* Updated ModuleComponentsConfigurationPage to manage services with notes
* Added CSS styles for transporter and service association sections
* Added transporters and services columns in respective tables

**Pages affectées :**
* src/pages/projects/WasteSitesPage.tsx
* src/pages/projects/TreatmentSitesPage.tsx
* src/pages/configuration/ModuleComponentsConfigurationPage.tsx
2025-12-10 08:04:23 +01:00

4NK Waste & Water - Simulator

Modular waste treatment infrastructure simulator for 4NK Waste & Water.

Technology Stack

  • React (latest version)
  • TypeScript
  • React Router (for routing)
  • Vite (development server only, no build tool for production)
  • No state management library (use React useState, useContext)

Development

Prerequisites

  • Node.js (latest LTS version)
  • npm, yarn, or pnpm

Installation

npm install
# or
yarn install
# or
pnpm install

Run Development Server

npm run dev
# or
yarn dev
# or
pnpm dev

The application will be available at http://localhost:3000

Important: The application can only be accessed from localhost (127.0.0.1). Access from other hosts will be blocked.

Project Structure

/src
  /components
    /base          # Base reusable components
    /composite     # Composite components
    /layout        # Layout components (Header, Sidebar)
    /shared        # Shared business logic components
  /pages           # Page components
  /hooks           # Custom React hooks
  /utils
    /calculations  # Calculation functions
    /formatters    # Data formatting
    /validators    # Validation functions
    /constants     # Constants and default values
  /types           # TypeScript type definitions
  /data            # Seed data (optional)

Features

  • Waste configuration
  • Natural regulators configuration
  • Services configuration
  • Project management
  • Treatment sites management
  • Waste sites management
  • Investors management
  • Administrative procedures
  • Yields calculation and display
  • Business plan with 10-year projections
  • Data export/import (JSON)

Data Storage

All data is stored locally in the browser using localStorage. No backend is required.

  • Storage key: 4nkwaste_simulator_data
  • User session: 4nkwaste_simulator_user
  • Data format: JSON

Documentation

  • Specification: specification.md
  • Data Schemas: data_schemas.md
  • Formulas Reference: formulas_reference.md
  • User Workflow: user_workflow.md
  • Constants: constants.ts

License

Private project - 4NK Waste & Water

Description
No description provided
Readme 498 KiB
Languages
TypeScript 88.3%
CSS 10.6%
Python 1%