# elab-development/iteh26 architecture

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

- Interactive diagram: https://gitdiagram.com/elab-development/iteh26
- Repository: https://github.com/elab-development/iteh26

## Overview

This is a flashcard-deck browsing interface: users reach the home page, browse decks, and narrow them by subject or name; the browser renders matching deck cards. The sampled UI uses mock data rather than the database. The database connection and user schema are present, but no sampled application path connects them to browsing. The README is a generic Next.js template and documents no additional product capabilities; relationships are limited to those visible in excerpts or the source index.

Main entry points: [`src/components/DeckBrowser.tsx`](https://github.com/elab-development/iteh26/blob/master/src/components/DeckBrowser.tsx) (Deck browser), [`src/components/Sidebar.tsx`](https://github.com/elab-development/iteh26/blob/master/src/components/Sidebar.tsx) (Search and filters), [`src/shared/types.ts`](https://github.com/elab-development/iteh26/blob/master/src/shared/types.ts) (Deck and subject types), [`src/app/page.tsx`](https://github.com/elab-development/iteh26/blob/master/src/app/page.tsx) (Home page)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["App entry"]
  node_home["Home page<br/>[page.tsx]"]
end

subgraph group_browse["Deck browsing"]
  node_browser["Deck browser<br/>[DeckBrowser.tsx]"]
  node_sidebar["Search and filters<br/>[Sidebar.tsx]"]
  node_filter["Subject filter button<br/>[FilterBtn.tsx]"]
  node_deckcard["Deck card<br/>[Card.tsx]"]
end

subgraph group_data["Data and persistence"]
  node_mockdata["Mock decks and subjects<br/>[data.ts]"]
  node_types["Deck and subject types<br/>[types.ts]"]
  node_dbclient["Postgres client<br/>[index.ts]"]
  node_userschema[("User table schema<br/>[schema.ts]")]
end

node_user(("Visitor"))

node_user -.->|"opens app"| node_home
node_home -->|"renders"| node_browser
node_browser -->|"loads mock data"| node_mockdata
node_browser -->|"renders filters"| node_sidebar
node_browser -->|"renders decks"| node_deckcard
node_sidebar -->|"renders buttons"| node_filter
node_browser -->|"uses types"| node_types
node_sidebar -->|"uses types"| node_types
node_deckcard -->|"uses types"| node_types

click node_home "https://github.com/elab-development/iteh26/blob/master/src/app/page.tsx"
click node_browser "https://github.com/elab-development/iteh26/blob/master/src/components/DeckBrowser.tsx"
click node_sidebar "https://github.com/elab-development/iteh26/blob/master/src/components/Sidebar.tsx"
click node_filter "https://github.com/elab-development/iteh26/blob/master/src/components/FilterBtn.tsx"
click node_deckcard "https://github.com/elab-development/iteh26/blob/master/src/components/Card.tsx"
click node_mockdata "https://github.com/elab-development/iteh26/blob/master/src/mock/data.ts"
click node_types "https://github.com/elab-development/iteh26/blob/master/src/shared/types.ts"
click node_dbclient "https://github.com/elab-development/iteh26/blob/master/src/db/index.ts"
click node_userschema "https://github.com/elab-development/iteh26/blob/master/src/db/schema.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_home toneBlue
class node_browser,node_sidebar,node_filter,node_deckcard toneAmber
class node_mockdata,node_types,node_dbclient,node_userschema toneMint
class node_user toneIndigo
```

## Components

### App entry

- [Home page](https://github.com/elab-development/iteh26/blob/master/src/app/page.tsx): `src/app/page.tsx`

### Deck browsing

- [Deck browser](https://github.com/elab-development/iteh26/blob/master/src/components/DeckBrowser.tsx): `src/components/DeckBrowser.tsx`
- [Search and filters](https://github.com/elab-development/iteh26/blob/master/src/components/Sidebar.tsx): `src/components/Sidebar.tsx`
- [Subject filter button](https://github.com/elab-development/iteh26/blob/master/src/components/FilterBtn.tsx): `src/components/FilterBtn.tsx`
- [Deck card](https://github.com/elab-development/iteh26/blob/master/src/components/Card.tsx): `src/components/Card.tsx`

### Data and persistence

- [Mock decks and subjects](https://github.com/elab-development/iteh26/blob/master/src/mock/data.ts): `src/mock/data.ts`
- [Deck and subject types](https://github.com/elab-development/iteh26/blob/master/src/shared/types.ts): `src/shared/types.ts`
- [Postgres client](https://github.com/elab-development/iteh26/blob/master/src/db/index.ts): `src/db/index.ts`
- [User table schema](https://github.com/elab-development/iteh26/blob/master/src/db/schema.ts): `src/db/schema.ts`

### Other components

- **Visitor**

## Connections

- Visitor → Home page: opens app
- Home page → Deck browser: renders (evidence: `src/app/page.tsx`)
- Deck browser → Mock decks and subjects: loads mock data (evidence: `src/components/DeckBrowser.tsx`)
- Deck browser → Search and filters: renders filters (evidence: `src/components/DeckBrowser.tsx`)
- Deck browser → Deck card: renders decks (evidence: `src/components/DeckBrowser.tsx`)
- Search and filters → Subject filter button: renders buttons (evidence: `src/components/Sidebar.tsx`)
- Deck browser → Deck and subject types: uses types (evidence: `src/components/DeckBrowser.tsx`)
- Search and filters → Deck and subject types: uses types (evidence: `src/components/Sidebar.tsx`)
- Deck card → Deck and subject types: uses types (evidence: `src/components/Card.tsx`)
