# sai-punith-27/sustainable-event-planning architecture

> Architecture diagram of the GitHub repository sai-punith-27/sustainable-event-planning, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-12). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/sai-punith-27/sustainable-event-planning
- Repository: https://github.com/sai-punith-27/sustainable-event-planning

## Overview

The product is a sustainable-event planning assistant: organizers configure an event, budget, and constraints in a guided frontend, then request plan alternatives. The backend gathers event context and delegates evaluation and ranking to a deterministic planning engine; food and waste planning and traceable assumptions are implemented domain stages. The README also describes broader sustainability, location, AI/ML, and reporting capabilities. Some subsystem links are omitted or marked unverified because their source was not sampled.

Main entry points: [`backend/app/planning/orchestrator/pipeline.py`](https://github.com/sai-punith-27/sustainable-event-planning/blob/main/backend/app/planning/orchestrator/pipeline.py) (Evaluation pipeline), [`backend/app/planning/modules/waste/waste_planning_service.py`](https://github.com/sai-punith-27/sustainable-event-planning/blob/main/backend/app/planning/modules/waste/waste_planning_service.py) (Waste planning service), [`backend/app/services/planning_service.py`](https://github.com/sai-punith-27/sustainable-event-planning/blob/main/backend/app/services/planning_service.py) (Planning service), [`frontend/src/pages`](https://github.com/sai-punith-27/sustainable-event-planning/tree/main/frontend/src/pages) (Planning pages)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Organizer experience"]
  node_wizard["Planning wizard"]
  node_planning_pages["Planning pages"]
  node_api_client["API client<br/>[client.ts]"]
  node_metric_view["Explainable metrics"]
end

subgraph group_api["Application API"]
  node_app["FastAPI app<br/>[main.py]"]
  node_route_handlers["Route handlers"]
  node_event_service["Event service<br/>[event_service.py]"]
  node_planning_service["Planning service"]
end

subgraph group_planning["Planning engines"]
  node_assumptions["Assumption resolver<br/>[manager.py]"]
  node_planner["Planning orchestrator<br/>[planner.py]"]
  node_pipeline["Evaluation pipeline<br/>[pipeline.py]"]
  node_candidates["Candidate generation"]
  node_ranking["Alternative ranking<br/>[ranking.py]"]
  node_constraints["Constraint evaluation<br/>[evaluator.py]"]
  node_cost["Cost calculation<br/>[calculator.py]"]
end

subgraph group_capabilities["Domain capabilities"]
  node_database[("PostgreSQL data<br/>[database.py]")]
  node_domain_models["Domain models"]
  node_food["Food planning"]
  node_waste_service["Waste planning service"]
  node_waste_calc["Waste calculator<br/>[calculator.py]"]
  node_sustainability["Sustainability scoring"]
  node_other_domains["Other plan domains"]
  node_location["Location services"]
  node_ai_ml["Optional AI and ML"]
  node_reporting["Reporting"]
end

node_organizer(("Organizer"))

node_organizer -->|"configures event"| node_planning_pages
node_planning_pages -->|"updates state"| node_wizard
node_wizard -->|"requests planning"| node_api_client
node_api_client -.->|"calls API"| node_app
node_app -->|"registers routes"| node_route_handlers
node_route_handlers -.->|"handles event requests"| node_event_service
node_route_handlers -.->|"handles plan requests"| node_planning_service
node_event_service -.->|"uses database session"| node_database
node_planning_service -->|"loads event context"| node_database
node_planning_service -->|"reads event constraints"| node_domain_models
node_planning_service -->|"delegates planning"| node_planner
node_planner -.->|"runs pipeline"| node_pipeline
node_pipeline -->|"generates candidates"| node_candidates
node_pipeline -->|"evaluates food"| node_food
node_pipeline -->|"evaluates waste"| node_waste_service
node_pipeline -->|"calculates cost"| node_cost
node_pipeline -->|"evaluates constraints"| node_constraints
node_pipeline -->|"ranks alternatives"| node_ranking
node_waste_service -->|"loads event"| node_database
node_waste_service -->|"resolves assumptions"| node_assumptions
node_waste_service -->|"delegates calculation"| node_waste_calc
node_waste_service -->|"requests food estimates"| node_food
node_food -.->|"uses assumptions"| node_assumptions
node_pipeline -.->|"produces sustainability indicators"| node_sustainability
node_planning_pages -->|"shows estimates"| node_metric_view
node_organizer -.->|"may use mapping"| node_location
node_organizer -.->|"may use assistance"| node_ai_ml
node_organizer -.->|"may request reports"| node_reporting
node_planner -.->|"supports further domains"| node_other_domains

click node_wizard "https://github.com/sai-punith-27/sustainable-event-planning/blob/main/frontend/src/context/PlanningWizardContext.tsx"
click node_planning_pages "https://github.com/sai-punith-27/sustainable-event-planning/tree/main/frontend/src/pages"
click node_api_client "https://github.com/sai-punith-27/sustainable-event-planning/blob/main/frontend/src/api/client.ts"
click node_metric_view "https://github.com/sai-punith-27/sustainable-event-planning/blob/main/frontend/src/components/sustainability/ExplainableMetric.tsx"
click node_app "https://github.com/sai-punith-27/sustainable-event-planning/blob/main/backend/app/main.py"
click node_route_handlers "https://github.com/sai-punith-27/sustainable-event-planning/tree/main/backend/app/api/routes"
click node_event_service "https://github.com/sai-punith-27/sustainable-event-planning/blob/main/backend/app/services/event_service.py"
click node_planning_service "https://github.com/sai-punith-27/sustainable-event-planning/blob/main/backend/app/services/planning_service.py"
click node_database "https://github.com/sai-punith-27/sustainable-event-planning/blob/main/backend/app/core/database.py"
click node_domain_models "https://github.com/sai-punith-27/sustainable-event-planning/tree/main/backend/app/models"
click node_assumptions "https://github.com/sai-punith-27/sustainable-event-planning/blob/main/backend/app/planning/assumption_engine/manager.py"
click node_planner "https://github.com/sai-punith-27/sustainable-event-planning/blob/main/backend/app/planning/orchestrator/planner.py"
click node_pipeline "https://github.com/sai-punith-27/sustainable-event-planning/blob/main/backend/app/planning/orchestrator/pipeline.py"
click node_candidates "https://github.com/sai-punith-27/sustainable-event-planning/blob/main/backend/app/planning/orchestrator/candidate_generator.py"
click node_ranking "https://github.com/sai-punith-27/sustainable-event-planning/blob/main/backend/app/planning/orchestrator/ranking.py"
click node_constraints "https://github.com/sai-punith-27/sustainable-event-planning/blob/main/backend/app/planning/constraint_engine/evaluator.py"
click node_cost "https://github.com/sai-punith-27/sustainable-event-planning/blob/main/backend/app/planning/cost_engine/calculator.py"
click node_food "https://github.com/sai-punith-27/sustainable-event-planning/tree/main/backend/app/planning/modules/food"
click node_waste_service "https://github.com/sai-punith-27/sustainable-event-planning/blob/main/backend/app/planning/modules/waste/waste_planning_service.py"
click node_waste_calc "https://github.com/sai-punith-27/sustainable-event-planning/blob/main/backend/app/planning/modules/waste/calculator.py"
click node_sustainability "https://github.com/sai-punith-27/sustainable-event-planning/tree/main/backend/app/sustainability"
click node_other_domains "https://github.com/sai-punith-27/sustainable-event-planning/tree/main/backend/app/planning/modules"
click node_location "https://github.com/sai-punith-27/sustainable-event-planning/tree/main/backend/app/location"
click node_ai_ml "https://github.com/sai-punith-27/sustainable-event-planning/tree/main/backend/app/ai"
click node_reporting "https://github.com/sai-punith-27/sustainable-event-planning/tree/main/backend/app/reporting"

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_wizard,node_planning_pages,node_api_client,node_metric_view toneBlue
class node_app,node_route_handlers,node_event_service,node_planning_service toneAmber
class node_assumptions,node_planner,node_pipeline,node_candidates,node_ranking,node_constraints,node_cost toneMint
class node_database,node_domain_models,node_food,node_waste_service,node_waste_calc,node_sustainability,node_other_domains,node_location,node_ai_ml,node_reporting toneRose
class node_organizer toneIndigo
```

## Components

### Organizer experience

- [Planning wizard](https://github.com/sai-punith-27/sustainable-event-planning/blob/main/frontend/src/context/PlanningWizardContext.tsx): `frontend/src/context/PlanningWizardContext.tsx`
- [Planning pages](https://github.com/sai-punith-27/sustainable-event-planning/tree/main/frontend/src/pages): `frontend/src/pages`
- [API client](https://github.com/sai-punith-27/sustainable-event-planning/blob/main/frontend/src/api/client.ts): `frontend/src/api/client.ts`
- [Explainable metrics](https://github.com/sai-punith-27/sustainable-event-planning/blob/main/frontend/src/components/sustainability/ExplainableMetric.tsx): `frontend/src/components/sustainability/ExplainableMetric.tsx`

### Application API

- [FastAPI app](https://github.com/sai-punith-27/sustainable-event-planning/blob/main/backend/app/main.py): `backend/app/main.py`
- [Route handlers](https://github.com/sai-punith-27/sustainable-event-planning/tree/main/backend/app/api/routes): `backend/app/api/routes`
- [Event service](https://github.com/sai-punith-27/sustainable-event-planning/blob/main/backend/app/services/event_service.py): `backend/app/services/event_service.py`
- [Planning service](https://github.com/sai-punith-27/sustainable-event-planning/blob/main/backend/app/services/planning_service.py): `backend/app/services/planning_service.py`

### Planning engines

- [Assumption resolver](https://github.com/sai-punith-27/sustainable-event-planning/blob/main/backend/app/planning/assumption_engine/manager.py): `backend/app/planning/assumption_engine/manager.py`
- [Planning orchestrator](https://github.com/sai-punith-27/sustainable-event-planning/blob/main/backend/app/planning/orchestrator/planner.py): `backend/app/planning/orchestrator/planner.py`
- [Evaluation pipeline](https://github.com/sai-punith-27/sustainable-event-planning/blob/main/backend/app/planning/orchestrator/pipeline.py): `backend/app/planning/orchestrator/pipeline.py`
- [Candidate generation](https://github.com/sai-punith-27/sustainable-event-planning/blob/main/backend/app/planning/orchestrator/candidate_generator.py): `backend/app/planning/orchestrator/candidate_generator.py`
- [Alternative ranking](https://github.com/sai-punith-27/sustainable-event-planning/blob/main/backend/app/planning/orchestrator/ranking.py): `backend/app/planning/orchestrator/ranking.py`
- [Constraint evaluation](https://github.com/sai-punith-27/sustainable-event-planning/blob/main/backend/app/planning/constraint_engine/evaluator.py): `backend/app/planning/constraint_engine/evaluator.py`
- [Cost calculation](https://github.com/sai-punith-27/sustainable-event-planning/blob/main/backend/app/planning/cost_engine/calculator.py): `backend/app/planning/cost_engine/calculator.py`

### Domain capabilities

- [PostgreSQL data](https://github.com/sai-punith-27/sustainable-event-planning/blob/main/backend/app/core/database.py): `backend/app/core/database.py`
- [Domain models](https://github.com/sai-punith-27/sustainable-event-planning/tree/main/backend/app/models): `backend/app/models`
- [Food planning](https://github.com/sai-punith-27/sustainable-event-planning/tree/main/backend/app/planning/modules/food): `backend/app/planning/modules/food`
- [Waste planning service](https://github.com/sai-punith-27/sustainable-event-planning/blob/main/backend/app/planning/modules/waste/waste_planning_service.py): `backend/app/planning/modules/waste/waste_planning_service.py`
- [Waste calculator](https://github.com/sai-punith-27/sustainable-event-planning/blob/main/backend/app/planning/modules/waste/calculator.py): `backend/app/planning/modules/waste/calculator.py`
- [Sustainability scoring](https://github.com/sai-punith-27/sustainable-event-planning/tree/main/backend/app/sustainability): `backend/app/sustainability`
- [Other plan domains](https://github.com/sai-punith-27/sustainable-event-planning/tree/main/backend/app/planning/modules): `backend/app/planning/modules`
- [Location services](https://github.com/sai-punith-27/sustainable-event-planning/tree/main/backend/app/location): `backend/app/location`
- [Optional AI and ML](https://github.com/sai-punith-27/sustainable-event-planning/tree/main/backend/app/ai): `backend/app/ai`
- [Reporting](https://github.com/sai-punith-27/sustainable-event-planning/tree/main/backend/app/reporting): `backend/app/reporting`

### Other components

- **Organizer**

## Connections

- Organizer → Planning pages: configures event
- Planning pages → Planning wizard: updates state (evidence: `frontend/src/pages/FoodPlanningPage.tsx`)
- Planning wizard → API client: requests planning (evidence: `frontend/src/context/PlanningWizardContext.tsx`)
- API client → FastAPI app: calls API
- FastAPI app → Route handlers: registers routes (evidence: `backend/app/main.py`)
- Route handlers → Event service: handles event requests
- Route handlers → Planning service: handles plan requests
- Event service → PostgreSQL data: uses database session
- Planning service → PostgreSQL data: loads event context (evidence: `backend/app/services/planning_service.py`)
- Planning service → Domain models: reads event constraints (evidence: `backend/app/services/planning_service.py`)
- Planning service → Planning orchestrator: delegates planning (evidence: `backend/app/services/planning_service.py`)
- Planning orchestrator → Evaluation pipeline: runs pipeline
- Evaluation pipeline → Candidate generation: generates candidates (evidence: `backend/app/planning/orchestrator/pipeline.py`)
- Evaluation pipeline → Food planning: evaluates food (evidence: `backend/app/planning/orchestrator/pipeline.py`)
- Evaluation pipeline → Waste planning service: evaluates waste (evidence: `backend/app/planning/orchestrator/pipeline.py`)
- Evaluation pipeline → Cost calculation: calculates cost (evidence: `backend/app/planning/orchestrator/pipeline.py`)
- Evaluation pipeline → Constraint evaluation: evaluates constraints (evidence: `backend/app/planning/orchestrator/pipeline.py`)
- Evaluation pipeline → Alternative ranking: ranks alternatives (evidence: `backend/app/planning/orchestrator/pipeline.py`)
- Waste planning service → PostgreSQL data: loads event (evidence: `backend/app/planning/modules/waste/waste_planning_service.py`)
- Waste planning service → Assumption resolver: resolves assumptions (evidence: `backend/app/planning/modules/waste/waste_planning_service.py`)
- Waste planning service → Waste calculator: delegates calculation (evidence: `backend/app/planning/modules/waste/waste_planning_service.py`)
- Waste planning service → Food planning: requests food estimates (evidence: `backend/app/planning/modules/waste/waste_planning_service.py`)
- Food planning → Assumption resolver: uses assumptions
- Evaluation pipeline → Sustainability scoring: produces sustainability indicators
- Planning pages → Explainable metrics: shows estimates (evidence: `frontend/src/pages/FoodPlanningPage.tsx`)
- Organizer → Location services: may use mapping
- Organizer → Optional AI and ML: may use assistance
- Organizer → Reporting: may request reports
- Planning orchestrator → Other plan domains: supports further domains
