# mohamedaminesaadd/platefome-de-gestion-de-travaill-dans-les-project-photopholtiaque architecture

> Architecture diagram of the GitHub repository mohamedaminesaadd/platefome-de-gestion-de-travaill-dans-les-project-photopholtiaque, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-16). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/mohamedaminesaadd/platefome-de-gestion-de-travaill-dans-les-project-photopholtiaque
- Repository: https://github.com/mohamedaminesaadd/platefome-de-gestion-de-travaill-dans-les-project-photopholtiaque

## Overview

B-Project is a photovoltaic-installation project-management platform. Its main workflow is to organize projects into phases and tasks, assign work to technicians, and monitor progress through dashboards and technician tools. Authentication and role-based pages frame that workflow; task and project APIs persist the operational data, while the README also describes document management, notifications, and machine-learning resource optimization. The graph uses indexed references and excerpts for shown relationships; optional integrations and unsampled feature links are not asserted as confirmed calls.

Main entry points: [`backend/src/app.js`](https://github.com/mohamedaminesaadd/platefome-de-gestion-de-travaill-dans-les-project-photopholtiaque/blob/main/backend/src/app.js) (Express API), [`Frontend/src/app/app.routes.ts`](https://github.com/mohamedaminesaadd/platefome-de-gestion-de-travaill-dans-les-project-photopholtiaque/blob/main/Frontend/src/app/app.routes.ts) (Role routes), [`backend/src/models`](https://github.com/mohamedaminesaadd/platefome-de-gestion-de-travaill-dans-les-project-photopholtiaque/tree/main/backend/src/models) (MongoDB models), [`Frontend/src/app/(phase-tache)/task-management/task-management.ts`](https://github.com/mohamedaminesaadd/platefome-de-gestion-de-travaill-dans-les-project-photopholtiaque/blob/main/Frontend/src/app/(phase-tache)/task-management/task-management.ts) (Task management)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Web application"]
  node_web["Angular application<br/>[app.ts]"]
  node_routes["Role routes<br/>[app.routes.ts]"]
  node_task_admin["Task management<br/>[task-management.ts]"]
  node_task_parts["Task controls"]
  node_tech_routes["Technician routes"]
  node_tech_pages["Technician workspace"]
  node_dashboards["Project dashboards"]
  node_project_service["Project service<br/>[service-project.ts]"]
  node_phase_service["Phase service<br/>[phase-service.ts]"]
  node_tech_task_service["Technician task service<br/>[task.service.ts]"]
  node_auth["Authentication service<br/>[auth.ts]"]
end

subgraph group_backend["Project API"]
  node_api["Express API<br/>[app.js]"]
  node_user_routes["User routes<br/>[user.router.js]"]
  node_user_controller["User accounts"]
  node_project_routes["Project routes<br/>[project.router.js]"]
  node_project_controller["Project operations"]
  node_phase_routes["Phase routes<br/>[phase.router.js]"]
  node_phase_controller["Phase operations<br/>[PhaseController.js]"]
  node_task_routes["Task routes<br/>[tache.router.js]"]
  node_task_controller["Task operations<br/>[tacheController.js]"]
  node_models[("MongoDB models")]
  node_ml_router["ML endpoints<br/>[ml.router.js]"]
  node_weather["Weather endpoint<br/>[weather.js]"]
end

subgraph group_ml["Prediction"]
  node_ml_api["Prediction API<br/>[api.py]"]
end

node_users(("Users"))
node_mongodb[("MongoDB")]

node_users -->|"uses"| node_web
node_web -->|"routes through"| node_routes
node_routes -->|"routes to"| node_task_admin
node_task_admin -->|"uses controls"| node_task_parts
node_routes -->|"loads"| node_tech_routes
node_tech_routes -->|"loads pages"| node_tech_pages
node_task_admin -->|"uses"| node_phase_service
node_task_admin -->|"uses"| node_project_service
node_tech_task_service -->|"loads phases"| node_phase_service
node_tech_task_service -->|"loads projects"| node_project_service
node_routes -->|"routes to"| node_dashboards
node_routes -->|"guards routes"| node_auth
node_web -.->|"HTTP requests"| node_api
node_api -->|"mounts"| node_user_routes
node_api -->|"mounts"| node_project_routes
node_api -->|"mounts"| node_phase_routes
node_api -->|"mounts"| node_task_routes
node_api -->|"mounts"| node_ml_router
node_api -->|"mounts"| node_weather
node_user_routes -->|"dispatches"| node_user_controller
node_project_routes -->|"dispatches"| node_project_controller
node_phase_routes -->|"dispatches"| node_phase_controller
node_task_routes -->|"dispatches"| node_task_controller
node_user_controller -->|"queries users"| node_models
node_project_controller -->|"queries projects"| node_models
node_phase_controller -->|"reads and writes"| node_models
node_task_controller -->|"reads and writes"| node_models
node_models -.->|"persists data"| node_mongodb
node_ml_router -.->|"may call"| node_ml_api

click node_web "https://github.com/mohamedaminesaadd/platefome-de-gestion-de-travaill-dans-les-project-photopholtiaque/blob/main/Frontend/src/app/app.ts"
click node_routes "https://github.com/mohamedaminesaadd/platefome-de-gestion-de-travaill-dans-les-project-photopholtiaque/blob/main/Frontend/src/app/app.routes.ts"
click node_task_admin "https://github.com/mohamedaminesaadd/platefome-de-gestion-de-travaill-dans-les-project-photopholtiaque/blob/main/Frontend/src/app/(phase-tache)/task-management/task-management.ts"
click node_task_parts "https://github.com/mohamedaminesaadd/platefome-de-gestion-de-travaill-dans-les-project-photopholtiaque/tree/main/Frontend/src/app/(phase-tache)"
click node_tech_routes "https://github.com/mohamedaminesaadd/platefome-de-gestion-de-travaill-dans-les-project-photopholtiaque/blob/main/Frontend/src/app/pages/technician/technician.routes.ts"
click node_tech_pages "https://github.com/mohamedaminesaadd/platefome-de-gestion-de-travaill-dans-les-project-photopholtiaque/tree/main/Frontend/src/app/pages/technician"
click node_dashboards "https://github.com/mohamedaminesaadd/platefome-de-gestion-de-travaill-dans-les-project-photopholtiaque/tree/main/Frontend/src/app/dashboard"
click node_project_service "https://github.com/mohamedaminesaadd/platefome-de-gestion-de-travaill-dans-les-project-photopholtiaque/blob/main/Frontend/src/app/services/service-project.ts"
click node_phase_service "https://github.com/mohamedaminesaadd/platefome-de-gestion-de-travaill-dans-les-project-photopholtiaque/blob/main/Frontend/src/app/services/phase-service.ts"
click node_tech_task_service "https://github.com/mohamedaminesaadd/platefome-de-gestion-de-travaill-dans-les-project-photopholtiaque/blob/main/Frontend/src/app/services/technician/task.service.ts"
click node_auth "https://github.com/mohamedaminesaadd/platefome-de-gestion-de-travaill-dans-les-project-photopholtiaque/blob/main/Frontend/src/app/services/auth.ts"
click node_api "https://github.com/mohamedaminesaadd/platefome-de-gestion-de-travaill-dans-les-project-photopholtiaque/blob/main/backend/src/app.js"
click node_user_routes "https://github.com/mohamedaminesaadd/platefome-de-gestion-de-travaill-dans-les-project-photopholtiaque/blob/main/backend/src/router/user.router.js"
click node_user_controller "https://github.com/mohamedaminesaadd/platefome-de-gestion-de-travaill-dans-les-project-photopholtiaque/blob/main/backend/src/controllers/user.controllers.js"
click node_project_routes "https://github.com/mohamedaminesaadd/platefome-de-gestion-de-travaill-dans-les-project-photopholtiaque/blob/main/backend/src/router/project.router.js"
click node_project_controller "https://github.com/mohamedaminesaadd/platefome-de-gestion-de-travaill-dans-les-project-photopholtiaque/blob/main/backend/src/controllers/projectController.js"
click node_phase_routes "https://github.com/mohamedaminesaadd/platefome-de-gestion-de-travaill-dans-les-project-photopholtiaque/blob/main/backend/src/router/phase.router.js"
click node_phase_controller "https://github.com/mohamedaminesaadd/platefome-de-gestion-de-travaill-dans-les-project-photopholtiaque/blob/main/backend/src/controllers/PhaseController.js"
click node_task_routes "https://github.com/mohamedaminesaadd/platefome-de-gestion-de-travaill-dans-les-project-photopholtiaque/blob/main/backend/src/router/tache.router.js"
click node_task_controller "https://github.com/mohamedaminesaadd/platefome-de-gestion-de-travaill-dans-les-project-photopholtiaque/blob/main/backend/src/controllers/tacheController.js"
click node_models "https://github.com/mohamedaminesaadd/platefome-de-gestion-de-travaill-dans-les-project-photopholtiaque/tree/main/backend/src/models"
click node_ml_router "https://github.com/mohamedaminesaadd/platefome-de-gestion-de-travaill-dans-les-project-photopholtiaque/blob/main/backend/src/router/ml.router.js"
click node_ml_api "https://github.com/mohamedaminesaadd/platefome-de-gestion-de-travaill-dans-les-project-photopholtiaque/blob/main/machineLearning/api.py"
click node_weather "https://github.com/mohamedaminesaadd/platefome-de-gestion-de-travaill-dans-les-project-photopholtiaque/blob/main/backend/src/router/weather.js"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_web,node_routes,node_task_admin,node_task_parts,node_tech_routes,node_tech_pages,node_dashboards,node_project_service,node_phase_service,node_tech_task_service,node_auth,node_users toneBlue
class node_api,node_user_routes,node_user_controller,node_project_routes,node_project_controller,node_phase_routes,node_phase_controller,node_task_routes,node_task_controller,node_models,node_ml_router,node_weather,node_mongodb toneAmber
class node_ml_api toneMint
```

## Components

### Web application

- [Angular application](https://github.com/mohamedaminesaadd/platefome-de-gestion-de-travaill-dans-les-project-photopholtiaque/blob/main/Frontend/src/app/app.ts): `Frontend/src/app/app.ts`
- [Role routes](https://github.com/mohamedaminesaadd/platefome-de-gestion-de-travaill-dans-les-project-photopholtiaque/blob/main/Frontend/src/app/app.routes.ts): `Frontend/src/app/app.routes.ts`
- [Task management](https://github.com/mohamedaminesaadd/platefome-de-gestion-de-travaill-dans-les-project-photopholtiaque/blob/main/Frontend/src/app/(phase-tache)/task-management/task-management.ts): `Frontend/src/app/(phase-tache)/task-management/task-management.ts`
- [Task controls](https://github.com/mohamedaminesaadd/platefome-de-gestion-de-travaill-dans-les-project-photopholtiaque/tree/main/Frontend/src/app/(phase-tache)): `Frontend/src/app/(phase-tache)`
- [Technician routes](https://github.com/mohamedaminesaadd/platefome-de-gestion-de-travaill-dans-les-project-photopholtiaque/blob/main/Frontend/src/app/pages/technician/technician.routes.ts): `Frontend/src/app/pages/technician/technician.routes.ts`
- [Technician workspace](https://github.com/mohamedaminesaadd/platefome-de-gestion-de-travaill-dans-les-project-photopholtiaque/tree/main/Frontend/src/app/pages/technician): `Frontend/src/app/pages/technician`
- [Project dashboards](https://github.com/mohamedaminesaadd/platefome-de-gestion-de-travaill-dans-les-project-photopholtiaque/tree/main/Frontend/src/app/dashboard): `Frontend/src/app/dashboard`
- [Project service](https://github.com/mohamedaminesaadd/platefome-de-gestion-de-travaill-dans-les-project-photopholtiaque/blob/main/Frontend/src/app/services/service-project.ts): `Frontend/src/app/services/service-project.ts`
- [Phase service](https://github.com/mohamedaminesaadd/platefome-de-gestion-de-travaill-dans-les-project-photopholtiaque/blob/main/Frontend/src/app/services/phase-service.ts): `Frontend/src/app/services/phase-service.ts`
- [Technician task service](https://github.com/mohamedaminesaadd/platefome-de-gestion-de-travaill-dans-les-project-photopholtiaque/blob/main/Frontend/src/app/services/technician/task.service.ts): `Frontend/src/app/services/technician/task.service.ts`
- [Authentication service](https://github.com/mohamedaminesaadd/platefome-de-gestion-de-travaill-dans-les-project-photopholtiaque/blob/main/Frontend/src/app/services/auth.ts): `Frontend/src/app/services/auth.ts`

### Project API

- [Express API](https://github.com/mohamedaminesaadd/platefome-de-gestion-de-travaill-dans-les-project-photopholtiaque/blob/main/backend/src/app.js): `backend/src/app.js`
- [User routes](https://github.com/mohamedaminesaadd/platefome-de-gestion-de-travaill-dans-les-project-photopholtiaque/blob/main/backend/src/router/user.router.js): `backend/src/router/user.router.js`
- [User accounts](https://github.com/mohamedaminesaadd/platefome-de-gestion-de-travaill-dans-les-project-photopholtiaque/blob/main/backend/src/controllers/user.controllers.js): `backend/src/controllers/user.controllers.js`
- [Project routes](https://github.com/mohamedaminesaadd/platefome-de-gestion-de-travaill-dans-les-project-photopholtiaque/blob/main/backend/src/router/project.router.js): `backend/src/router/project.router.js`
- [Project operations](https://github.com/mohamedaminesaadd/platefome-de-gestion-de-travaill-dans-les-project-photopholtiaque/blob/main/backend/src/controllers/projectController.js): `backend/src/controllers/projectController.js`
- [Phase routes](https://github.com/mohamedaminesaadd/platefome-de-gestion-de-travaill-dans-les-project-photopholtiaque/blob/main/backend/src/router/phase.router.js): `backend/src/router/phase.router.js`
- [Phase operations](https://github.com/mohamedaminesaadd/platefome-de-gestion-de-travaill-dans-les-project-photopholtiaque/blob/main/backend/src/controllers/PhaseController.js): `backend/src/controllers/PhaseController.js`
- [Task routes](https://github.com/mohamedaminesaadd/platefome-de-gestion-de-travaill-dans-les-project-photopholtiaque/blob/main/backend/src/router/tache.router.js): `backend/src/router/tache.router.js`
- [Task operations](https://github.com/mohamedaminesaadd/platefome-de-gestion-de-travaill-dans-les-project-photopholtiaque/blob/main/backend/src/controllers/tacheController.js): `backend/src/controllers/tacheController.js`
- [MongoDB models](https://github.com/mohamedaminesaadd/platefome-de-gestion-de-travaill-dans-les-project-photopholtiaque/tree/main/backend/src/models): `backend/src/models`
- [ML endpoints](https://github.com/mohamedaminesaadd/platefome-de-gestion-de-travaill-dans-les-project-photopholtiaque/blob/main/backend/src/router/ml.router.js): `backend/src/router/ml.router.js`
- [Weather endpoint](https://github.com/mohamedaminesaadd/platefome-de-gestion-de-travaill-dans-les-project-photopholtiaque/blob/main/backend/src/router/weather.js): `backend/src/router/weather.js`

### Prediction

- [Prediction API](https://github.com/mohamedaminesaadd/platefome-de-gestion-de-travaill-dans-les-project-photopholtiaque/blob/main/machineLearning/api.py): `machineLearning/api.py`

### Other components

- **Users**
- **MongoDB**

## Connections

- Users → Angular application: uses
- Angular application → Role routes: routes through (evidence: `Frontend/src/app/app.routes.ts`)
- Role routes → Task management: routes to (evidence: `Frontend/src/app/app.routes.ts`)
- Task management → Task controls: uses controls (evidence: `Frontend/src/app/(phase-tache)/task-management/task-management.ts`)
- Role routes → Technician routes: loads (evidence: `Frontend/src/app/app.routes.ts`)
- Technician routes → Technician workspace: loads pages (evidence: `Frontend/src/app/pages/technician/technician.routes.ts`)
- Task management → Phase service: uses (evidence: `Frontend/src/app/(phase-tache)/task-management/task-management.ts`)
- Task management → Project service: uses (evidence: `Frontend/src/app/(phase-tache)/task-management/task-management.ts`)
- Technician task service → Phase service: loads phases (evidence: `Frontend/src/app/services/technician/task.service.ts`)
- Technician task service → Project service: loads projects (evidence: `Frontend/src/app/services/technician/task.service.ts`)
- Role routes → Project dashboards: routes to (evidence: `Frontend/src/app/app.routes.ts`)
- Role routes → Authentication service: guards routes
- Angular application → Express API: HTTP requests
- Express API → User routes: mounts (evidence: `backend/src/app.js`)
- Express API → Project routes: mounts (evidence: `backend/src/app.js`)
- Express API → Phase routes: mounts (evidence: `backend/src/app.js`)
- Express API → Task routes: mounts (evidence: `backend/src/app.js`)
- Express API → ML endpoints: mounts (evidence: `backend/src/app.js`)
- Express API → Weather endpoint: mounts (evidence: `backend/src/app.js`)
- User routes → User accounts: dispatches (evidence: `backend/src/router/user.router.js`)
- Project routes → Project operations: dispatches (evidence: `backend/src/router/project.router.js`)
- Phase routes → Phase operations: dispatches (evidence: `backend/src/router/phase.router.js`)
- Task routes → Task operations: dispatches (evidence: `backend/src/router/tache.router.js`)
- User accounts → MongoDB models: queries users (evidence: `backend/src/controllers/user.controllers.js`)
- Project operations → MongoDB models: queries projects (evidence: `backend/src/controllers/projectController.js`)
- Phase operations → MongoDB models: reads and writes (evidence: `backend/src/controllers/PhaseController.js`)
- Task operations → MongoDB models: reads and writes (evidence: `backend/src/controllers/tacheController.js`)
- MongoDB models → MongoDB: persists data
- ML endpoints → Prediction API: may call
