# popup0221/antiplan architecture

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

- Interactive diagram: https://gitdiagram.com/popup0221/antiplan
- Repository: https://github.com/popup0221/antiplan

## Overview

Anti Plan is a cocktail-preference recommendation web app. Its principal flow is a user answering a five-stage preference funnel; the funnel validates and carries answers forward, then currently displays a confirmation alert. The README also describes viewing recommendations and choosing a menu item to order, but the available source does not show those result or ordering behaviors: the order page is minimal, and no recommendation service is evidenced. The graph includes documented capabilities without asserting an implementation or unsupported links; some shared UI and route details were not excerpted.

Main entry points: [`src/app/(back-BTN-layout)/recommend/(funnel)/(components)/Funnel.tsx`](https://github.com/popup0221/antiplan/blob/main/src/app/(back-BTN-layout)/recommend/(funnel)/(components)/Funnel.tsx) (Funnel controller), [`src/components/ui`](https://github.com/popup0221/antiplan/tree/main/src/components/ui) (Form controls), [`src/app/(back-BTN-layout)/recommend/page.tsx`](https://github.com/popup0221/antiplan/blob/main/src/app/(back-BTN-layout)/recommend/page.tsx) (Recommendation page), [`src/app/(back-BTN-layout)/recommend/(funnel)/literals.ts`](https://github.com/popup0221/antiplan/blob/main/src/app/(back-BTN-layout)/recommend/(funnel)/literals.ts) (Choice labels)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["App entry"]
  node_home["Home page<br/>[page.tsx]"]
  node_header["Back header<br/>[header.tsx]"]
  node_headerstate["Header state<br/>[HeaderContext.tsx]"]
end

subgraph group_recommendation["Recommendation flow"]
  node_recommendpage["Recommendation page<br/>[page.tsx]"]
  node_funnel["Funnel controller<br/>[Funnel.tsx]"]
  node_alcohol["Drink-type step<br/>[AlcoholStep.tsx]"]
  node_proof["Strength step<br/>[ProofStep.tsx]"]
  node_taste["Taste step<br/>[TasteStep.tsx]"]
  node_base["Base-spirit step<br/>[BaseStep.tsx]"]
  node_memo["Memo step<br/>[MemoStep.tsx]"]
  node_experience["Experience step<br/>[ExperienceStep.tsx]"]
  node_funnelstate["Funnel state types<br/>[context.ts]"]
  node_validation["Answer schemas<br/>[schemas.ts]"]
  node_choices["Choice labels<br/>[literals.ts]"]
end

subgraph group_shared["Shared interface"]
  node_ui["Form controls"]
  node_progress["Progress indicator<br/>[progress.tsx]"]
end

subgraph group_documented["Documented capabilities"]
  node_menu["Recommended menu"]
  node_order["Order route<br/>[page.tsx]"]
end

node_user(("Visitor"))

node_user -->|"opens app"| node_home
node_user -->|"answers questions"| node_recommendpage
node_recommendpage -->|"renders"| node_funnel
node_recommendpage -->|"sets header"| node_headerstate
node_recommendpage -->|"renders"| node_progress
node_funnel -->|"renders"| node_alcohol
node_funnel -->|"renders"| node_proof
node_funnel -->|"renders"| node_taste
node_funnel -->|"renders"| node_base
node_funnel -->|"renders"| node_memo
node_funnel -->|"parses answers"| node_validation
node_funnel -->|"uses types"| node_funnelstate
node_alcohol -->|"uses controls"| node_ui
node_proof -->|"uses controls"| node_ui
node_taste -->|"uses controls"| node_ui
node_base -->|"uses controls"| node_ui
node_memo -->|"uses controls"| node_ui
node_alcohol -->|"reads labels"| node_choices
node_proof -->|"reads labels"| node_choices
node_taste -->|"reads labels"| node_choices
node_base -->|"reads labels"| node_choices
node_header -->|"reads state"| node_headerstate
node_home -.->|"offers recommendations"| node_menu
node_menu -.->|"offers ordering"| node_order

click node_home "https://github.com/popup0221/antiplan/blob/main/src/app/page.tsx"
click node_header "https://github.com/popup0221/antiplan/blob/main/src/app/(back-BTN-layout)/(components)/header.tsx"
click node_headerstate "https://github.com/popup0221/antiplan/blob/main/src/app/(back-BTN-layout)/(contexts)/HeaderContext.tsx"
click node_recommendpage "https://github.com/popup0221/antiplan/blob/main/src/app/(back-BTN-layout)/recommend/page.tsx"
click node_funnel "https://github.com/popup0221/antiplan/blob/main/src/app/(back-BTN-layout)/recommend/(funnel)/(components)/Funnel.tsx"
click node_alcohol "https://github.com/popup0221/antiplan/blob/main/src/app/(back-BTN-layout)/recommend/(funnel)/(components)/AlcoholStep.tsx"
click node_proof "https://github.com/popup0221/antiplan/blob/main/src/app/(back-BTN-layout)/recommend/(funnel)/(components)/ProofStep.tsx"
click node_taste "https://github.com/popup0221/antiplan/blob/main/src/app/(back-BTN-layout)/recommend/(funnel)/(components)/TasteStep.tsx"
click node_base "https://github.com/popup0221/antiplan/blob/main/src/app/(back-BTN-layout)/recommend/(funnel)/(components)/BaseStep.tsx"
click node_memo "https://github.com/popup0221/antiplan/blob/main/src/app/(back-BTN-layout)/recommend/(funnel)/(components)/MemoStep.tsx"
click node_experience "https://github.com/popup0221/antiplan/blob/main/src/app/(back-BTN-layout)/recommend/(funnel)/(components)/ExperienceStep.tsx"
click node_funnelstate "https://github.com/popup0221/antiplan/blob/main/src/app/(back-BTN-layout)/recommend/(funnel)/context.ts"
click node_validation "https://github.com/popup0221/antiplan/blob/main/src/app/(back-BTN-layout)/recommend/(funnel)/schemas.ts"
click node_choices "https://github.com/popup0221/antiplan/blob/main/src/app/(back-BTN-layout)/recommend/(funnel)/literals.ts"
click node_ui "https://github.com/popup0221/antiplan/tree/main/src/components/ui"
click node_progress "https://github.com/popup0221/antiplan/blob/main/src/components/ui/progress.tsx"
click node_menu "https://github.com/popup0221/antiplan/tree/main/src/app/(back-BTN-layout)/recommend"
click node_order "https://github.com/popup0221/antiplan/blob/main/src/app/(back-BTN-layout)/order/page.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_home,node_header,node_headerstate toneBlue
class node_recommendpage,node_funnel,node_alcohol,node_proof,node_taste,node_base,node_memo,node_experience,node_funnelstate,node_validation,node_choices toneAmber
class node_ui,node_progress toneMint
class node_menu,node_order toneRose
class node_user toneIndigo
```

## Components

### App entry

- [Home page](https://github.com/popup0221/antiplan/blob/main/src/app/page.tsx): `src/app/page.tsx`
- [Back header](https://github.com/popup0221/antiplan/blob/main/src/app/(back-BTN-layout)/(components)/header.tsx): `src/app/(back-BTN-layout)/(components)/header.tsx`
- [Header state](https://github.com/popup0221/antiplan/blob/main/src/app/(back-BTN-layout)/(contexts)/HeaderContext.tsx): `src/app/(back-BTN-layout)/(contexts)/HeaderContext.tsx`

### Recommendation flow

- [Recommendation page](https://github.com/popup0221/antiplan/blob/main/src/app/(back-BTN-layout)/recommend/page.tsx): `src/app/(back-BTN-layout)/recommend/page.tsx`
- [Funnel controller](https://github.com/popup0221/antiplan/blob/main/src/app/(back-BTN-layout)/recommend/(funnel)/(components)/Funnel.tsx): `src/app/(back-BTN-layout)/recommend/(funnel)/(components)/Funnel.tsx`
- [Drink-type step](https://github.com/popup0221/antiplan/blob/main/src/app/(back-BTN-layout)/recommend/(funnel)/(components)/AlcoholStep.tsx): `src/app/(back-BTN-layout)/recommend/(funnel)/(components)/AlcoholStep.tsx`
- [Strength step](https://github.com/popup0221/antiplan/blob/main/src/app/(back-BTN-layout)/recommend/(funnel)/(components)/ProofStep.tsx): `src/app/(back-BTN-layout)/recommend/(funnel)/(components)/ProofStep.tsx`
- [Taste step](https://github.com/popup0221/antiplan/blob/main/src/app/(back-BTN-layout)/recommend/(funnel)/(components)/TasteStep.tsx): `src/app/(back-BTN-layout)/recommend/(funnel)/(components)/TasteStep.tsx`
- [Base-spirit step](https://github.com/popup0221/antiplan/blob/main/src/app/(back-BTN-layout)/recommend/(funnel)/(components)/BaseStep.tsx): `src/app/(back-BTN-layout)/recommend/(funnel)/(components)/BaseStep.tsx`
- [Memo step](https://github.com/popup0221/antiplan/blob/main/src/app/(back-BTN-layout)/recommend/(funnel)/(components)/MemoStep.tsx): `src/app/(back-BTN-layout)/recommend/(funnel)/(components)/MemoStep.tsx`
- [Experience step](https://github.com/popup0221/antiplan/blob/main/src/app/(back-BTN-layout)/recommend/(funnel)/(components)/ExperienceStep.tsx): `src/app/(back-BTN-layout)/recommend/(funnel)/(components)/ExperienceStep.tsx`
- [Funnel state types](https://github.com/popup0221/antiplan/blob/main/src/app/(back-BTN-layout)/recommend/(funnel)/context.ts): `src/app/(back-BTN-layout)/recommend/(funnel)/context.ts`
- [Answer schemas](https://github.com/popup0221/antiplan/blob/main/src/app/(back-BTN-layout)/recommend/(funnel)/schemas.ts): `src/app/(back-BTN-layout)/recommend/(funnel)/schemas.ts`
- [Choice labels](https://github.com/popup0221/antiplan/blob/main/src/app/(back-BTN-layout)/recommend/(funnel)/literals.ts): `src/app/(back-BTN-layout)/recommend/(funnel)/literals.ts`

### Shared interface

- [Form controls](https://github.com/popup0221/antiplan/tree/main/src/components/ui): `src/components/ui`
- [Progress indicator](https://github.com/popup0221/antiplan/blob/main/src/components/ui/progress.tsx): `src/components/ui/progress.tsx`

### Documented capabilities

- [Recommended menu](https://github.com/popup0221/antiplan/tree/main/src/app/(back-BTN-layout)/recommend): `src/app/(back-BTN-layout)/recommend`
- [Order route](https://github.com/popup0221/antiplan/blob/main/src/app/(back-BTN-layout)/order/page.tsx): `src/app/(back-BTN-layout)/order/page.tsx`

### Other components

- **Visitor**

## Connections

- Visitor → Home page: opens app (evidence: `README.md`)
- Visitor → Recommendation page: answers questions (evidence: `README.md`)
- Recommendation page → Funnel controller: renders (evidence: `src/app/(back-BTN-layout)/recommend/page.tsx`)
- Recommendation page → Header state: sets header (evidence: `src/app/(back-BTN-layout)/recommend/page.tsx`)
- Recommendation page → Progress indicator: renders (evidence: `src/app/(back-BTN-layout)/recommend/page.tsx`)
- Funnel controller → Drink-type step: renders (evidence: `src/app/(back-BTN-layout)/recommend/(funnel)/(components)/Funnel.tsx`)
- Funnel controller → Strength step: renders (evidence: `src/app/(back-BTN-layout)/recommend/(funnel)/(components)/Funnel.tsx`)
- Funnel controller → Taste step: renders (evidence: `src/app/(back-BTN-layout)/recommend/(funnel)/(components)/Funnel.tsx`)
- Funnel controller → Base-spirit step: renders (evidence: `src/app/(back-BTN-layout)/recommend/(funnel)/(components)/Funnel.tsx`)
- Funnel controller → Memo step: renders (evidence: `src/app/(back-BTN-layout)/recommend/(funnel)/(components)/Funnel.tsx`)
- Funnel controller → Answer schemas: parses answers (evidence: `src/app/(back-BTN-layout)/recommend/(funnel)/(components)/Funnel.tsx`)
- Funnel controller → Funnel state types: uses types (evidence: `src/app/(back-BTN-layout)/recommend/(funnel)/(components)/Funnel.tsx`)
- Drink-type step → Form controls: uses controls (evidence: `src/app/(back-BTN-layout)/recommend/(funnel)/(components)/AlcoholStep.tsx`)
- Strength step → Form controls: uses controls (evidence: `src/app/(back-BTN-layout)/recommend/(funnel)/(components)/ProofStep.tsx`)
- Taste step → Form controls: uses controls (evidence: `src/app/(back-BTN-layout)/recommend/(funnel)/(components)/TasteStep.tsx`)
- Base-spirit step → Form controls: uses controls (evidence: `src/app/(back-BTN-layout)/recommend/(funnel)/(components)/BaseStep.tsx`)
- Memo step → Form controls: uses controls (evidence: `src/app/(back-BTN-layout)/recommend/(funnel)/(components)/MemoStep.tsx`)
- Drink-type step → Choice labels: reads labels (evidence: `src/app/(back-BTN-layout)/recommend/(funnel)/(components)/AlcoholStep.tsx`)
- Strength step → Choice labels: reads labels (evidence: `src/app/(back-BTN-layout)/recommend/(funnel)/(components)/ProofStep.tsx`)
- Taste step → Choice labels: reads labels (evidence: `src/app/(back-BTN-layout)/recommend/(funnel)/(components)/TasteStep.tsx`)
- Base-spirit step → Choice labels: reads labels (evidence: `src/app/(back-BTN-layout)/recommend/(funnel)/(components)/BaseStep.tsx`)
- Back header → Header state: reads state (evidence: `src/app/(back-BTN-layout)/(components)/header.tsx`)
- Home page → Recommended menu: offers recommendations (evidence: `README.md`)
- Recommended menu → Order route: offers ordering (evidence: `README.md`)
