# celihong/hackathon_crown_beer architecture

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

- Interactive diagram: https://gitdiagram.com/celihong/hackathon_crown_beer
- Repository: https://github.com/celihong/hackathon_crown_beer

## Overview

Cambodian Craft Beer Crown 2025 is an event information and promotion site. Visitors can explore the event homepage, brewery directory, schedule, awards, and sponsors; voting links lead to an external form. A separate vote-form component supports rating beers and can submit to a configured endpoint or save votes in browser storage. The route and component excerpts support these features, but do not show the vote form being mounted on a page; that connection is therefore omitted.

Main entry points: [`src/components/Header.tsx`](https://github.com/celihong/hackathon_crown_beer/blob/main/src/components/Header.tsx) (Navigation Header), [`src/app/page.tsx`](https://github.com/celihong/hackathon_crown_beer/blob/main/src/app/page.tsx) (Event Home), [`src/app/layout.tsx`](https://github.com/celihong/hackathon_crown_beer/blob/main/src/app/layout.tsx) (App Layout), [`src/components/VoteForm.tsx`](https://github.com/celihong/hackathon_crown_beer/blob/main/src/components/VoteForm.tsx) (Vote Form)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_site["Site Shell"]
  node_layout["App Layout<br/>[layout.tsx]"]
  node_header["Navigation Header<br/>[Header.tsx]"]
  node_footer["Event Footer<br/>[Footer.tsx]"]
end

subgraph group_event["Event Information"]
  node_home["Event Home<br/>[page.tsx]"]
  node_breweries["Brewery Directory<br/>[page.tsx]"]
  node_schedule["Event Schedule<br/>[page.tsx]"]
  node_awards["Awards Overview<br/>[page.tsx]"]
  node_sponsors["Sponsor Directory<br/>[page.tsx]"]
end

subgraph group_voting["Voting"]
  node_beerdata["Beer Catalog<br/>[beers.ts]"]
  node_beercard["Beer Card<br/>[BeerCard.tsx]"]
  node_voteform["Vote Form<br/>[VoteForm.tsx]"]
end

node_visitor(("Visitor"))
node_vote_service{{"Configured Vote Endpoint"}}
node_browser_storage[("Browser Local Storage")]
node_google_form{{"External Voting Form"}}

node_layout -->|"renders"| node_header
node_layout -->|"renders"| node_footer
node_header -->|"links to"| node_home
node_header -->|"links to"| node_breweries
node_header -->|"links to"| node_schedule
node_header -->|"links to"| node_awards
node_header -->|"links to"| node_sponsors
node_home -->|"links to"| node_breweries
node_home -->|"links to"| node_awards
node_home -->|"opens"| node_google_form
node_header -->|"opens"| node_google_form
node_beercard -->|"uses type"| node_beerdata
node_voteform -->|"posts vote"| node_vote_service
node_voteform -->|"saves fallback"| node_browser_storage

click node_layout "https://github.com/celihong/hackathon_crown_beer/blob/main/src/app/layout.tsx"
click node_header "https://github.com/celihong/hackathon_crown_beer/blob/main/src/components/Header.tsx"
click node_footer "https://github.com/celihong/hackathon_crown_beer/blob/main/src/components/Footer.tsx"
click node_home "https://github.com/celihong/hackathon_crown_beer/blob/main/src/app/page.tsx"
click node_breweries "https://github.com/celihong/hackathon_crown_beer/blob/main/src/app/breweries/page.tsx"
click node_schedule "https://github.com/celihong/hackathon_crown_beer/blob/main/src/app/schedule/page.tsx"
click node_awards "https://github.com/celihong/hackathon_crown_beer/blob/main/src/app/awards/page.tsx"
click node_sponsors "https://github.com/celihong/hackathon_crown_beer/blob/main/src/app/sponsors/page.tsx"
click node_beerdata "https://github.com/celihong/hackathon_crown_beer/blob/main/src/utils/beers.ts"
click node_beercard "https://github.com/celihong/hackathon_crown_beer/blob/main/src/components/BeerCard.tsx"
click node_voteform "https://github.com/celihong/hackathon_crown_beer/blob/main/src/components/VoteForm.tsx"

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_layout,node_header,node_footer toneBlue
class node_home,node_breweries,node_schedule,node_awards,node_sponsors,node_browser_storage toneAmber
class node_beerdata,node_beercard,node_voteform toneMint
class node_visitor,node_vote_service,node_google_form toneIndigo
```

## Components

### Site Shell

- [App Layout](https://github.com/celihong/hackathon_crown_beer/blob/main/src/app/layout.tsx): `src/app/layout.tsx`
- [Navigation Header](https://github.com/celihong/hackathon_crown_beer/blob/main/src/components/Header.tsx): `src/components/Header.tsx`
- [Event Footer](https://github.com/celihong/hackathon_crown_beer/blob/main/src/components/Footer.tsx): `src/components/Footer.tsx`

### Event Information

- [Event Home](https://github.com/celihong/hackathon_crown_beer/blob/main/src/app/page.tsx): `src/app/page.tsx`
- [Brewery Directory](https://github.com/celihong/hackathon_crown_beer/blob/main/src/app/breweries/page.tsx): `src/app/breweries/page.tsx`
- [Event Schedule](https://github.com/celihong/hackathon_crown_beer/blob/main/src/app/schedule/page.tsx): `src/app/schedule/page.tsx`
- [Awards Overview](https://github.com/celihong/hackathon_crown_beer/blob/main/src/app/awards/page.tsx): `src/app/awards/page.tsx`
- [Sponsor Directory](https://github.com/celihong/hackathon_crown_beer/blob/main/src/app/sponsors/page.tsx): `src/app/sponsors/page.tsx`

### Voting

- [Beer Catalog](https://github.com/celihong/hackathon_crown_beer/blob/main/src/utils/beers.ts): `src/utils/beers.ts`
- [Beer Card](https://github.com/celihong/hackathon_crown_beer/blob/main/src/components/BeerCard.tsx): `src/components/BeerCard.tsx`
- [Vote Form](https://github.com/celihong/hackathon_crown_beer/blob/main/src/components/VoteForm.tsx): `src/components/VoteForm.tsx`

### Other components

- **Visitor**
- **Configured Vote Endpoint**
- **Browser Local Storage**
- **External Voting Form**

## Connections

- App Layout → Navigation Header: renders (evidence: `src/app/layout.tsx`)
- App Layout → Event Footer: renders (evidence: `src/app/layout.tsx`)
- Navigation Header → Event Home: links to (evidence: `src/components/Header.tsx`)
- Navigation Header → Brewery Directory: links to (evidence: `src/components/Header.tsx`)
- Navigation Header → Event Schedule: links to (evidence: `src/components/Header.tsx`)
- Navigation Header → Awards Overview: links to (evidence: `src/components/Header.tsx`)
- Navigation Header → Sponsor Directory: links to (evidence: `src/components/Header.tsx`)
- Event Home → Brewery Directory: links to (evidence: `src/app/page.tsx`)
- Event Home → Awards Overview: links to (evidence: `src/app/page.tsx`)
- Event Home → External Voting Form: opens (evidence: `src/app/page.tsx`)
- Navigation Header → External Voting Form: opens (evidence: `src/components/Header.tsx`)
- Beer Card → Beer Catalog: uses type (evidence: `src/components/BeerCard.tsx`)
- Vote Form → Configured Vote Endpoint: posts vote (evidence: `src/components/VoteForm.tsx`)
- Vote Form → Browser Local Storage: saves fallback (evidence: `src/components/VoteForm.tsx`)
