# antonny890/libreria-universal architecture

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

- Interactive diagram: https://gitdiagram.com/antonny890/libreria-universal
- Repository: https://github.com/antonny890/libreria-universal

## Overview

Librería Universal is a Spanish-language bookstore storefront with an administrative catalog view. The user workflow runs from browsing and filtering books, through book details and a cart, to sign-in and checkout; readers can also review their profile and orders. Administrators manage inventory and categories. Shared library state coordinates these views, backed by sample catalog data and browser-local user state. The graph reflects documented imports and the sampled state behavior; unsampled checkout and catalog internals are not inferred.

Main entry points: [`src/App.tsx`](https://github.com/antonny890/libreria-universal/blob/main/src/App.tsx) (App Shell), [`src/context/LibraryContext.tsx`](https://github.com/antonny890/libreria-universal/blob/main/src/context/LibraryContext.tsx) (Library State), [`src/components/BookCover.tsx`](https://github.com/antonny890/libreria-universal/blob/main/src/components/BookCover.tsx) (Book Cover), [`src/components/CatalogSection.tsx`](https://github.com/antonny890/libreria-universal/blob/main/src/components/CatalogSection.tsx) (Catalog)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_storefront["Storefront"]
  node_app["App Shell<br/>[App.tsx]"]
  node_hero["Hero<br/>[HeroSection.tsx]"]
  node_featured["Featured Books"]
  node_catalog["Catalog<br/>[CatalogSection.tsx]"]
  node_filters["Catalog Filters<br/>[SidebarFilters.tsx]"]
  node_bookcard["Book Card<br/>[BookCard.tsx]"]
  node_cover["Book Cover<br/>[BookCover.tsx]"]
  node_detail["Book Details"]
  node_navbar["Navigation<br/>[Navbar.tsx]"]
  node_faq["FAQ<br/>[FAQModal.tsx]"]
  node_terms["Terms<br/>[TermsModal.tsx]"]
  node_footer["Footer<br/>[Footer.tsx]"]
end

subgraph group_purchase["Reader and Orders"]
  node_cart["Cart Drawer<br/>[CartDrawer.tsx]"]
  node_checkout["Checkout<br/>[CheckoutModal.tsx]"]
  node_auth["Sign-in<br/>[AuthModal.tsx]"]
  node_profile["Reader Profile"]
end

subgraph group_admin["Catalog Administration"]
  node_admin["Admin Dashboard<br/>[AdminDashboard.tsx]"]
  node_bookform["Book Editor<br/>[BookFormModal.tsx]"]
end

subgraph group_shared["Shared State and Data"]
  node_library["Library State<br/>[LibraryContext.tsx]"]
  node_mockdata["Sample Catalog<br/>[mockData.ts]"]
  node_toast["Notifications<br/>[ToastContainer.tsx]"]
end

node_visitor(("Reader"))
node_browserstorage[("Browser Storage")]

node_visitor -->|"uses"| node_app
node_app -->|"provides state"| node_library
node_app -->|"renders"| node_navbar
node_app -->|"renders"| node_hero
node_app -->|"renders"| node_featured
node_app -->|"renders"| node_catalog
node_app -->|"renders"| node_admin
node_app -->|"renders"| node_cart
node_app -->|"renders"| node_checkout
node_app -->|"renders"| node_detail
node_app -->|"renders"| node_bookform
node_app -->|"renders"| node_profile
node_app -->|"renders"| node_auth
node_app -->|"renders"| node_faq
node_app -->|"renders"| node_terms
node_app -->|"renders"| node_toast
node_app -->|"renders"| node_footer
node_hero -->|"reads state"| node_library
node_hero -->|"uses image data"| node_mockdata
node_featured -->|"reads state"| node_library
node_featured -->|"renders"| node_cover
node_catalog -->|"reads state"| node_library
node_catalog -->|"renders"| node_filters
node_catalog -->|"renders"| node_bookcard
node_filters -->|"reads state"| node_library
node_bookcard -->|"reads state"| node_library
node_bookcard -->|"renders"| node_cover
node_detail -->|"reads state"| node_library
node_cart -->|"reads state"| node_library
node_cart -->|"renders"| node_cover
node_checkout -->|"reads state"| node_library
node_auth -->|"signs in"| node_library
node_profile -->|"reads state"| node_library
node_admin -->|"manages catalog"| node_library
node_admin -->|"renders"| node_cover
node_bookform -->|"updates catalog"| node_library
node_bookform -->|"previews"| node_cover
node_library -->|"initializes from"| node_mockdata
node_library -->|"reads and writes"| node_browserstorage
node_faq -->|"reads state"| node_library
node_terms -->|"reads state"| node_library
node_toast -->|"reads state"| node_library
node_footer -->|"reads state"| node_library

click node_app "https://github.com/antonny890/libreria-universal/blob/main/src/App.tsx"
click node_hero "https://github.com/antonny890/libreria-universal/blob/main/src/components/HeroSection.tsx"
click node_featured "https://github.com/antonny890/libreria-universal/blob/main/src/components/FeaturedShowcase.tsx"
click node_catalog "https://github.com/antonny890/libreria-universal/blob/main/src/components/CatalogSection.tsx"
click node_filters "https://github.com/antonny890/libreria-universal/blob/main/src/components/SidebarFilters.tsx"
click node_bookcard "https://github.com/antonny890/libreria-universal/blob/main/src/components/BookCard.tsx"
click node_cover "https://github.com/antonny890/libreria-universal/blob/main/src/components/BookCover.tsx"
click node_detail "https://github.com/antonny890/libreria-universal/blob/main/src/components/BookDetailModal.tsx"
click node_navbar "https://github.com/antonny890/libreria-universal/blob/main/src/components/Navbar.tsx"
click node_cart "https://github.com/antonny890/libreria-universal/blob/main/src/components/CartDrawer.tsx"
click node_checkout "https://github.com/antonny890/libreria-universal/blob/main/src/components/CheckoutModal.tsx"
click node_auth "https://github.com/antonny890/libreria-universal/blob/main/src/components/AuthModal.tsx"
click node_profile "https://github.com/antonny890/libreria-universal/blob/main/src/components/UserProfileModal.tsx"
click node_admin "https://github.com/antonny890/libreria-universal/blob/main/src/components/AdminDashboard.tsx"
click node_bookform "https://github.com/antonny890/libreria-universal/blob/main/src/components/BookFormModal.tsx"
click node_library "https://github.com/antonny890/libreria-universal/blob/main/src/context/LibraryContext.tsx"
click node_mockdata "https://github.com/antonny890/libreria-universal/blob/main/src/data/mockData.ts"
click node_faq "https://github.com/antonny890/libreria-universal/blob/main/src/components/FAQModal.tsx"
click node_terms "https://github.com/antonny890/libreria-universal/blob/main/src/components/TermsModal.tsx"
click node_toast "https://github.com/antonny890/libreria-universal/blob/main/src/components/ToastContainer.tsx"
click node_footer "https://github.com/antonny890/libreria-universal/blob/main/src/components/Footer.tsx"

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_hero,node_featured,node_catalog,node_filters,node_bookcard,node_cover,node_detail,node_navbar,node_faq,node_terms,node_footer toneBlue
class node_cart,node_checkout,node_auth,node_profile,node_browserstorage toneAmber
class node_admin,node_bookform toneMint
class node_library,node_mockdata,node_toast toneRose
class node_visitor toneIndigo
```

## Components

### Storefront

- [App Shell](https://github.com/antonny890/libreria-universal/blob/main/src/App.tsx): `src/App.tsx`
- [Hero](https://github.com/antonny890/libreria-universal/blob/main/src/components/HeroSection.tsx): `src/components/HeroSection.tsx`
- [Featured Books](https://github.com/antonny890/libreria-universal/blob/main/src/components/FeaturedShowcase.tsx): `src/components/FeaturedShowcase.tsx`
- [Catalog](https://github.com/antonny890/libreria-universal/blob/main/src/components/CatalogSection.tsx): `src/components/CatalogSection.tsx`
- [Catalog Filters](https://github.com/antonny890/libreria-universal/blob/main/src/components/SidebarFilters.tsx): `src/components/SidebarFilters.tsx`
- [Book Card](https://github.com/antonny890/libreria-universal/blob/main/src/components/BookCard.tsx): `src/components/BookCard.tsx`
- [Book Cover](https://github.com/antonny890/libreria-universal/blob/main/src/components/BookCover.tsx): `src/components/BookCover.tsx`
- [Book Details](https://github.com/antonny890/libreria-universal/blob/main/src/components/BookDetailModal.tsx): `src/components/BookDetailModal.tsx`
- [Navigation](https://github.com/antonny890/libreria-universal/blob/main/src/components/Navbar.tsx): `src/components/Navbar.tsx`
- [FAQ](https://github.com/antonny890/libreria-universal/blob/main/src/components/FAQModal.tsx): `src/components/FAQModal.tsx`
- [Terms](https://github.com/antonny890/libreria-universal/blob/main/src/components/TermsModal.tsx): `src/components/TermsModal.tsx`
- [Footer](https://github.com/antonny890/libreria-universal/blob/main/src/components/Footer.tsx): `src/components/Footer.tsx`

### Reader and Orders

- [Cart Drawer](https://github.com/antonny890/libreria-universal/blob/main/src/components/CartDrawer.tsx): `src/components/CartDrawer.tsx`
- [Checkout](https://github.com/antonny890/libreria-universal/blob/main/src/components/CheckoutModal.tsx): `src/components/CheckoutModal.tsx`
- [Sign-in](https://github.com/antonny890/libreria-universal/blob/main/src/components/AuthModal.tsx): `src/components/AuthModal.tsx`
- [Reader Profile](https://github.com/antonny890/libreria-universal/blob/main/src/components/UserProfileModal.tsx): `src/components/UserProfileModal.tsx`

### Catalog Administration

- [Admin Dashboard](https://github.com/antonny890/libreria-universal/blob/main/src/components/AdminDashboard.tsx): `src/components/AdminDashboard.tsx`
- [Book Editor](https://github.com/antonny890/libreria-universal/blob/main/src/components/BookFormModal.tsx): `src/components/BookFormModal.tsx`

### Shared State and Data

- [Library State](https://github.com/antonny890/libreria-universal/blob/main/src/context/LibraryContext.tsx): `src/context/LibraryContext.tsx`
- [Sample Catalog](https://github.com/antonny890/libreria-universal/blob/main/src/data/mockData.ts): `src/data/mockData.ts`
- [Notifications](https://github.com/antonny890/libreria-universal/blob/main/src/components/ToastContainer.tsx): `src/components/ToastContainer.tsx`

### Other components

- **Reader**
- **Browser Storage**

## Connections

- Reader → App Shell: uses
- App Shell → Library State: provides state (evidence: `src/App.tsx`)
- App Shell → Navigation: renders (evidence: `src/App.tsx`)
- App Shell → Hero: renders (evidence: `src/App.tsx`)
- App Shell → Featured Books: renders (evidence: `src/App.tsx`)
- App Shell → Catalog: renders (evidence: `src/App.tsx`)
- App Shell → Admin Dashboard: renders (evidence: `src/App.tsx`)
- App Shell → Cart Drawer: renders (evidence: `src/App.tsx`)
- App Shell → Checkout: renders (evidence: `src/App.tsx`)
- App Shell → Book Details: renders (evidence: `src/App.tsx`)
- App Shell → Book Editor: renders (evidence: `src/App.tsx`)
- App Shell → Reader Profile: renders (evidence: `src/App.tsx`)
- App Shell → Sign-in: renders (evidence: `src/App.tsx`)
- App Shell → FAQ: renders (evidence: `src/App.tsx`)
- App Shell → Terms: renders (evidence: `src/App.tsx`)
- App Shell → Notifications: renders (evidence: `src/App.tsx`)
- App Shell → Footer: renders (evidence: `src/App.tsx`)
- Hero → Library State: reads state (evidence: `src/components/HeroSection.tsx`)
- Hero → Sample Catalog: uses image data (evidence: `src/components/HeroSection.tsx`)
- Featured Books → Library State: reads state (evidence: `src/components/FeaturedShowcase.tsx`)
- Featured Books → Book Cover: renders (evidence: `src/components/FeaturedShowcase.tsx`)
- Catalog → Library State: reads state (evidence: `src/components/CatalogSection.tsx`)
- Catalog → Catalog Filters: renders (evidence: `src/components/CatalogSection.tsx`)
- Catalog → Book Card: renders (evidence: `src/components/CatalogSection.tsx`)
- Catalog Filters → Library State: reads state (evidence: `src/components/SidebarFilters.tsx`)
- Book Card → Library State: reads state (evidence: `src/components/BookCard.tsx`)
- Book Card → Book Cover: renders (evidence: `src/components/BookCard.tsx`)
- Book Details → Library State: reads state (evidence: `src/components/BookDetailModal.tsx`)
- Cart Drawer → Library State: reads state (evidence: `src/components/CartDrawer.tsx`)
- Cart Drawer → Book Cover: renders (evidence: `src/components/CartDrawer.tsx`)
- Checkout → Library State: reads state (evidence: `src/components/CheckoutModal.tsx`)
- Sign-in → Library State: signs in (evidence: `src/components/AuthModal.tsx`)
- Reader Profile → Library State: reads state (evidence: `src/components/UserProfileModal.tsx`)
- Admin Dashboard → Library State: manages catalog (evidence: `src/components/AdminDashboard.tsx`)
- Admin Dashboard → Book Cover: renders (evidence: `src/components/AdminDashboard.tsx`)
- Book Editor → Library State: updates catalog (evidence: `src/components/BookFormModal.tsx`)
- Book Editor → Book Cover: previews (evidence: `src/components/BookFormModal.tsx`)
- Library State → Sample Catalog: initializes from (evidence: `src/context/LibraryContext.tsx`)
- Library State → Browser Storage: reads and writes (evidence: `src/context/LibraryContext.tsx`)
- FAQ → Library State: reads state (evidence: `src/components/FAQModal.tsx`)
- Terms → Library State: reads state (evidence: `src/components/TermsModal.tsx`)
- Notifications → Library State: reads state (evidence: `src/components/ToastContainer.tsx`)
- Footer → Library State: reads state (evidence: `src/components/Footer.tsx`)
