# stu082/food-stall-demo architecture

> Architecture diagram of the GitHub repository stu082/food-stall-demo, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-11). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/stu082/food-stall-demo
- Repository: https://github.com/stu082/food-stall-demo

## Overview

The repository contains a web entry page and a Netlify function that accepts score submissions. The shown function checks the HTTP method and validates the name and score before posting a score to Supabase; failed saves produce an error response. The page’s behavior and how it invokes the function are not shown, so that connection is left unverified.

Main entry points: [`index.html`](https://github.com/stu082/food-stall-demo/blob/main/index.html) (Web page), [`netlify/functions/submit-score.js`](https://github.com/stu082/food-stall-demo/blob/main/netlify/functions/submit-score.js) (Score handler)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web interface"]
  node_page["Web page<br/>[index.html]"]
end

subgraph group_score["Score submission"]
  node_submit["Score handler<br/>[submit-score.js]"]
end

node_visitor(("Visitor"))
node_supabase[("Supabase scores")]

node_visitor -.->|"visits"| node_page
node_page -.->|"submits score"| node_submit
node_submit -->|"writes score"| node_supabase

click node_page "https://github.com/stu082/food-stall-demo/blob/main/index.html"
click node_submit "https://github.com/stu082/food-stall-demo/blob/main/netlify/functions/submit-score.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_page toneBlue
class node_submit,node_supabase toneAmber
class node_visitor toneIndigo
```

## Components

### Web interface

- [Web page](https://github.com/stu082/food-stall-demo/blob/main/index.html): `index.html`

### Score submission

- [Score handler](https://github.com/stu082/food-stall-demo/blob/main/netlify/functions/submit-score.js): `netlify/functions/submit-score.js`

### Other components

- **Visitor**
- **Supabase scores**

## Connections

- Visitor → Web page: visits
- Web page → Score handler: submits score
- Score handler → Supabase scores: writes score (evidence: `netlify/functions/submit-score.js`)
