# vengatz-git/inspirestack architecture

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

- Interactive diagram: https://gitdiagram.com/vengatz-git/inspirestack
- Repository: https://github.com/vengatz-git/inspirestack

## Overview

InspireStack is a social discovery application for creating and browsing visual pins, organizing them into boards, and interacting through profiles, follows, comments, likes, saves, and notifications. Users authenticate and onboard, then create pins or explore feeds, search, topics, and profiles; profile and settings workflows support identity and privacy preferences. The graph includes major feature areas from the tree, but unsampled feature internals are represented at directory level. Edges are limited to relationships shown in excerpts or the source index.

Main entry points: [`app/(app)`](https://github.com/vengatz-git/inspirestack/tree/main/app/(app)) (App routes), [`auth.ts`](https://github.com/vengatz-git/inspirestack/blob/main/auth.ts) (Authentication), [`features/feed/services/get-feed.ts`](https://github.com/vengatz-git/inspirestack/blob/main/features/feed/services/get-feed.ts) (Feed service), [`db/index.ts`](https://github.com/vengatz-git/inspirestack/blob/main/db/index.ts) (PostgreSQL data)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Application entry"]
  node_app["App routes"]
  node_landing["Landing experience<br/>[landing-page.tsx]"]
  node_onboarding["Onboarding"]
  node_settings["Account settings<br/>[page.tsx]"]
  node_feedroute["Feed API<br/>[route.ts]"]
  node_profileroute["Follow-list API<br/>[route.ts]"]
  node_notifroute["Notification stream<br/>[route.ts]"]
end

subgraph group_content["Pins and discovery"]
  node_feed["Feed service<br/>[get-feed.ts]"]
  node_feedui["Masonry feed<br/>[masonry-engine.tsx]"]
  node_pin["Pin detail and actions"]
  node_upload["Pin creation and drafts"]
  node_boards["Boards"]
  node_search["Search"]
  node_topics["Topics"]
end

subgraph group_social["Social features"]
  node_profile["Profiles"]
  node_follow["Follow and mute<br/>[follow-user.ts]"]
  node_comments["Comments"]
  node_likes["Pin likes"]
  node_saved["Saved pins"]
  node_notifications["Notifications"]
end

subgraph group_platform["Identity and persistence"]
  node_auth["Authentication<br/>[auth.ts]"]
  node_db[("PostgreSQL data<br/>[index.ts]")]
  node_schema["Domain schema<br/>[auth.ts]"]
end

node_user(("Visitor or member"))

node_user -.->|"browses"| node_app
node_app -->|"renders"| node_landing
node_app -->|"loads"| node_feed
node_feed -->|"queries"| node_db
node_feed -->|"checks saved IDs"| node_saved
node_feed -->|"checks saved boards"| node_boards
node_feed -.->|"supplies pins"| node_feedui
node_feedui -->|"places pin cards"| node_pin
node_app -->|"opens creation"| node_upload
node_app -->|"loads user boards"| node_boards
node_app -->|"loads topic options"| node_topics
node_app -->|"checks session"| node_auth
node_app -->|"loads profile"| node_profile
node_profile -->|"reads profile"| node_db
node_app -->|"checks follow status"| node_follow
node_app -->|"loads boards"| node_boards
node_app -->|"loads user pins"| node_pin
node_app -->|"checks session"| node_auth
node_follow -->|"queries and updates"| node_db
node_app -.->|"opens settings"| node_settings
node_settings -->|"checks session"| node_auth
node_settings -->|"loads profile"| node_profile
node_feedroute -->|"checks session"| node_auth
node_feedroute -->|"requests feed"| node_feed
node_profileroute -->|"resolves username"| node_profile
node_profileroute -->|"gets follow list"| node_follow
node_profileroute -->|"checks viewer"| node_auth
node_notifroute -->|"checks session"| node_auth
node_notifroute -->|"subscribes to events"| node_notifications
node_auth -->|"uses adapter"| node_db
node_auth -->|"configures auth tables"| node_schema
node_schema -->|"defines persisted entities"| node_db
node_user -.->|"sets up account"| node_onboarding
node_user -.->|"discovers content"| node_search
node_user -.->|"comments on pins"| node_comments
node_user -.->|"likes pins"| node_likes
node_user -.->|"views activity"| node_notifications

click node_app "https://github.com/vengatz-git/inspirestack/tree/main/app/(app)"
click node_landing "https://github.com/vengatz-git/inspirestack/blob/main/features/landing/components/landing-page.tsx"
click node_onboarding "https://github.com/vengatz-git/inspirestack/tree/main/features/onboarding"
click node_settings "https://github.com/vengatz-git/inspirestack/blob/main/app/(app)/settings/page.tsx"
click node_feed "https://github.com/vengatz-git/inspirestack/blob/main/features/feed/services/get-feed.ts"
click node_feedui "https://github.com/vengatz-git/inspirestack/blob/main/features/feed/components/masonry-engine.tsx"
click node_pin "https://github.com/vengatz-git/inspirestack/tree/main/features/pin"
click node_upload "https://github.com/vengatz-git/inspirestack/tree/main/features/upload"
click node_boards "https://github.com/vengatz-git/inspirestack/tree/main/features/board"
click node_search "https://github.com/vengatz-git/inspirestack/tree/main/features/search"
click node_topics "https://github.com/vengatz-git/inspirestack/tree/main/features/topic"
click node_profile "https://github.com/vengatz-git/inspirestack/tree/main/features/profile"
click node_follow "https://github.com/vengatz-git/inspirestack/blob/main/features/profile/services/follow-user.ts"
click node_comments "https://github.com/vengatz-git/inspirestack/tree/main/features/comment"
click node_likes "https://github.com/vengatz-git/inspirestack/tree/main/features/like"
click node_saved "https://github.com/vengatz-git/inspirestack/tree/main/features/saved"
click node_notifications "https://github.com/vengatz-git/inspirestack/tree/main/features/notification"
click node_auth "https://github.com/vengatz-git/inspirestack/blob/main/auth.ts"
click node_db "https://github.com/vengatz-git/inspirestack/blob/main/db/index.ts"
click node_schema "https://github.com/vengatz-git/inspirestack/blob/main/db/schema/auth.ts"
click node_feedroute "https://github.com/vengatz-git/inspirestack/blob/main/app/api/feed/route.ts"
click node_profileroute "https://github.com/vengatz-git/inspirestack/blob/main/app/api/profile/%5Busername%5D/follows/route.ts"
click node_notifroute "https://github.com/vengatz-git/inspirestack/blob/main/app/api/notifications/stream/route.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_app,node_landing,node_onboarding,node_settings,node_feedroute,node_profileroute,node_notifroute toneBlue
class node_feed,node_feedui,node_pin,node_upload,node_boards,node_search,node_topics toneAmber
class node_profile,node_follow,node_comments,node_likes,node_saved,node_notifications toneMint
class node_auth,node_db,node_schema toneRose
class node_user toneIndigo
```

## Components

### Application entry

- [App routes](https://github.com/vengatz-git/inspirestack/tree/main/app/(app)): `app/(app)`
- [Landing experience](https://github.com/vengatz-git/inspirestack/blob/main/features/landing/components/landing-page.tsx): `features/landing/components/landing-page.tsx`
- [Onboarding](https://github.com/vengatz-git/inspirestack/tree/main/features/onboarding): `features/onboarding`
- [Account settings](https://github.com/vengatz-git/inspirestack/blob/main/app/(app)/settings/page.tsx): `app/(app)/settings/page.tsx`
- [Feed API](https://github.com/vengatz-git/inspirestack/blob/main/app/api/feed/route.ts): `app/api/feed/route.ts`
- [Follow-list API](https://github.com/vengatz-git/inspirestack/blob/main/app/api/profile/%5Busername%5D/follows/route.ts): `app/api/profile/[username]/follows/route.ts`
- [Notification stream](https://github.com/vengatz-git/inspirestack/blob/main/app/api/notifications/stream/route.ts): `app/api/notifications/stream/route.ts`

### Pins and discovery

- [Feed service](https://github.com/vengatz-git/inspirestack/blob/main/features/feed/services/get-feed.ts): `features/feed/services/get-feed.ts`
- [Masonry feed](https://github.com/vengatz-git/inspirestack/blob/main/features/feed/components/masonry-engine.tsx): `features/feed/components/masonry-engine.tsx`
- [Pin detail and actions](https://github.com/vengatz-git/inspirestack/tree/main/features/pin): `features/pin`
- [Pin creation and drafts](https://github.com/vengatz-git/inspirestack/tree/main/features/upload): `features/upload`
- [Boards](https://github.com/vengatz-git/inspirestack/tree/main/features/board): `features/board`
- [Search](https://github.com/vengatz-git/inspirestack/tree/main/features/search): `features/search`
- [Topics](https://github.com/vengatz-git/inspirestack/tree/main/features/topic): `features/topic`

### Social features

- [Profiles](https://github.com/vengatz-git/inspirestack/tree/main/features/profile): `features/profile`
- [Follow and mute](https://github.com/vengatz-git/inspirestack/blob/main/features/profile/services/follow-user.ts): `features/profile/services/follow-user.ts`
- [Comments](https://github.com/vengatz-git/inspirestack/tree/main/features/comment): `features/comment`
- [Pin likes](https://github.com/vengatz-git/inspirestack/tree/main/features/like): `features/like`
- [Saved pins](https://github.com/vengatz-git/inspirestack/tree/main/features/saved): `features/saved`
- [Notifications](https://github.com/vengatz-git/inspirestack/tree/main/features/notification): `features/notification`

### Identity and persistence

- [Authentication](https://github.com/vengatz-git/inspirestack/blob/main/auth.ts): `auth.ts`
- [PostgreSQL data](https://github.com/vengatz-git/inspirestack/blob/main/db/index.ts): `db/index.ts`
- [Domain schema](https://github.com/vengatz-git/inspirestack/blob/main/db/schema/auth.ts): `db/schema/auth.ts`

### Other components

- **Visitor or member**

## Connections

- Visitor or member → App routes: browses (evidence: `README.md`)
- App routes → Landing experience: renders
- App routes → Feed service: loads
- Feed service → PostgreSQL data: queries (evidence: `features/feed/services/get-feed.ts`)
- Feed service → Saved pins: checks saved IDs (evidence: `features/feed/services/get-feed.ts`)
- Feed service → Boards: checks saved boards (evidence: `features/feed/services/get-feed.ts`)
- Feed service → Masonry feed: supplies pins
- Masonry feed → Pin detail and actions: places pin cards (evidence: `features/feed/components/masonry-engine.tsx`)
- App routes → Pin creation and drafts: opens creation (evidence: `app/(app)/create/page.tsx`)
- App routes → Boards: loads user boards (evidence: `app/(app)/create/page.tsx`)
- App routes → Topics: loads topic options (evidence: `app/(app)/create/page.tsx`)
- App routes → Authentication: checks session (evidence: `app/(app)/create/page.tsx`)
- App routes → Profiles: loads profile (evidence: `app/(app)/profile/[username]/page.tsx`)
- Profiles → PostgreSQL data: reads profile (evidence: `features/profile/services/get-profile-by-username.ts`)
- App routes → Follow and mute: checks follow status (evidence: `app/(app)/profile/[username]/page.tsx`)
- App routes → Boards: loads boards (evidence: `app/(app)/profile/[username]/page.tsx`)
- App routes → Pin detail and actions: loads user pins (evidence: `app/(app)/profile/[username]/page.tsx`)
- App routes → Authentication: checks session (evidence: `app/(app)/profile/[username]/page.tsx`)
- Follow and mute → PostgreSQL data: queries and updates (evidence: `features/profile/services/follow-user.ts`)
- App routes → Account settings: opens settings
- Account settings → Authentication: checks session (evidence: `app/(app)/settings/page.tsx`)
- Account settings → Profiles: loads profile (evidence: `app/(app)/settings/page.tsx`)
- Feed API → Authentication: checks session (evidence: `app/api/feed/route.ts`)
- Feed API → Feed service: requests feed (evidence: `app/api/feed/route.ts`)
- Follow-list API → Profiles: resolves username (evidence: `app/api/profile/[username]/follows/route.ts`)
- Follow-list API → Follow and mute: gets follow list (evidence: `app/api/profile/[username]/follows/route.ts`)
- Follow-list API → Authentication: checks viewer (evidence: `app/api/profile/[username]/follows/route.ts`)
- Notification stream → Authentication: checks session (evidence: `app/api/notifications/stream/route.ts`)
- Notification stream → Notifications: subscribes to events (evidence: `app/api/notifications/stream/route.ts`)
- Authentication → PostgreSQL data: uses adapter (evidence: `auth.ts`)
- Authentication → Domain schema: configures auth tables (evidence: `auth.ts`)
- Domain schema → PostgreSQL data: defines persisted entities (evidence: `db/schema/auth.ts`)
- Visitor or member → Onboarding: sets up account (evidence: `README.md`)
- Visitor or member → Search: discovers content (evidence: `README.md`)
- Visitor or member → Comments: comments on pins (evidence: `README.md`)
- Visitor or member → Pin likes: likes pins (evidence: `README.md`)
- Visitor or member → Notifications: views activity (evidence: `README.md`)
