# thdwlndjs/wantwear architecture

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

- Interactive diagram: https://gitdiagram.com/thdwlndjs/wantwear
- Repository: https://github.com/thdwlndjs/wantwear

## Overview

This is a clothing-link collection app: users sign in, then add product URLs, browse/filter the saved collection, and delete entries. The frontend also requests link-preview and sold-out checks; the backend tree indicates authentication, product, preview, and sold-out services, plus scheduled notifications. The source excerpts establish frontend routing and API calls, but backend implementations and notification wiring were not sampled, so those relationships are shown as unverified where appropriate.

Main entry points: [`frontend/page/Home.jsx`](https://github.com/thdwlndjs/wantwear/blob/main/frontend/page/Home.jsx) (Collection manager), [`frontend/App.jsx`](https://github.com/thdwlndjs/wantwear/blob/main/frontend/App.jsx) (App routing), [`backend/src/main/java/com/example/springboot/controller/AuthController.java`](https://github.com/thdwlndjs/wantwear/blob/main/backend/src/main/java/com/example/springboot/controller/AuthController.java) (Authentication endpoints), [`frontend/page/FirstNav.jsx`](https://github.com/thdwlndjs/wantwear/blob/main/frontend/page/FirstNav.jsx) (Login menu)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web application"]
  node_app["App routing<br/>[App.jsx]"]
  node_entry["App bootstrap<br/>[main.jsx]"]
  node_firstnav["Login menu<br/>[FirstNav.jsx]"]
  node_login["Login form<br/>[Login.jsx]"]
  node_signup["Sign-up form<br/>[Signin.jsx]"]
  node_navbar["Category navigation<br/>[Navbar.jsx]"]
  node_home["Collection manager<br/>[Home.jsx]"]
  node_authapi["Auth API client<br/>[authApi.js]"]
  node_productcard["Product card<br/>[ProductCard.jsx]"]
end

subgraph group_backend["Backend services"]
  node_authcontroller["Authentication endpoints"]
  node_authservice["Authentication service<br/>[AuthService.java]"]
  node_security["JWT security"]
  node_jwt["JWT provider<br/>[JwtProvider.java]"]
  node_productapi["Product endpoints"]
  node_productservice["Product service"]
  node_preview["Preview endpoint"]
  node_soldoutapi["Sold-out endpoint"]
  node_soldout["Sold-out checker"]
  node_expresspreview["Preview proxy<br/>[server.js]"]
end

subgraph group_data["Persistence"]
  node_productrepo["Product repository"]
  node_productentity["Product records<br/>[ProductEntity.java]"]
  node_database[("Application database")]
end

subgraph group_notify["Notifications"]
  node_scheduler["Notification scheduler"]
  node_push["Web push service"]
end

node_user(("User"))
node_external(("Product websites"))

node_entry -->|"renders"| node_app
node_app -->|"routes"| node_firstnav
node_app -->|"routes"| node_navbar
node_app -->|"routes"| node_home
node_firstnav -->|"renders"| node_login
node_firstnav -->|"renders"| node_signup
node_login -->|"calls"| node_authapi
node_navbar -->|"calls"| node_authapi
node_user -.->|"opens"| node_entry
node_login -.->|"authenticates"| node_authcontroller
node_signup -.->|"registers"| node_authcontroller
node_authapi -.->|"requests"| node_authcontroller
node_authcontroller -.->|"delegates"| node_authservice
node_security -.->|"uses"| node_jwt
node_home -.->|"loads, adds, deletes"| node_productapi
node_home -.->|"requests preview"| node_preview
node_home -.->|"checks stock"| node_soldoutapi
node_productapi -.->|"delegates"| node_productservice
node_productservice -.->|"uses"| node_productrepo
node_productrepo -.->|"persists"| node_productentity
node_productentity -.->|"stored in"| node_database
node_soldoutapi -.->|"delegates"| node_soldout
node_scheduler -.->|"schedules"| node_push
node_home -.->|"displays products"| node_productcard
node_expresspreview -->|"fetches page"| node_external

click node_app "https://github.com/thdwlndjs/wantwear/blob/main/frontend/App.jsx"
click node_entry "https://github.com/thdwlndjs/wantwear/blob/main/frontend/main.jsx"
click node_firstnav "https://github.com/thdwlndjs/wantwear/blob/main/frontend/page/FirstNav.jsx"
click node_login "https://github.com/thdwlndjs/wantwear/blob/main/frontend/page/Login.jsx"
click node_signup "https://github.com/thdwlndjs/wantwear/blob/main/frontend/page/Signin.jsx"
click node_navbar "https://github.com/thdwlndjs/wantwear/blob/main/frontend/page/Navbar.jsx"
click node_home "https://github.com/thdwlndjs/wantwear/blob/main/frontend/page/Home.jsx"
click node_authapi "https://github.com/thdwlndjs/wantwear/blob/main/frontend/api/authApi.js"
click node_productcard "https://github.com/thdwlndjs/wantwear/blob/main/frontend/components/ProductCard.jsx"
click node_authcontroller "https://github.com/thdwlndjs/wantwear/blob/main/backend/src/main/java/com/example/springboot/controller/AuthController.java"
click node_authservice "https://github.com/thdwlndjs/wantwear/blob/main/backend/src/main/java/com/example/springboot/service/AuthService.java"
click node_security "https://github.com/thdwlndjs/wantwear/blob/main/backend/src/main/java/com/example/springboot/config/SecurityConfig.java"
click node_jwt "https://github.com/thdwlndjs/wantwear/blob/main/backend/src/main/java/com/example/springboot/config/JwtProvider.java"
click node_productapi "https://github.com/thdwlndjs/wantwear/blob/main/backend/src/main/java/com/example/springboot/controller/ProductController.java"
click node_productservice "https://github.com/thdwlndjs/wantwear/blob/main/backend/src/main/java/com/example/springboot/service/ProductService.java"
click node_preview "https://github.com/thdwlndjs/wantwear/blob/main/backend/src/main/java/com/example/springboot/controller/PreviewController.java"
click node_soldoutapi "https://github.com/thdwlndjs/wantwear/blob/main/backend/src/main/java/com/example/springboot/controller/SoldOutController.java"
click node_soldout "https://github.com/thdwlndjs/wantwear/blob/main/backend/src/main/java/com/example/springboot/service/SoldOutChecker.java"
click node_productrepo "https://github.com/thdwlndjs/wantwear/blob/main/backend/src/main/java/com/example/springboot/repository/ProductRepository.java"
click node_productentity "https://github.com/thdwlndjs/wantwear/blob/main/backend/src/main/java/com/example/springboot/entity/ProductEntity.java"
click node_database "https://github.com/thdwlndjs/wantwear/blob/main/backend/src/main/resources/db/migration/V1__init_schema.sql"
click node_scheduler "https://github.com/thdwlndjs/wantwear/blob/main/backend/src/main/java/com/example/springboot/scheduler/NotificationScheduler.java"
click node_push "https://github.com/thdwlndjs/wantwear/blob/main/backend/src/main/java/com/example/springboot/service/WebPushService.java"
click node_expresspreview "https://github.com/thdwlndjs/wantwear/blob/main/server/server.js"

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_entry,node_firstnav,node_login,node_signup,node_navbar,node_home,node_authapi,node_productcard,node_user toneBlue
class node_authcontroller,node_authservice,node_security,node_jwt,node_productapi,node_productservice,node_preview,node_soldoutapi,node_soldout,node_expresspreview toneAmber
class node_productrepo,node_productentity,node_database toneMint
class node_scheduler,node_push toneRose
class node_external toneIndigo
```

## Components

### Web application

- [App routing](https://github.com/thdwlndjs/wantwear/blob/main/frontend/App.jsx): `frontend/App.jsx`
- [App bootstrap](https://github.com/thdwlndjs/wantwear/blob/main/frontend/main.jsx): `frontend/main.jsx`
- [Login menu](https://github.com/thdwlndjs/wantwear/blob/main/frontend/page/FirstNav.jsx): `frontend/page/FirstNav.jsx`
- [Login form](https://github.com/thdwlndjs/wantwear/blob/main/frontend/page/Login.jsx): `frontend/page/Login.jsx`
- [Sign-up form](https://github.com/thdwlndjs/wantwear/blob/main/frontend/page/Signin.jsx): `frontend/page/Signin.jsx`
- [Category navigation](https://github.com/thdwlndjs/wantwear/blob/main/frontend/page/Navbar.jsx): `frontend/page/Navbar.jsx`
- [Collection manager](https://github.com/thdwlndjs/wantwear/blob/main/frontend/page/Home.jsx): `frontend/page/Home.jsx`
- [Auth API client](https://github.com/thdwlndjs/wantwear/blob/main/frontend/api/authApi.js): `frontend/api/authApi.js`
- [Product card](https://github.com/thdwlndjs/wantwear/blob/main/frontend/components/ProductCard.jsx): `frontend/components/ProductCard.jsx`

### Backend services

- [Authentication endpoints](https://github.com/thdwlndjs/wantwear/blob/main/backend/src/main/java/com/example/springboot/controller/AuthController.java): `backend/src/main/java/com/example/springboot/controller/AuthController.java`
- [Authentication service](https://github.com/thdwlndjs/wantwear/blob/main/backend/src/main/java/com/example/springboot/service/AuthService.java): `backend/src/main/java/com/example/springboot/service/AuthService.java`
- [JWT security](https://github.com/thdwlndjs/wantwear/blob/main/backend/src/main/java/com/example/springboot/config/SecurityConfig.java): `backend/src/main/java/com/example/springboot/config/SecurityConfig.java`
- [JWT provider](https://github.com/thdwlndjs/wantwear/blob/main/backend/src/main/java/com/example/springboot/config/JwtProvider.java): `backend/src/main/java/com/example/springboot/config/JwtProvider.java`
- [Product endpoints](https://github.com/thdwlndjs/wantwear/blob/main/backend/src/main/java/com/example/springboot/controller/ProductController.java): `backend/src/main/java/com/example/springboot/controller/ProductController.java`
- [Product service](https://github.com/thdwlndjs/wantwear/blob/main/backend/src/main/java/com/example/springboot/service/ProductService.java): `backend/src/main/java/com/example/springboot/service/ProductService.java`
- [Preview endpoint](https://github.com/thdwlndjs/wantwear/blob/main/backend/src/main/java/com/example/springboot/controller/PreviewController.java): `backend/src/main/java/com/example/springboot/controller/PreviewController.java`
- [Sold-out endpoint](https://github.com/thdwlndjs/wantwear/blob/main/backend/src/main/java/com/example/springboot/controller/SoldOutController.java): `backend/src/main/java/com/example/springboot/controller/SoldOutController.java`
- [Sold-out checker](https://github.com/thdwlndjs/wantwear/blob/main/backend/src/main/java/com/example/springboot/service/SoldOutChecker.java): `backend/src/main/java/com/example/springboot/service/SoldOutChecker.java`
- [Preview proxy](https://github.com/thdwlndjs/wantwear/blob/main/server/server.js): `server/server.js`

### Persistence

- [Product repository](https://github.com/thdwlndjs/wantwear/blob/main/backend/src/main/java/com/example/springboot/repository/ProductRepository.java): `backend/src/main/java/com/example/springboot/repository/ProductRepository.java`
- [Product records](https://github.com/thdwlndjs/wantwear/blob/main/backend/src/main/java/com/example/springboot/entity/ProductEntity.java): `backend/src/main/java/com/example/springboot/entity/ProductEntity.java`
- [Application database](https://github.com/thdwlndjs/wantwear/blob/main/backend/src/main/resources/db/migration/V1__init_schema.sql): `backend/src/main/resources/db/migration/V1__init_schema.sql`

### Notifications

- [Notification scheduler](https://github.com/thdwlndjs/wantwear/blob/main/backend/src/main/java/com/example/springboot/scheduler/NotificationScheduler.java): `backend/src/main/java/com/example/springboot/scheduler/NotificationScheduler.java`
- [Web push service](https://github.com/thdwlndjs/wantwear/blob/main/backend/src/main/java/com/example/springboot/service/WebPushService.java): `backend/src/main/java/com/example/springboot/service/WebPushService.java`

### Other components

- **User**
- **Product websites**

## Connections

- App bootstrap → App routing: renders (evidence: `frontend/main.jsx`)
- App routing → Login menu: routes (evidence: `frontend/App.jsx`)
- App routing → Category navigation: routes (evidence: `frontend/App.jsx`)
- App routing → Collection manager: routes (evidence: `frontend/App.jsx`)
- Login menu → Login form: renders (evidence: `frontend/page/FirstNav.jsx`)
- Login menu → Sign-up form: renders (evidence: `frontend/page/FirstNav.jsx`)
- Login form → Auth API client: calls (evidence: `frontend/page/Login.jsx`)
- Category navigation → Auth API client: calls (evidence: `frontend/page/Navbar.jsx`)
- User → App bootstrap: opens
- Login form → Authentication endpoints: authenticates
- Sign-up form → Authentication endpoints: registers
- Auth API client → Authentication endpoints: requests
- Authentication endpoints → Authentication service: delegates
- JWT security → JWT provider: uses
- Collection manager → Product endpoints: loads, adds, deletes
- Collection manager → Preview endpoint: requests preview
- Collection manager → Sold-out endpoint: checks stock
- Product endpoints → Product service: delegates
- Product service → Product repository: uses
- Product repository → Product records: persists
- Product records → Application database: stored in
- Sold-out endpoint → Sold-out checker: delegates
- Notification scheduler → Web push service: schedules
- Collection manager → Product card: displays products
- Preview proxy → Product websites: fetches page (evidence: `server/server.js`)
