# dev-yk2/public_portfolio architecture

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

- Interactive diagram: https://gitdiagram.com/dev-yk2/public_portfolio
- Repository: https://github.com/dev-yk2/public_portfolio

## Overview

This repository contains several separate web applications: a Firebase-backed memo app, a React portfolio of small apps, and two bookshelf applications (Next.js/GraphQL and Next.js/API). The principal flows are memo sign-in and memo editing, card creation, and bookshelf management. The tree indicates additional bookshelf features and integrations, but excerpts are sparse; relationships are shown only where the source index or excerpts support them. In particular, the Vercel app’s GraphQL and page wiring is not established by the available evidence.

Main entry points: [`react-app/src/App.tsx`](https://github.com/dev-yk2/public_portfolio/blob/main/react-app/src/App.tsx) (App Routes), [`test_aws_app/my-next-app/src/features/myBooks/middleware/middlewareAuth.ts`](https://github.com/dev-yk2/public_portfolio/blob/main/test_aws_app/my-next-app/src/features/myBooks/middleware/middlewareAuth.ts) (Auth Middleware), [`memo-app/src/components/pages/memoapp/MemoApp.tsx`](https://github.com/dev-yk2/public_portfolio/blob/main/memo-app/src/components/pages/memoapp/MemoApp.tsx) (Memo Editing), [`react-app/src/components/page/generate-card-app/GenerateCardApp.tsx`](https://github.com/dev-yk2/public_portfolio/blob/main/react-app/src/components/page/generate-card-app/GenerateCardApp.tsx) (Card Workflow)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_memo["Firebase Memo App"]
  node_memo_user["Auth State<br/>[UserContext.tsx]"]
  node_memo_app["Memo Routes<br/>[App.tsx]"]
  node_memo_login["Sign In<br/>[Login.tsx]"]
  node_memo_header["Session Menu<br/>[Header.tsx]"]
  node_memo_editor["Memo Editing<br/>[MemoApp.tsx]"]
  node_memo_item["Memo Views<br/>[MemoItem.tsx]"]
  node_memo_helpers["Memo Data Helpers<br/>[utilty.ts]"]
end

subgraph group_showcase["React App Suite"]
  node_react_routes["App Routes<br/>[App.tsx]"]
  node_home["App Directory<br/>[Home.tsx]"]
  node_card_app["Card Workflow"]
  node_card_inputs["Card Text Input<br/>[InputText.tsx]"]
  node_card_select["Card Selection<br/>[SelectCard.tsx]"]
  node_card_complete["Card Output<br/>[CompleteCard.tsx]"]
  node_clock["World Clock<br/>[WorldClockApp.tsx]"]
  node_react_memo["Memo Feature"]
end

subgraph group_vercel["GraphQL Bookshelf"]
  node_vercel_pages["Bookshelf Pages"]
  node_vercel_features["Bookshelf Features"]
  node_vercel_graphql["GraphQL API"]
  node_vercel_client["GraphQL Operations"]
  node_vercel_db[("Prisma Store<br/>[prismaClient.ts]")]
end

subgraph group_aws["API Bookshelf"]
  node_aws_pages["Bookshelf Pages"]
  node_aws_ui["Bookshelf UI"]
  node_aws_services["Book Services"]
  node_aws_auth["Auth Middleware<br/>[middlewareAuth.ts]"]
  node_aws_api["Bookshelf API<br/>[myBooks]"]
  node_aws_db[("Prisma Store<br/>[prisma.ts]")]
end

node_firebase_auth[("Firebase Auth")]
node_firebase_data[("Firebase Memo Data")]
node_aws_firebase[("Firebase Auth")]

node_memo_user -->|"monitors"| node_firebase_auth
node_memo_app -->|"reads state"| node_memo_user
node_memo_app -->|"routes to"| node_memo_login
node_memo_app -->|"routes to"| node_memo_editor
node_memo_header -->|"signs out"| node_firebase_auth
node_memo_editor -->|"reads and writes"| node_firebase_data
node_memo_editor -->|"converts data"| node_memo_helpers
node_memo_editor -->|"renders"| node_memo_item
node_react_routes -->|"routes to"| node_home
node_react_routes -->|"routes to"| node_card_app
node_react_routes -->|"routes to"| node_clock
node_react_routes -->|"routes to"| node_react_memo
node_card_app -->|"renders"| node_card_select
node_card_app -->|"renders"| node_card_inputs
node_card_app -->|"renders"| node_card_complete
node_aws_auth -->|"looks up user"| node_aws_db
node_aws_auth -->|"redirects to"| node_aws_pages
node_aws_auth -->|"validates tokens"| node_aws_firebase
node_aws_auth -->|"calls auth services"| node_aws_services

click node_memo_user "https://github.com/dev-yk2/public_portfolio/blob/main/memo-app/src/components/context/UserContext.tsx"
click node_memo_app "https://github.com/dev-yk2/public_portfolio/blob/main/memo-app/src/App.tsx"
click node_memo_login "https://github.com/dev-yk2/public_portfolio/blob/main/memo-app/src/components/pages/login/Login.tsx"
click node_memo_header "https://github.com/dev-yk2/public_portfolio/blob/main/memo-app/src/components/layout/Header.tsx"
click node_memo_editor "https://github.com/dev-yk2/public_portfolio/blob/main/memo-app/src/components/pages/memoapp/MemoApp.tsx"
click node_memo_item "https://github.com/dev-yk2/public_portfolio/blob/main/memo-app/src/components/pages/memoapp/MemoItem.tsx"
click node_memo_helpers "https://github.com/dev-yk2/public_portfolio/blob/main/memo-app/src/utilty/utilty.ts"
click node_react_routes "https://github.com/dev-yk2/public_portfolio/blob/main/react-app/src/App.tsx"
click node_home "https://github.com/dev-yk2/public_portfolio/blob/main/react-app/src/components/page/home/Home.tsx"
click node_card_app "https://github.com/dev-yk2/public_portfolio/blob/main/react-app/src/components/page/generate-card-app/GenerateCardApp.tsx"
click node_card_inputs "https://github.com/dev-yk2/public_portfolio/blob/main/react-app/src/components/page/generate-card-app/InputText.tsx"
click node_card_select "https://github.com/dev-yk2/public_portfolio/blob/main/react-app/src/components/page/generate-card-app/SelectCard.tsx"
click node_card_complete "https://github.com/dev-yk2/public_portfolio/blob/main/react-app/src/components/page/generate-card-app/CompleteCard.tsx"
click node_clock "https://github.com/dev-yk2/public_portfolio/blob/main/react-app/src/components/page/world-clock-app/WorldClockApp.tsx"
click node_react_memo "https://github.com/dev-yk2/public_portfolio/tree/main/react-app/src/components/page/memo-app"
click node_vercel_pages "https://github.com/dev-yk2/public_portfolio/tree/main/test-vercel/src/pages/bookshelf"
click node_vercel_features "https://github.com/dev-yk2/public_portfolio/tree/main/test-vercel/src/features/bookshelf"
click node_vercel_graphql "https://github.com/dev-yk2/public_portfolio/tree/main/test-vercel/src/graphql/server"
click node_vercel_client "https://github.com/dev-yk2/public_portfolio/tree/main/test-vercel/src/graphql/client"
click node_vercel_db "https://github.com/dev-yk2/public_portfolio/blob/main/test-vercel/src/features/root/lib/prismaClient.ts"
click node_aws_pages "https://github.com/dev-yk2/public_portfolio/tree/main/test_aws_app/my-next-app/src/pages/myBooks"
click node_aws_ui "https://github.com/dev-yk2/public_portfolio/tree/main/test_aws_app/my-next-app/src/features/myBooks/components"
click node_aws_services "https://github.com/dev-yk2/public_portfolio/tree/main/test_aws_app/my-next-app/src/features/myBooks/services"
click node_aws_auth "https://github.com/dev-yk2/public_portfolio/blob/main/test_aws_app/my-next-app/src/features/myBooks/middleware/middlewareAuth.ts"
click node_aws_api "https://github.com/dev-yk2/public_portfolio/tree/main/test_aws_app/my-next-app/src/pages/api/v0.2/myBooks"
click node_aws_db "https://github.com/dev-yk2/public_portfolio/blob/main/test_aws_app/my-next-app/src/lib/prisma.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_memo_user,node_memo_app,node_memo_login,node_memo_header,node_memo_editor,node_memo_item,node_memo_helpers toneBlue
class node_react_routes,node_home,node_card_app,node_card_inputs,node_card_select,node_card_complete,node_clock,node_react_memo,node_firebase_auth,node_firebase_data,node_aws_firebase toneAmber
class node_vercel_pages,node_vercel_features,node_vercel_graphql,node_vercel_client,node_vercel_db toneMint
class node_aws_pages,node_aws_ui,node_aws_services,node_aws_auth,node_aws_api,node_aws_db toneRose
```

## Components

### Firebase Memo App

- [Auth State](https://github.com/dev-yk2/public_portfolio/blob/main/memo-app/src/components/context/UserContext.tsx): `memo-app/src/components/context/UserContext.tsx`
- [Memo Routes](https://github.com/dev-yk2/public_portfolio/blob/main/memo-app/src/App.tsx): `memo-app/src/App.tsx`
- [Sign In](https://github.com/dev-yk2/public_portfolio/blob/main/memo-app/src/components/pages/login/Login.tsx): `memo-app/src/components/pages/login/Login.tsx`
- [Session Menu](https://github.com/dev-yk2/public_portfolio/blob/main/memo-app/src/components/layout/Header.tsx): `memo-app/src/components/layout/Header.tsx`
- [Memo Editing](https://github.com/dev-yk2/public_portfolio/blob/main/memo-app/src/components/pages/memoapp/MemoApp.tsx): `memo-app/src/components/pages/memoapp/MemoApp.tsx`
- [Memo Views](https://github.com/dev-yk2/public_portfolio/blob/main/memo-app/src/components/pages/memoapp/MemoItem.tsx): `memo-app/src/components/pages/memoapp/MemoItem.tsx`
- [Memo Data Helpers](https://github.com/dev-yk2/public_portfolio/blob/main/memo-app/src/utilty/utilty.ts): `memo-app/src/utilty/utilty.ts`

### React App Suite

- [App Routes](https://github.com/dev-yk2/public_portfolio/blob/main/react-app/src/App.tsx): `react-app/src/App.tsx`
- [App Directory](https://github.com/dev-yk2/public_portfolio/blob/main/react-app/src/components/page/home/Home.tsx): `react-app/src/components/page/home/Home.tsx`
- [Card Workflow](https://github.com/dev-yk2/public_portfolio/blob/main/react-app/src/components/page/generate-card-app/GenerateCardApp.tsx): `react-app/src/components/page/generate-card-app/GenerateCardApp.tsx`
- [Card Text Input](https://github.com/dev-yk2/public_portfolio/blob/main/react-app/src/components/page/generate-card-app/InputText.tsx): `react-app/src/components/page/generate-card-app/InputText.tsx`
- [Card Selection](https://github.com/dev-yk2/public_portfolio/blob/main/react-app/src/components/page/generate-card-app/SelectCard.tsx): `react-app/src/components/page/generate-card-app/SelectCard.tsx`
- [Card Output](https://github.com/dev-yk2/public_portfolio/blob/main/react-app/src/components/page/generate-card-app/CompleteCard.tsx): `react-app/src/components/page/generate-card-app/CompleteCard.tsx`
- [World Clock](https://github.com/dev-yk2/public_portfolio/blob/main/react-app/src/components/page/world-clock-app/WorldClockApp.tsx): `react-app/src/components/page/world-clock-app/WorldClockApp.tsx`
- [Memo Feature](https://github.com/dev-yk2/public_portfolio/tree/main/react-app/src/components/page/memo-app): `react-app/src/components/page/memo-app`

### GraphQL Bookshelf

- [Bookshelf Pages](https://github.com/dev-yk2/public_portfolio/tree/main/test-vercel/src/pages/bookshelf): `test-vercel/src/pages/bookshelf`
- [Bookshelf Features](https://github.com/dev-yk2/public_portfolio/tree/main/test-vercel/src/features/bookshelf): `test-vercel/src/features/bookshelf`
- [GraphQL API](https://github.com/dev-yk2/public_portfolio/tree/main/test-vercel/src/graphql/server): `test-vercel/src/graphql/server`
- [GraphQL Operations](https://github.com/dev-yk2/public_portfolio/tree/main/test-vercel/src/graphql/client): `test-vercel/src/graphql/client`
- [Prisma Store](https://github.com/dev-yk2/public_portfolio/blob/main/test-vercel/src/features/root/lib/prismaClient.ts): `test-vercel/src/features/root/lib/prismaClient.ts`

### API Bookshelf

- [Bookshelf Pages](https://github.com/dev-yk2/public_portfolio/tree/main/test_aws_app/my-next-app/src/pages/myBooks): `test_aws_app/my-next-app/src/pages/myBooks`
- [Bookshelf UI](https://github.com/dev-yk2/public_portfolio/tree/main/test_aws_app/my-next-app/src/features/myBooks/components): `test_aws_app/my-next-app/src/features/myBooks/components`
- [Book Services](https://github.com/dev-yk2/public_portfolio/tree/main/test_aws_app/my-next-app/src/features/myBooks/services): `test_aws_app/my-next-app/src/features/myBooks/services`
- [Auth Middleware](https://github.com/dev-yk2/public_portfolio/blob/main/test_aws_app/my-next-app/src/features/myBooks/middleware/middlewareAuth.ts): `test_aws_app/my-next-app/src/features/myBooks/middleware/middlewareAuth.ts`
- [Bookshelf API](https://github.com/dev-yk2/public_portfolio/tree/main/test_aws_app/my-next-app/src/pages/api/v0.2/myBooks): `test_aws_app/my-next-app/src/pages/api/v0.2/myBooks`
- [Prisma Store](https://github.com/dev-yk2/public_portfolio/blob/main/test_aws_app/my-next-app/src/lib/prisma.ts): `test_aws_app/my-next-app/src/lib/prisma.ts`

### Other components

- **Firebase Auth**
- **Firebase Memo Data**
- **Firebase Auth**

## Connections

- Auth State → Firebase Auth: monitors (evidence: `memo-app/src/components/context/UserContext.tsx`)
- Memo Routes → Auth State: reads state (evidence: `memo-app/src/App.tsx`)
- Memo Routes → Sign In: routes to (evidence: `memo-app/src/App.tsx`)
- Memo Routes → Memo Editing: routes to (evidence: `memo-app/src/App.tsx`)
- Session Menu → Firebase Auth: signs out (evidence: `memo-app/src/components/layout/Header.tsx`)
- Memo Editing → Firebase Memo Data: reads and writes (evidence: `memo-app/src/components/pages/memoapp/MemoApp.tsx`)
- Memo Editing → Memo Data Helpers: converts data (evidence: `memo-app/src/components/pages/memoapp/MemoApp.tsx`)
- Memo Editing → Memo Views: renders (evidence: `memo-app/src/components/pages/memoapp/MemoApp.tsx`)
- App Routes → App Directory: routes to (evidence: `react-app/src/App.tsx`)
- App Routes → Card Workflow: routes to (evidence: `react-app/src/App.tsx`)
- App Routes → World Clock: routes to (evidence: `react-app/src/App.tsx`)
- App Routes → Memo Feature: routes to (evidence: `react-app/src/App.tsx`)
- Card Workflow → Card Selection: renders (evidence: `react-app/src/components/page/generate-card-app/GenerateCardApp.tsx`)
- Card Workflow → Card Text Input: renders (evidence: `react-app/src/components/page/generate-card-app/GenerateCardApp.tsx`)
- Card Workflow → Card Output: renders (evidence: `react-app/src/components/page/generate-card-app/GenerateCardApp.tsx`)
- Auth Middleware → Prisma Store: looks up user (evidence: `test_aws_app/my-next-app/src/features/myBooks/middleware/middlewareAuth.ts`)
- Auth Middleware → Bookshelf Pages: redirects to (evidence: `test_aws_app/my-next-app/src/features/myBooks/middleware/middlewareAuth.ts`)
- Auth Middleware → Firebase Auth: validates tokens (evidence: `test_aws_app/my-next-app/src/features/myBooks/middleware/middlewareAuth.ts`)
- Auth Middleware → Book Services: calls auth services (evidence: `test_aws_app/my-next-app/src/features/myBooks/middleware/middlewareAuth.ts`)
