# asiject/thefourkorea-portfolio architecture

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

- Interactive diagram: https://gitdiagram.com/asiject/thefourkorea-portfolio
- Repository: https://github.com/asiject/thefourkorea-portfolio

## Overview

This repository is a portfolio of reusable frontend patterns, not one integrated application. Its only runnable product workflow is the controlled-form demo: a user opens the demo, enters and validates form data, and submits it for console logging and an alert; no API is connected. The other packages document encrypted session state, an admin drag-and-drop board, an OAuth callback, and static deployment. The excerpts establish the demo entry point and storage behavior; links for unsampled package internals rely on README descriptions and are identified accordingly.

Main entry points: [`packages/encrypted-storage/src/atoms/sessionUserAtom.ts`](https://github.com/asiject/thefourkorea-portfolio/blob/main/packages/encrypted-storage/src/atoms/sessionUserAtom.ts) (Session User Atom), [`packages/static-deploy`](https://github.com/asiject/thefourkorea-portfolio/tree/main/packages/static-deploy) (Static Deploy Workflow), [`packages/controlled-form/src/main.tsx`](https://github.com/asiject/thefourkorea-portfolio/blob/main/packages/controlled-form/src/main.tsx) (Form Demo App), [`packages/controlled-form/src/demo/RequestFormDemo.tsx`](https://github.com/asiject/thefourkorea-portfolio/blob/main/packages/controlled-form/src/demo/RequestFormDemo.tsx) (Request Form)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_forms["Controlled Form"]
  node_form_app["Form Demo App<br/>[main.tsx]"]
  node_request_form["Request Form"]
  node_controlled_field["Controlled Field"]
end

subgraph group_state["Session State"]
  node_session_atom["Session User Atom<br/>[sessionUserAtom.ts]"]
  node_session_storage[("Browser sessionStorage")]
  node_cryptojs["CryptoJS AES"]
end

subgraph group_admin["Admin Board"]
  node_admin_board["Admin DnD Board"]
end

subgraph group_auth["OAuth Callback"]
  node_oauth_callback["OAuth Callback"]
  node_oauth_provider["OAuth Provider"]
  node_token_storage[("Token Storage")]
end

subgraph group_deploy["Static Deployment"]
  node_static_deploy["Static Deploy Workflow"]
  node_aws_s3[("AWS S3")]
  node_cloudfront["CloudFront"]
end

node_user(("Demo User"))

node_user -->|"opens demo"| node_form_app
node_form_app -->|"renders"| node_request_form
node_request_form -.->|"uses field"| node_controlled_field
node_session_atom -->|"reads and writes"| node_session_storage
node_session_atom -->|"encrypts and decrypts"| node_cryptojs
node_oauth_provider -.->|"returns callback"| node_oauth_callback
node_oauth_callback -.->|"stores tokens"| node_token_storage
node_static_deploy -.->|"deploys assets"| node_aws_s3
node_static_deploy -.->|"uses CDN"| node_cloudfront

click node_form_app "https://github.com/asiject/thefourkorea-portfolio/blob/main/packages/controlled-form/src/main.tsx"
click node_request_form "https://github.com/asiject/thefourkorea-portfolio/blob/main/packages/controlled-form/src/demo/RequestFormDemo.tsx"
click node_controlled_field "https://github.com/asiject/thefourkorea-portfolio/blob/main/packages/controlled-form/src/components/ControlledTextField.tsx"
click node_session_atom "https://github.com/asiject/thefourkorea-portfolio/blob/main/packages/encrypted-storage/src/atoms/sessionUserAtom.ts"
click node_admin_board "https://github.com/asiject/thefourkorea-portfolio/tree/main/packages/admin-dnd-board"
click node_oauth_callback "https://github.com/asiject/thefourkorea-portfolio/tree/main/packages/social-auth-callback"
click node_static_deploy "https://github.com/asiject/thefourkorea-portfolio/tree/main/packages/static-deploy"

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_form_app,node_request_form,node_controlled_field,node_user toneBlue
class node_session_atom,node_session_storage,node_cryptojs toneAmber
class node_admin_board toneMint
class node_oauth_callback,node_oauth_provider,node_token_storage toneRose
class node_static_deploy,node_aws_s3,node_cloudfront toneIndigo
```

## Components

### Controlled Form

- [Form Demo App](https://github.com/asiject/thefourkorea-portfolio/blob/main/packages/controlled-form/src/main.tsx): `packages/controlled-form/src/main.tsx`
- [Request Form](https://github.com/asiject/thefourkorea-portfolio/blob/main/packages/controlled-form/src/demo/RequestFormDemo.tsx): `packages/controlled-form/src/demo/RequestFormDemo.tsx`
- [Controlled Field](https://github.com/asiject/thefourkorea-portfolio/blob/main/packages/controlled-form/src/components/ControlledTextField.tsx): `packages/controlled-form/src/components/ControlledTextField.tsx`

### Session State

- [Session User Atom](https://github.com/asiject/thefourkorea-portfolio/blob/main/packages/encrypted-storage/src/atoms/sessionUserAtom.ts): `packages/encrypted-storage/src/atoms/sessionUserAtom.ts`
- **Browser sessionStorage**
- **CryptoJS AES**

### Admin Board

- [Admin DnD Board](https://github.com/asiject/thefourkorea-portfolio/tree/main/packages/admin-dnd-board): `packages/admin-dnd-board`

### OAuth Callback

- [OAuth Callback](https://github.com/asiject/thefourkorea-portfolio/tree/main/packages/social-auth-callback): `packages/social-auth-callback`
- **OAuth Provider**
- **Token Storage**

### Static Deployment

- [Static Deploy Workflow](https://github.com/asiject/thefourkorea-portfolio/tree/main/packages/static-deploy): `packages/static-deploy`
- **AWS S3**
- **CloudFront**

### Other components

- **Demo User**

## Connections

- Demo User → Form Demo App: opens demo (evidence: `README.md`)
- Form Demo App → Request Form: renders (evidence: `packages/controlled-form/src/main.tsx`)
- Request Form → Controlled Field: uses field
- Session User Atom → Browser sessionStorage: reads and writes (evidence: `packages/encrypted-storage/src/atoms/sessionUserAtom.ts`)
- Session User Atom → CryptoJS AES: encrypts and decrypts (evidence: `packages/encrypted-storage/src/atoms/sessionUserAtom.ts`)
- OAuth Provider → OAuth Callback: returns callback (evidence: `README.md`)
- OAuth Callback → Token Storage: stores tokens (evidence: `README.md`)
- Static Deploy Workflow → AWS S3: deploys assets (evidence: `README.md`)
- Static Deploy Workflow → CloudFront: uses CDN (evidence: `README.md`)
