# alchemistofweb/wishlists_frontend architecture

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

- Interactive diagram: https://gitdiagram.com/alchemistofweb/wishlists_frontend
- Repository: https://github.com/alchemistofweb/wishlists_frontend

## Overview

1. **Overall shape**
   - This repository is a **frontend-only React SPA** for a wishlist/friends app.
   - The architecture is centered in `frontend/src`, with a thin separation between **routing/layout**, **domain pages**, **shared UI components**, and a **REST API client layer**.

2. **Runtime and build**
   - The app uses **Vite + TypeScript + React**.
   - Key entry/build files are `frontend/src/main.tsx`, `frontend/index.html`, `frontend/vite.config.ts`, and `frontend/package.json`.
   - Deployment/local run is containerized via `docker-compose.frontend.yml` and `frontend/Dockerfile`, or run directly with `npm run dev`.

3. **Application bootstrap**
   - `frontend/src/main.tsx` is the entry point that mounts the React tree.
   - `frontend/src/App.tsx` appears to assemble the top-level application shell, likely wiring providers and the router.

4. **Routing and access control**
   - Route definitions are centralized in `frontend/src/router/router.tsx`.
   - Auth-protected navigation is handled by `frontend/src/components/ProtectedRoute.tsx`.
   - The route map is domain-oriented: auth pages under `frontend/src/pages/auth/`, wishlist pages under `frontend/src/pages/wishlist/`, plus general app pages like `DashboardPage.tsx`, `FriendsPage.tsx`, `ProfilePage.tsx`, and `EventsPage.tsx`.

5. **Layout and shared shell**
   - `frontend/src/layouts/MainLayout.tsx` defines the common authenticated app frame.
   - Shared navigation is in `frontend/src/components/Navbar.tsx`.
   - This suggests a split between public auth screens and an authenticated layout with persistent chrome.

6. **Auth subsystem**
   - Authentication state is encapsulated in `frontend/src/auth/AuthProvider.tsx`.
   - Utility logic for auth/token handling lives in `frontend/src/utils/auth.ts` and `frontend/src/utils/token.ts`.
   - Public auth screens are `frontend/src/pages/auth/SignInPage.tsx` and `frontend/src/pages/auth/SignUpPage.tsx`.
   - The app likely stores tokens locally and uses the auth provider to gate protected routes and populate request headers.

7. **API boundary**
   - All server interaction is isolated under `frontend/src/api/`.
   - `client.ts` is the shared HTTP client wrapper; feature modules such as `auth.ts`, `users.ts`, `friends.ts`, `tags.ts`, `wishlist.ts`, and `wishlistItems.ts` provide domain-specific requests.
   - This creates a clear boundary: UI components/pages do not talk to the backend directly, but through typed API modules.

8. **Wishlist domain**
   - The wishlist feature is the most componentized area.
   - Pages are grouped under `frontend/src/pages/wishlist/`: `WishlistPage.tsx`, `WishlistListPage.tsx`, and `FriendWishlistPage.tsx`.
   - Reusable UI pieces live in `frontend/src/components/wishlist/`, including `WishlistItemsGrid.tsx`, `WishlistItemCard.tsx`, `WishlistItemForm.tsx`, and `WishlistEditModal.tsx`.
   - Data types for this domain are defined in `frontend/src/types/wishlist.ts` and `frontend/src/types/wishlistItem.ts`.

9. **Other domain pages**
   - Friends-related UI is in `frontend/src/pages/FriendsPage.tsx` and likely backed by `frontend/src/api/friends.ts` and `frontend/src/types/friend.ts`.
   - User/profile views are in `frontend/src/pages/ProfilePage.tsx` and `frontend/src/pages/UserProfilePage.tsx`, with `frontend/src/api/users.ts` and `frontend/src/types/user.ts`.
   - `frontend/src/pages/DashboardPage.tsx` and `frontend/src/pages/EventsPage.tsx` serve as higher-level app views.

10. **Shared types, constants, and UI rules**
   - Types are organized by domain in `frontend/src/types/`.
   - App-wide constants live in `frontend/src/constants/` (`api.ts`, `http.ts`, `routes.ts`, `storage.ts`, `ui.ts`), which keeps route paths, API base settings, storage keys, and UI values out of components.
   - This matches the repo rule of avoiding magic numbers/strings in feature code.

11. **Data flow**
   - The typical flow is: **route → page → domain component → API module → backend REST service**.
   - Authentication adds a cross-cutting flow: **sign-in/sign-up → token storage → AuthProvider state → ProtectedRoute/MainLayout → authenticated API calls**.
   - Wishlist editing likely follows the same pattern via modal/form components that submit through `api/wishlistItems.ts` or `api/wishlist.ts`.

12. **Project boundaries**
   - The repository contains only the frontend layer; the backend is external to what’s shown here.
   - The architecture is intentionally modular within the UI: pages are route-level orchestration, components are reusable presentation blocks, api modules isolate transport, and types/constants keep contracts explicit.

Main entry points: [`frontend/src/api/client.ts`](https://github.com/alchemistofweb/wishlists_frontend/blob/main/frontend/src/api/client.ts) (HTTP client), [`frontend/src/api/users.ts`](https://github.com/alchemistofweb/wishlists_frontend/blob/main/frontend/src/api/users.ts) (users API), [`frontend/src/api/auth.ts`](https://github.com/alchemistofweb/wishlists_frontend/blob/main/frontend/src/api/auth.ts) (auth API), [`frontend/src/api/wishlist.ts`](https://github.com/alchemistofweb/wishlists_frontend/blob/main/frontend/src/api/wishlist.ts) (wishlist API)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_grp_root["Frontend app"]
end

subgraph group_grp_shell["Shell & auth"]
  node_n_main(("main.tsx<br/>bootstrap entry<br/>[main.tsx]"))
  node_n_app["App shell<br/>app composition<br/>[App.tsx]"]
  node_n_router["Router<br/>route map<br/>[router.tsx]"]
  node_n_protected{{"Protected route<br/>auth guard<br/>[ProtectedRoute.tsx]"}}
  node_n_layout["Main layout<br/>authenticated shell<br/>[MainLayout.tsx]"]
  node_n_navbar["Navbar<br/>navigation chrome<br/>[Navbar.tsx]"]
  node_n_auth_provider["AuthProvider<br/>auth state<br/>[AuthProvider.tsx]"]
end

subgraph group_grp_pages["Pages"]
  node_n_signin["Sign in<br/>auth page<br/>[SignInPage.tsx]"]
  node_n_signup["Sign up<br/>auth page<br/>[SignUpPage.tsx]"]
  node_n_dashboard["Dashboard<br/>app page<br/>[DashboardPage.tsx]"]
  node_n_friends["Friends<br/>app page<br/>[FriendsPage.tsx]"]
  node_n_profile["Profile<br/>app page<br/>[ProfilePage.tsx]"]
  node_n_user_profile["User profile<br/>app page"]
  node_n_events["Events<br/>app page<br/>[EventsPage.tsx]"]
  node_n_wishlist_page["Wishlist<br/>domain page<br/>[WishlistPage.tsx]"]
  node_n_wishlist_list["Lists<br/>domain page"]
  node_n_friend_wishlist["Friend wishlist<br/>domain page"]
end

subgraph group_grp_wishlist_ui["Wishlist UI"]
  node_n_grid["Items grid<br/>wishlist component"]
  node_n_card["Item card<br/>wishlist component"]
  node_n_form["Item form<br/>wishlist component"]
  node_n_modal["Edit modal<br/>wishlist component"]
end

subgraph group_grp_api["API layer"]
  node_n_client["HTTP client<br/>api wrapper<br/>[client.ts]"]
  node_n_api_auth["auth API<br/>api module<br/>[auth.ts]"]
  node_n_api_users["users API<br/>api module<br/>[users.ts]"]
  node_n_api_friends["friends API<br/>api module<br/>[friends.ts]"]
  node_n_api_tags["tags API<br/>api module<br/>[tags.ts]"]
  node_n_api_wishlist["wishlist API<br/>api module<br/>[wishlist.ts]"]
  node_n_api_items["items API<br/>api module<br/>[wishlistItems.ts]"]
end

subgraph group_grp_models["Shared contracts"]
  node_n_types_auth["auth types<br/>domain types<br/>[auth.ts]"]
  node_n_types_user["user types<br/>domain types<br/>[user.ts]"]
  node_n_types_friend["friend types<br/>domain types<br/>[friend.ts]"]
  node_n_types_wishlist["wishlist types<br/>domain types<br/>[wishlist.ts]"]
  node_n_types_item["item types<br/>domain types<br/>[wishlistItem.ts]"]
  node_n_utils_auth["auth utils<br/>token/session helpers<br/>[auth.ts]"]
end

node_n_main -->|"renders"| node_n_app
node_n_app -->|"uses"| node_n_router
node_n_router -->|"guards"| node_n_protected
node_n_router -->|"wraps"| node_n_layout
node_n_layout -->|"contains"| node_n_navbar
node_n_app -->|"provides"| node_n_auth_provider
node_n_signin -->|"calls"| node_n_api_auth
node_n_signup -->|"calls"| node_n_api_auth
node_n_api_auth -->|"built on"| node_n_client
node_n_api_users -->|"built on"| node_n_client
node_n_api_friends -->|"built on"| node_n_client
node_n_api_tags -->|"built on"| node_n_client
node_n_api_wishlist -->|"built on"| node_n_client
node_n_api_items -->|"built on"| node_n_client
node_n_auth_provider -->|"uses"| node_n_utils_auth
node_n_auth_provider -->|"models"| node_n_types_auth
node_n_wishlist_page -->|"composes"| node_n_grid
node_n_wishlist_page -->|"uses"| node_n_modal
node_n_grid -->|"contains"| node_n_card
node_n_modal -->|"contains"| node_n_form
node_n_form -->|"submits to"| node_n_api_items
node_n_friend_wishlist -->|"loads"| node_n_api_wishlist
node_n_wishlist_list -->|"loads"| node_n_api_wishlist
node_n_friends -->|"loads"| node_n_api_friends
node_n_profile -->|"loads"| node_n_api_users
node_n_user_profile -->|"loads"| node_n_api_users
node_n_dashboard -.->|"aggregates"| node_n_api_users
node_n_events -.->|"relates to"| node_n_api_tags
node_n_api_wishlist -->|"uses"| node_n_types_wishlist
node_n_api_items -->|"uses"| node_n_types_item
node_n_api_users -->|"uses"| node_n_types_user
node_n_api_friends -->|"uses"| node_n_types_friend
node_n_api_auth -->|"uses"| node_n_types_auth

click node_n_main "https://github.com/alchemistofweb/wishlists_frontend/blob/main/frontend/src/main.tsx"
click node_n_app "https://github.com/alchemistofweb/wishlists_frontend/blob/main/frontend/src/App.tsx"
click node_n_router "https://github.com/alchemistofweb/wishlists_frontend/blob/main/frontend/src/router/router.tsx"
click node_n_protected "https://github.com/alchemistofweb/wishlists_frontend/blob/main/frontend/src/components/ProtectedRoute.tsx"
click node_n_layout "https://github.com/alchemistofweb/wishlists_frontend/blob/main/frontend/src/layouts/MainLayout.tsx"
click node_n_navbar "https://github.com/alchemistofweb/wishlists_frontend/blob/main/frontend/src/components/Navbar.tsx"
click node_n_auth_provider "https://github.com/alchemistofweb/wishlists_frontend/blob/main/frontend/src/auth/AuthProvider.tsx"
click node_n_signin "https://github.com/alchemistofweb/wishlists_frontend/blob/main/frontend/src/pages/auth/SignInPage.tsx"
click node_n_signup "https://github.com/alchemistofweb/wishlists_frontend/blob/main/frontend/src/pages/auth/SignUpPage.tsx"
click node_n_dashboard "https://github.com/alchemistofweb/wishlists_frontend/blob/main/frontend/src/pages/DashboardPage.tsx"
click node_n_friends "https://github.com/alchemistofweb/wishlists_frontend/blob/main/frontend/src/pages/FriendsPage.tsx"
click node_n_profile "https://github.com/alchemistofweb/wishlists_frontend/blob/main/frontend/src/pages/ProfilePage.tsx"
click node_n_user_profile "https://github.com/alchemistofweb/wishlists_frontend/blob/main/frontend/src/pages/UserProfilePage.tsx"
click node_n_events "https://github.com/alchemistofweb/wishlists_frontend/blob/main/frontend/src/pages/EventsPage.tsx"
click node_n_wishlist_page "https://github.com/alchemistofweb/wishlists_frontend/blob/main/frontend/src/pages/wishlist/WishlistPage.tsx"
click node_n_wishlist_list "https://github.com/alchemistofweb/wishlists_frontend/blob/main/frontend/src/pages/wishlist/WishlistListPage.tsx"
click node_n_friend_wishlist "https://github.com/alchemistofweb/wishlists_frontend/blob/main/frontend/src/pages/wishlist/FriendWishlistPage.tsx"
click node_n_grid "https://github.com/alchemistofweb/wishlists_frontend/blob/main/frontend/src/components/wishlist/WishlistItemsGrid.tsx"
click node_n_card "https://github.com/alchemistofweb/wishlists_frontend/blob/main/frontend/src/components/wishlist/WishlistItemCard.tsx"
click node_n_form "https://github.com/alchemistofweb/wishlists_frontend/blob/main/frontend/src/components/wishlist/WishlistItemForm.tsx"
click node_n_modal "https://github.com/alchemistofweb/wishlists_frontend/blob/main/frontend/src/components/wishlist/WishlistEditModal.tsx"
click node_n_client "https://github.com/alchemistofweb/wishlists_frontend/blob/main/frontend/src/api/client.ts"
click node_n_api_auth "https://github.com/alchemistofweb/wishlists_frontend/blob/main/frontend/src/api/auth.ts"
click node_n_api_users "https://github.com/alchemistofweb/wishlists_frontend/blob/main/frontend/src/api/users.ts"
click node_n_api_friends "https://github.com/alchemistofweb/wishlists_frontend/blob/main/frontend/src/api/friends.ts"
click node_n_api_tags "https://github.com/alchemistofweb/wishlists_frontend/blob/main/frontend/src/api/tags.ts"
click node_n_api_wishlist "https://github.com/alchemistofweb/wishlists_frontend/blob/main/frontend/src/api/wishlist.ts"
click node_n_api_items "https://github.com/alchemistofweb/wishlists_frontend/blob/main/frontend/src/api/wishlistItems.ts"
click node_n_types_auth "https://github.com/alchemistofweb/wishlists_frontend/blob/main/frontend/src/types/auth.ts"
click node_n_types_user "https://github.com/alchemistofweb/wishlists_frontend/blob/main/frontend/src/types/user.ts"
click node_n_types_friend "https://github.com/alchemistofweb/wishlists_frontend/blob/main/frontend/src/types/friend.ts"
click node_n_types_wishlist "https://github.com/alchemistofweb/wishlists_frontend/blob/main/frontend/src/types/wishlist.ts"
click node_n_types_item "https://github.com/alchemistofweb/wishlists_frontend/blob/main/frontend/src/types/wishlistItem.ts"
click node_n_utils_auth "https://github.com/alchemistofweb/wishlists_frontend/blob/main/frontend/src/utils/auth.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_n_main,node_n_app,node_n_router,node_n_protected,node_n_layout,node_n_navbar,node_n_auth_provider toneAmber
class node_n_signin,node_n_signup,node_n_dashboard,node_n_friends,node_n_profile,node_n_user_profile,node_n_events,node_n_wishlist_page,node_n_wishlist_list,node_n_friend_wishlist toneMint
class node_n_grid,node_n_card,node_n_form,node_n_modal toneRose
class node_n_client,node_n_api_auth,node_n_api_users,node_n_api_friends,node_n_api_tags,node_n_api_wishlist,node_n_api_items toneIndigo
class node_n_types_auth,node_n_types_user,node_n_types_friend,node_n_types_wishlist,node_n_types_item,node_n_utils_auth toneTeal
```

## Components

### Shell & auth

Application bootstrap, routing, layout, and route protection.

- [main.tsx](https://github.com/alchemistofweb/wishlists_frontend/blob/main/frontend/src/main.tsx): bootstrap entry · Mounts the React application. · `frontend/src/main.tsx`
- [App shell](https://github.com/alchemistofweb/wishlists_frontend/blob/main/frontend/src/App.tsx): app composition · Assembles top-level providers and routing. · `frontend/src/App.tsx`
- [Router](https://github.com/alchemistofweb/wishlists_frontend/blob/main/frontend/src/router/router.tsx): route map · Central route definitions for public and protected screens. · `frontend/src/router/router.tsx`
- [Protected route](https://github.com/alchemistofweb/wishlists_frontend/blob/main/frontend/src/components/ProtectedRoute.tsx): auth guard · Blocks unauthenticated access to private areas. · `frontend/src/components/ProtectedRoute.tsx`
- [Main layout](https://github.com/alchemistofweb/wishlists_frontend/blob/main/frontend/src/layouts/MainLayout.tsx): authenticated shell · Shared frame for signed-in views. · `frontend/src/layouts/MainLayout.tsx`
- [Navbar](https://github.com/alchemistofweb/wishlists_frontend/blob/main/frontend/src/components/Navbar.tsx): navigation chrome · Persistent top-level navigation for the app. · `frontend/src/components/Navbar.tsx`
- [AuthProvider](https://github.com/alchemistofweb/wishlists_frontend/blob/main/frontend/src/auth/AuthProvider.tsx): auth state · Holds session/authentication state for the UI. · `frontend/src/auth/AuthProvider.tsx`

### Pages

Route-level screens organized by domain.

- [Sign in](https://github.com/alchemistofweb/wishlists_frontend/blob/main/frontend/src/pages/auth/SignInPage.tsx): auth page · User login screen. · `frontend/src/pages/auth/SignInPage.tsx`
- [Sign up](https://github.com/alchemistofweb/wishlists_frontend/blob/main/frontend/src/pages/auth/SignUpPage.tsx): auth page · User registration screen. · `frontend/src/pages/auth/SignUpPage.tsx`
- [Dashboard](https://github.com/alchemistofweb/wishlists_frontend/blob/main/frontend/src/pages/DashboardPage.tsx): app page · High-level landing page after authentication. · `frontend/src/pages/DashboardPage.tsx`
- [Friends](https://github.com/alchemistofweb/wishlists_frontend/blob/main/frontend/src/pages/FriendsPage.tsx): app page · Friends overview and related actions. · `frontend/src/pages/FriendsPage.tsx`
- [Profile](https://github.com/alchemistofweb/wishlists_frontend/blob/main/frontend/src/pages/ProfilePage.tsx): app page · Signed-in user profile view. · `frontend/src/pages/ProfilePage.tsx`
- [User profile](https://github.com/alchemistofweb/wishlists_frontend/blob/main/frontend/src/pages/UserProfilePage.tsx): app page · Other-user profile view. · `frontend/src/pages/UserProfilePage.tsx`
- [Events](https://github.com/alchemistofweb/wishlists_frontend/blob/main/frontend/src/pages/EventsPage.tsx): app page · Events or activity-oriented app view. · `frontend/src/pages/EventsPage.tsx`
- [Wishlist](https://github.com/alchemistofweb/wishlists_frontend/blob/main/frontend/src/pages/wishlist/WishlistPage.tsx): domain page · Primary wishlist view. · `frontend/src/pages/wishlist/WishlistPage.tsx`
- [Lists](https://github.com/alchemistofweb/wishlists_frontend/blob/main/frontend/src/pages/wishlist/WishlistListPage.tsx): domain page · Wishlist list management view. · `frontend/src/pages/wishlist/WishlistListPage.tsx`
- [Friend wishlist](https://github.com/alchemistofweb/wishlists_frontend/blob/main/frontend/src/pages/wishlist/FriendWishlistPage.tsx): domain page · Wishlist view for a friend or other user. · `frontend/src/pages/wishlist/FriendWishlistPage.tsx`

### Wishlist UI

Reusable wishlist components used by wishlist pages.

- [Items grid](https://github.com/alchemistofweb/wishlists_frontend/blob/main/frontend/src/components/wishlist/WishlistItemsGrid.tsx): wishlist component · Displays wishlist items in a grid layout. · `frontend/src/components/wishlist/WishlistItemsGrid.tsx`
- [Item card](https://github.com/alchemistofweb/wishlists_frontend/blob/main/frontend/src/components/wishlist/WishlistItemCard.tsx): wishlist component · Renders a single wishlist item. · `frontend/src/components/wishlist/WishlistItemCard.tsx`
- [Item form](https://github.com/alchemistofweb/wishlists_frontend/blob/main/frontend/src/components/wishlist/WishlistItemForm.tsx): wishlist component · Creates or edits a wishlist item. · `frontend/src/components/wishlist/WishlistItemForm.tsx`
- [Edit modal](https://github.com/alchemistofweb/wishlists_frontend/blob/main/frontend/src/components/wishlist/WishlistEditModal.tsx): wishlist component · Modal wrapper for wishlist item editing. · `frontend/src/components/wishlist/WishlistEditModal.tsx`

### API layer

REST client wrapper and feature API modules.

- [HTTP client](https://github.com/alchemistofweb/wishlists_frontend/blob/main/frontend/src/api/client.ts): api wrapper · Shared REST client and request configuration. · `frontend/src/api/client.ts`
- [auth API](https://github.com/alchemistofweb/wishlists_frontend/blob/main/frontend/src/api/auth.ts): api module · Login and registration requests. · `frontend/src/api/auth.ts`
- [users API](https://github.com/alchemistofweb/wishlists_frontend/blob/main/frontend/src/api/users.ts): api module · User profile and user lookup requests. · `frontend/src/api/users.ts`
- [friends API](https://github.com/alchemistofweb/wishlists_frontend/blob/main/frontend/src/api/friends.ts): api module · Friend-related requests. · `frontend/src/api/friends.ts`
- [tags API](https://github.com/alchemistofweb/wishlists_frontend/blob/main/frontend/src/api/tags.ts): api module · Tag-related requests. · `frontend/src/api/tags.ts`
- [wishlist API](https://github.com/alchemistofweb/wishlists_frontend/blob/main/frontend/src/api/wishlist.ts): api module · Wishlist collection requests. · `frontend/src/api/wishlist.ts`
- [items API](https://github.com/alchemistofweb/wishlists_frontend/blob/main/frontend/src/api/wishlistItems.ts): api module · Wishlist item CRUD requests. · `frontend/src/api/wishlistItems.ts`

### Shared contracts

Domain types, constants, and auth/token helpers.

- [auth types](https://github.com/alchemistofweb/wishlists_frontend/blob/main/frontend/src/types/auth.ts): domain types · Authentication data contracts. · `frontend/src/types/auth.ts`
- [user types](https://github.com/alchemistofweb/wishlists_frontend/blob/main/frontend/src/types/user.ts): domain types · User data contracts. · `frontend/src/types/user.ts`
- [friend types](https://github.com/alchemistofweb/wishlists_frontend/blob/main/frontend/src/types/friend.ts): domain types · Friend data contracts. · `frontend/src/types/friend.ts`
- [wishlist types](https://github.com/alchemistofweb/wishlists_frontend/blob/main/frontend/src/types/wishlist.ts): domain types · Wishlist data contracts. · `frontend/src/types/wishlist.ts`
- [item types](https://github.com/alchemistofweb/wishlists_frontend/blob/main/frontend/src/types/wishlistItem.ts): domain types · Wishlist item data contracts. · `frontend/src/types/wishlistItem.ts`
- [auth utils](https://github.com/alchemistofweb/wishlists_frontend/blob/main/frontend/src/utils/auth.ts): token/session helpers · Helpers for auth state and token handling. · `frontend/src/utils/auth.ts`

## Connections

- main.tsx → App shell: renders · Application entry mounts the app shell.
- App shell → Router: uses · App shell delegates navigation to the router.
- Router → Protected route: guards · Protected routes require authentication.
- Router → Main layout: wraps · Signed-in routes use the authenticated layout.
- Main layout → Navbar: contains · Layout keeps shared navigation visible.
- App shell → AuthProvider: provides · Auth provider supplies session state to the tree.
- Sign in → auth API: calls · Login screen submits credentials via auth API.
- Sign up → auth API: calls · Registration screen uses auth API.
- auth API → HTTP client: built on · Auth requests use the shared HTTP client.
- users API → HTTP client: built on · User requests use the shared HTTP client.
- friends API → HTTP client: built on · Friend requests use the shared HTTP client.
- tags API → HTTP client: built on · Tag requests use the shared HTTP client.
- wishlist API → HTTP client: built on · Wishlist requests use the shared HTTP client.
- items API → HTTP client: built on · Wishlist item requests use the shared HTTP client.
- AuthProvider → auth utils: uses · Auth provider depends on token/session helpers.
- AuthProvider → auth types: models · Auth state follows auth data contracts.
- Wishlist → Items grid: composes · Primary wishlist page renders item grid UI.
- Wishlist → Edit modal: uses · Edit flow opens the wishlist edit modal.
- Items grid → Item card: contains · Grid arranges individual item cards.
- Edit modal → Item form: contains · Edit modal hosts the item form.
- Item form → items API: submits to · Form persists changes through item API.
- Friend wishlist → wishlist API: loads · Friend wishlist view fetches wishlist data.
- Lists → wishlist API: loads · Wishlist list page queries wishlist collections.
- Friends → friends API: loads · Friends page retrieves friend data.
- Profile → users API: loads · Profile page fetches user data.
- User profile → users API: loads · Other-user profile page fetches user data.
- Dashboard → users API: aggregates · Dashboard likely combines user-related summary data.
- Events → tags API: relates to · Events view may filter or organize by tags.
- wishlist API → wishlist types: uses · Wishlist API is typed by wishlist contracts.
- items API → item types: uses · Item API is typed by item contracts.
- users API → user types: uses · User API is typed by user contracts.
- friends API → friend types: uses · Friend API is typed by friend contracts.
- auth API → auth types: uses · Auth API uses auth contracts.
