# michaeltang3aaaaa/dit2163n_assignment_2 architecture

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

- Interactive diagram: https://gitdiagram.com/michaeltang3aaaaa/dit2163n_assignment_2
- Repository: https://github.com/michaeltang3aaaaa/dit2163n_assignment_2

## Overview

This is a React Native recipe app: users enter through the home screen, browse and filter recipes, open cooking details, save recipes, and generate recipes. The app also includes saved-recipe browsing and an About screen. The graph reflects documented screen registration and sampled or indexed module references; generator internals and some screen interactions were not shown, so uncertain links are omitted.

Main entry points: [`App.tsx`](https://github.com/michaeltang3aaaaa/dit2163n_assignment_2/blob/main/App.tsx) (App navigator), [`src/screens/RecipeListScreen.tsx`](https://github.com/michaeltang3aaaaa/dit2163n_assignment_2/blob/main/src/screens/RecipeListScreen.tsx) (Recipe browser), [`src/context/SavedRecipesContext.tsx`](https://github.com/michaeltang3aaaaa/dit2163n_assignment_2/blob/main/src/context/SavedRecipesContext.tsx) (Saved recipe state), [`src/screens/SavedRecipeListScreen.tsx`](https://github.com/michaeltang3aaaaa/dit2163n_assignment_2/blob/main/src/screens/SavedRecipeListScreen.tsx) (Saved browser)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_navigation["App navigation"]
  node_app["App navigator<br/>[App.tsx]"]
  node_home["Home screen<br/>[HomeScreen.tsx]"]
  node_about["About screen<br/>[AboutUsScreen.tsx]"]
end

subgraph group_recipes["Recipe discovery"]
  node_recipe_list["Recipe browser"]
  node_recipe_data["Recipe catalog<br/>[recipes.js]"]
  node_saved_list["Saved browser"]
end

subgraph group_cooking["Cooking and generation"]
  node_details["Recipe details"]
  node_generator_screen["Generation screen"]
  node_recipe_generator["Recipe generator<br/>[recipeGenerator.js]"]
end

subgraph group_shared["Shared state and UI"]
  node_saved_state["Saved recipe state"]
  node_recipe_styles["Recipe list styles"]
  node_saved_styles["Saved list styles"]
  node_detail_styles["Details styles"]
  node_home_styles["Home styles<br/>[homeStyles.js]"]
  node_about_styles["About styles<br/>[aboutUsStyles.js]"]
  node_theme["Theme constants<br/>[theme.ts]"]
  node_collapsible["Collapsible control<br/>[collapsible.tsx]"]
  node_web_badge["Web badge<br/>[web-badge.tsx]"]
  node_theme_hook["Theme hook<br/>[use-theme.ts]"]
end

node_user(("App user"))

node_user -->|"opens"| node_app
node_app -->|"registers"| node_home
node_app -->|"registers"| node_about
node_app -->|"registers"| node_recipe_list
node_app -->|"registers"| node_saved_list
node_app -->|"registers"| node_details
node_app -->|"registers"| node_generator_screen
node_app -->|"provides"| node_saved_state
node_recipe_list -->|"reads"| node_recipe_data
node_recipe_list -->|"uses"| node_saved_state
node_saved_list -->|"reads"| node_saved_state
node_generator_screen -->|"uses"| node_saved_state
node_generator_screen -->|"invokes"| node_recipe_generator
node_recipe_list -->|"styles"| node_recipe_styles
node_recipe_list -->|"styles"| node_saved_styles
node_saved_list -->|"styles"| node_saved_styles
node_details -->|"styles"| node_detail_styles
node_home -->|"styles"| node_home_styles
node_about -->|"styles"| node_about_styles
node_theme_hook -->|"reads"| node_theme
node_collapsible -->|"uses"| node_theme_hook
node_collapsible -->|"reads"| node_theme
node_web_badge -->|"uses"| node_theme

click node_app "https://github.com/michaeltang3aaaaa/dit2163n_assignment_2/blob/main/App.tsx"
click node_home "https://github.com/michaeltang3aaaaa/dit2163n_assignment_2/blob/main/src/screens/HomeScreen.tsx"
click node_about "https://github.com/michaeltang3aaaaa/dit2163n_assignment_2/blob/main/src/screens/AboutUsScreen.tsx"
click node_recipe_list "https://github.com/michaeltang3aaaaa/dit2163n_assignment_2/blob/main/src/screens/RecipeListScreen.tsx"
click node_recipe_data "https://github.com/michaeltang3aaaaa/dit2163n_assignment_2/blob/main/src/components/app/data/recipes.js"
click node_saved_list "https://github.com/michaeltang3aaaaa/dit2163n_assignment_2/blob/main/src/screens/SavedRecipeListScreen.tsx"
click node_details "https://github.com/michaeltang3aaaaa/dit2163n_assignment_2/blob/main/src/screens/RecipeDetailsScreen.tsx"
click node_generator_screen "https://github.com/michaeltang3aaaaa/dit2163n_assignment_2/blob/main/src/screens/GenerateRecipeScreen.tsx"
click node_recipe_generator "https://github.com/michaeltang3aaaaa/dit2163n_assignment_2/blob/main/src/components/app/AI_script/recipeGenerator.js"
click node_saved_state "https://github.com/michaeltang3aaaaa/dit2163n_assignment_2/blob/main/src/context/SavedRecipesContext.tsx"
click node_recipe_styles "https://github.com/michaeltang3aaaaa/dit2163n_assignment_2/blob/main/src/components/app/styles/recipeListStyles.js"
click node_saved_styles "https://github.com/michaeltang3aaaaa/dit2163n_assignment_2/blob/main/src/components/app/styles/savedRecipeListStyles.js"
click node_detail_styles "https://github.com/michaeltang3aaaaa/dit2163n_assignment_2/blob/main/src/components/app/styles/recipeDetailsStyles.js"
click node_home_styles "https://github.com/michaeltang3aaaaa/dit2163n_assignment_2/blob/main/src/components/app/styles/homeStyles.js"
click node_about_styles "https://github.com/michaeltang3aaaaa/dit2163n_assignment_2/blob/main/src/components/app/styles/aboutUsStyles.js"
click node_theme "https://github.com/michaeltang3aaaaa/dit2163n_assignment_2/blob/main/src/constants/theme.ts"
click node_collapsible "https://github.com/michaeltang3aaaaa/dit2163n_assignment_2/blob/main/src/components/ui/collapsible.tsx"
click node_web_badge "https://github.com/michaeltang3aaaaa/dit2163n_assignment_2/blob/main/src/components/web-badge.tsx"
click node_theme_hook "https://github.com/michaeltang3aaaaa/dit2163n_assignment_2/blob/main/src/hooks/use-theme.ts"

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_app,node_home,node_about,node_user toneBlue
class node_recipe_list,node_recipe_data,node_saved_list toneAmber
class node_details,node_generator_screen,node_recipe_generator toneMint
class node_saved_state,node_recipe_styles,node_saved_styles,node_detail_styles,node_home_styles,node_about_styles,node_theme,node_collapsible,node_web_badge,node_theme_hook toneRose
```

## Components

### App navigation

- [App navigator](https://github.com/michaeltang3aaaaa/dit2163n_assignment_2/blob/main/App.tsx): `App.tsx`
- [Home screen](https://github.com/michaeltang3aaaaa/dit2163n_assignment_2/blob/main/src/screens/HomeScreen.tsx): `src/screens/HomeScreen.tsx`
- [About screen](https://github.com/michaeltang3aaaaa/dit2163n_assignment_2/blob/main/src/screens/AboutUsScreen.tsx): `src/screens/AboutUsScreen.tsx`

### Recipe discovery

- [Recipe browser](https://github.com/michaeltang3aaaaa/dit2163n_assignment_2/blob/main/src/screens/RecipeListScreen.tsx): `src/screens/RecipeListScreen.tsx`
- [Recipe catalog](https://github.com/michaeltang3aaaaa/dit2163n_assignment_2/blob/main/src/components/app/data/recipes.js): `src/components/app/data/recipes.js`
- [Saved browser](https://github.com/michaeltang3aaaaa/dit2163n_assignment_2/blob/main/src/screens/SavedRecipeListScreen.tsx): `src/screens/SavedRecipeListScreen.tsx`

### Cooking and generation

- [Recipe details](https://github.com/michaeltang3aaaaa/dit2163n_assignment_2/blob/main/src/screens/RecipeDetailsScreen.tsx): `src/screens/RecipeDetailsScreen.tsx`
- [Generation screen](https://github.com/michaeltang3aaaaa/dit2163n_assignment_2/blob/main/src/screens/GenerateRecipeScreen.tsx): `src/screens/GenerateRecipeScreen.tsx`
- [Recipe generator](https://github.com/michaeltang3aaaaa/dit2163n_assignment_2/blob/main/src/components/app/AI_script/recipeGenerator.js): `src/components/app/AI_script/recipeGenerator.js`

### Shared state and UI

- [Saved recipe state](https://github.com/michaeltang3aaaaa/dit2163n_assignment_2/blob/main/src/context/SavedRecipesContext.tsx): `src/context/SavedRecipesContext.tsx`
- [Recipe list styles](https://github.com/michaeltang3aaaaa/dit2163n_assignment_2/blob/main/src/components/app/styles/recipeListStyles.js): `src/components/app/styles/recipeListStyles.js`
- [Saved list styles](https://github.com/michaeltang3aaaaa/dit2163n_assignment_2/blob/main/src/components/app/styles/savedRecipeListStyles.js): `src/components/app/styles/savedRecipeListStyles.js`
- [Details styles](https://github.com/michaeltang3aaaaa/dit2163n_assignment_2/blob/main/src/components/app/styles/recipeDetailsStyles.js): `src/components/app/styles/recipeDetailsStyles.js`
- [Home styles](https://github.com/michaeltang3aaaaa/dit2163n_assignment_2/blob/main/src/components/app/styles/homeStyles.js): `src/components/app/styles/homeStyles.js`
- [About styles](https://github.com/michaeltang3aaaaa/dit2163n_assignment_2/blob/main/src/components/app/styles/aboutUsStyles.js): `src/components/app/styles/aboutUsStyles.js`
- [Theme constants](https://github.com/michaeltang3aaaaa/dit2163n_assignment_2/blob/main/src/constants/theme.ts): `src/constants/theme.ts`
- [Collapsible control](https://github.com/michaeltang3aaaaa/dit2163n_assignment_2/blob/main/src/components/ui/collapsible.tsx): `src/components/ui/collapsible.tsx`
- [Web badge](https://github.com/michaeltang3aaaaa/dit2163n_assignment_2/blob/main/src/components/web-badge.tsx): `src/components/web-badge.tsx`
- [Theme hook](https://github.com/michaeltang3aaaaa/dit2163n_assignment_2/blob/main/src/hooks/use-theme.ts): `src/hooks/use-theme.ts`

### Other components

- **App user**

## Connections

- App user → App navigator: opens
- App navigator → Home screen: registers (evidence: `App.tsx`)
- App navigator → About screen: registers (evidence: `App.tsx`)
- App navigator → Recipe browser: registers (evidence: `App.tsx`)
- App navigator → Saved browser: registers (evidence: `App.tsx`)
- App navigator → Recipe details: registers (evidence: `App.tsx`)
- App navigator → Generation screen: registers (evidence: `App.tsx`)
- App navigator → Saved recipe state: provides (evidence: `App.tsx`)
- Recipe browser → Recipe catalog: reads (evidence: `src/screens/RecipeListScreen.tsx`)
- Recipe browser → Saved recipe state: uses (evidence: `src/screens/RecipeListScreen.tsx`)
- Saved browser → Saved recipe state: reads (evidence: `src/screens/SavedRecipeListScreen.tsx`)
- Generation screen → Saved recipe state: uses (evidence: `src/screens/GenerateRecipeScreen.tsx`)
- Generation screen → Recipe generator: invokes (evidence: `src/screens/GenerateRecipeScreen.tsx`)
- Recipe browser → Recipe list styles: styles (evidence: `src/screens/RecipeListScreen.tsx`)
- Recipe browser → Saved list styles: styles (evidence: `src/screens/RecipeListScreen.tsx`)
- Saved browser → Saved list styles: styles (evidence: `src/screens/SavedRecipeListScreen.tsx`)
- Recipe details → Details styles: styles (evidence: `src/screens/RecipeDetailsScreen.tsx`)
- Home screen → Home styles: styles (evidence: `src/screens/HomeScreen.tsx`)
- About screen → About styles: styles (evidence: `src/screens/AboutUsScreen.tsx`)
- Theme hook → Theme constants: reads (evidence: `src/hooks/use-theme.ts`)
- Collapsible control → Theme hook: uses (evidence: `src/components/ui/collapsible.tsx`)
- Collapsible control → Theme constants: reads (evidence: `src/components/ui/collapsible.tsx`)
- Web badge → Theme constants: uses (evidence: `src/components/web-badge.tsx`)
