3TE/README.md
Nicolas Cantu c7db6590f0 Initial commit: 4NK Waste & Water Simulator
**Motivations :**
* Create a complete simulator for 4NK Waste & Water modular waste treatment infrastructure
* Implement frontend-only application with client-side data persistence
* Provide seed data for wastes and natural regulators from specifications

**Root causes :**
* Need for a simulation tool to configure and manage waste treatment projects
* Requirement for localhost-only access with persistent client-side storage
* Need for initial seed data to bootstrap the application

**Correctifs :**
* Implemented authentication system with AuthContext
* Fixed login/logout functionality with proper state management
* Created placeholder pages for all routes

**Evolutions :**
* Complete application structure with React, TypeScript, and Vite
* Seed data for 9 waste types and 52 natural regulators
* Settings page with import/export and seed data loading functionality
* Configuration pages for wastes and regulators with CRUD operations
* Project management pages structure
* Business plan and yields pages placeholders
* Comprehensive UI/UX design system (dark mode only)
* Navigation system with sidebar and header

**Page affectées :**
* All pages: Login, Dashboard, Waste Configuration, Regulators Configuration, Services Configuration
* Project pages: Project List, Project Configuration, Treatment Sites, Waste Sites, Investors, Administrative Procedures
* Analysis pages: Yields, Business Plan
* Utility pages: Settings, Help
* Components: Layout, Sidebar, Header, base components (Button, Input, Select, Card, Badge, Table)
* Utils: Storage, seed data, formatters, validators, constants
* Types: Complete TypeScript definitions for all entities
2025-12-09 19:09:42 +01:00

97 lines
2.1 KiB
Markdown

# 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
```bash
npm install
# or
yarn install
# or
pnpm install
```
### Run Development Server
```bash
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