# harshitj101/vlode1 architecture

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

- Interactive diagram: https://gitdiagram.com/harshitj101/vlode1
- Repository: https://github.com/harshitj101/vlode1

## Overview

Vlode is a full-stack blogging platform. The main workflow runs from browser navigation and authentication through blog discovery or authoring, authenticated API routes, and PostgreSQL-backed results; profile and single-article views are distinct read stages. The graph also includes shared input schemas and the writing-modal interaction. Some pages and backend startup wiring are unsampled, so those connections are omitted rather than inferred.

Main entry points: [`frontend/src/App.tsx`](https://github.com/harshitj101/vlode1/blob/main/frontend/src/App.tsx) (Route application), [`backend/src/routes/blog.ts`](https://github.com/harshitj101/vlode1/blob/main/backend/src/routes/blog.ts) (Blog routes), [`frontend/src/pages/Signup.tsx`](https://github.com/harshitj101/vlode1/blob/main/frontend/src/pages/Signup.tsx) (Signup and signin), [`backend/src/routes/user.ts`](https://github.com/harshitj101/vlode1/blob/main/backend/src/routes/user.ts) (User authentication routes)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web experience"]
  node_app["Route application<br/>[App.tsx]"]
  node_landing["Landing page<br/>[Landing.tsx]"]
end

subgraph group_identity["Authentication"]
  node_authpages["Signup and signin<br/>[Signup.tsx]"]
  node_authcard["Authentication form<br/>[AuthCard.tsx]"]
end

subgraph group_content["Blog content"]
  node_home["Home feed<br/>[Container.tsx]"]
  node_profile["Author profile<br/>[User.tsx]"]
  node_article["Article reader<br/>[Blog.tsx]"]
  node_blogcard["Blog card<br/>[BlogCard.tsx]"]
  node_writeui["Writing modal UI<br/>[WriteModal.tsx]"]
  node_writehook["Writing workflow<br/>[useWriteModal.ts]"]
  node_datahooks["Blog and profile fetches<br/>[index.ts]"]
end

subgraph group_server["API and persistence"]
  node_api["Hono API entry<br/>[index.ts]"]
  node_userapi["User authentication routes<br/>[user.ts]"]
  node_blogapi["Blog routes<br/>[blog.ts]"]
  node_schemas["Shared input schemas<br/>[index.ts]"]
  node_database[("PostgreSQL data model<br/>[schema.prisma]")]
end

node_reader(("Reader or author"))

node_reader -->|"opens"| node_app
node_app -->|"routes"| node_landing
node_app -->|"routes"| node_authpages
node_app -->|"routes"| node_home
node_app -->|"routes"| node_profile
node_app -->|"routes"| node_article
node_authpages -->|"renders"| node_authcard
node_authpages -->|"submits signup"| node_userapi
node_authpages -->|"uses input types"| node_schemas
node_home -->|"fetches feed"| node_datahooks
node_home -->|"renders"| node_blogcard
node_profile -->|"loads profile"| node_datahooks
node_profile -->|"renders posts"| node_blogcard
node_article -->|"loads article"| node_datahooks
node_writeui -->|"uses workflow"| node_writehook
node_writehook -->|"posts blog"| node_blogapi
node_datahooks -->|"requests blog data"| node_blogapi
node_api -->|"mounts routes"| node_userapi
node_api -->|"mounts routes"| node_blogapi
node_userapi -->|"validates inputs"| node_schemas
node_blogapi -->|"validates inputs"| node_schemas
node_userapi -->|"reads and writes"| node_database
node_blogapi -->|"reads and writes"| node_database

click node_app "https://github.com/harshitj101/vlode1/blob/main/frontend/src/App.tsx"
click node_landing "https://github.com/harshitj101/vlode1/blob/main/frontend/src/pages/Landing.tsx"
click node_authpages "https://github.com/harshitj101/vlode1/blob/main/frontend/src/pages/Signup.tsx"
click node_authcard "https://github.com/harshitj101/vlode1/blob/main/frontend/src/components/AuthCard.tsx"
click node_home "https://github.com/harshitj101/vlode1/blob/main/frontend/src/components/Container.tsx"
click node_profile "https://github.com/harshitj101/vlode1/blob/main/frontend/src/pages/User.tsx"
click node_article "https://github.com/harshitj101/vlode1/blob/main/frontend/src/pages/Blog.tsx"
click node_blogcard "https://github.com/harshitj101/vlode1/blob/main/frontend/src/components/BlogCard.tsx"
click node_writeui "https://github.com/harshitj101/vlode1/blob/main/frontend/src/components/WriteModal.tsx"
click node_writehook "https://github.com/harshitj101/vlode1/blob/main/frontend/src/hooks/useWriteModal.ts"
click node_datahooks "https://github.com/harshitj101/vlode1/blob/main/frontend/src/hooks/index.ts"
click node_api "https://github.com/harshitj101/vlode1/blob/main/backend/src/index.ts"
click node_userapi "https://github.com/harshitj101/vlode1/blob/main/backend/src/routes/user.ts"
click node_blogapi "https://github.com/harshitj101/vlode1/blob/main/backend/src/routes/blog.ts"
click node_schemas "https://github.com/harshitj101/vlode1/blob/main/common/src/index.ts"
click node_database "https://github.com/harshitj101/vlode1/blob/main/backend/prisma/schema.prisma"

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 toneBlue
class node_authpages,node_authcard toneAmber
class node_home,node_profile,node_article,node_blogcard,node_writeui,node_writehook,node_datahooks toneMint
class node_api,node_userapi,node_blogapi,node_schemas,node_database toneRose
class node_reader toneIndigo
```

## Components

### Web experience

- [Route application](https://github.com/harshitj101/vlode1/blob/main/frontend/src/App.tsx): `frontend/src/App.tsx`
- [Landing page](https://github.com/harshitj101/vlode1/blob/main/frontend/src/pages/Landing.tsx): `frontend/src/pages/Landing.tsx`

### Authentication

- [Signup and signin](https://github.com/harshitj101/vlode1/blob/main/frontend/src/pages/Signup.tsx): `frontend/src/pages/Signup.tsx`
- [Authentication form](https://github.com/harshitj101/vlode1/blob/main/frontend/src/components/AuthCard.tsx): `frontend/src/components/AuthCard.tsx`

### Blog content

- [Home feed](https://github.com/harshitj101/vlode1/blob/main/frontend/src/components/Container.tsx): `frontend/src/components/Container.tsx`
- [Author profile](https://github.com/harshitj101/vlode1/blob/main/frontend/src/pages/User.tsx): `frontend/src/pages/User.tsx`
- [Article reader](https://github.com/harshitj101/vlode1/blob/main/frontend/src/pages/Blog.tsx): `frontend/src/pages/Blog.tsx`
- [Blog card](https://github.com/harshitj101/vlode1/blob/main/frontend/src/components/BlogCard.tsx): `frontend/src/components/BlogCard.tsx`
- [Writing modal UI](https://github.com/harshitj101/vlode1/blob/main/frontend/src/components/WriteModal.tsx): `frontend/src/components/WriteModal.tsx`
- [Writing workflow](https://github.com/harshitj101/vlode1/blob/main/frontend/src/hooks/useWriteModal.ts): `frontend/src/hooks/useWriteModal.ts`
- [Blog and profile fetches](https://github.com/harshitj101/vlode1/blob/main/frontend/src/hooks/index.ts): `frontend/src/hooks/index.ts`

### API and persistence

- [Hono API entry](https://github.com/harshitj101/vlode1/blob/main/backend/src/index.ts): `backend/src/index.ts`
- [User authentication routes](https://github.com/harshitj101/vlode1/blob/main/backend/src/routes/user.ts): `backend/src/routes/user.ts`
- [Blog routes](https://github.com/harshitj101/vlode1/blob/main/backend/src/routes/blog.ts): `backend/src/routes/blog.ts`
- [Shared input schemas](https://github.com/harshitj101/vlode1/blob/main/common/src/index.ts): `common/src/index.ts`
- [PostgreSQL data model](https://github.com/harshitj101/vlode1/blob/main/backend/prisma/schema.prisma): `backend/prisma/schema.prisma`

### Other components

- **Reader or author**

## Connections

- Reader or author → Route application: opens (evidence: `frontend/src/App.tsx`)
- Route application → Landing page: routes (evidence: `frontend/src/App.tsx`)
- Route application → Signup and signin: routes (evidence: `frontend/src/App.tsx`)
- Route application → Home feed: routes (evidence: `frontend/src/App.tsx`)
- Route application → Author profile: routes (evidence: `frontend/src/App.tsx`)
- Route application → Article reader: routes (evidence: `frontend/src/App.tsx`)
- Signup and signin → Authentication form: renders (evidence: `frontend/src/pages/Signup.tsx`)
- Signup and signin → User authentication routes: submits signup (evidence: `frontend/src/pages/Signup.tsx`)
- Signup and signin → Shared input schemas: uses input types (evidence: `frontend/src/pages/Signup.tsx`)
- Home feed → Blog and profile fetches: fetches feed (evidence: `frontend/src/components/Container.tsx`)
- Home feed → Blog card: renders (evidence: `frontend/src/components/Container.tsx`)
- Author profile → Blog and profile fetches: loads profile (evidence: `frontend/src/hooks/index.ts`)
- Author profile → Blog card: renders posts (evidence: `frontend/src/pages/User.tsx`)
- Article reader → Blog and profile fetches: loads article (evidence: `frontend/src/pages/Blog.tsx`)
- Writing modal UI → Writing workflow: uses workflow (evidence: `frontend/src/components/Header.tsx`)
- Writing workflow → Blog routes: posts blog (evidence: `frontend/src/hooks/useWriteModal.ts`)
- Blog and profile fetches → Blog routes: requests blog data (evidence: `frontend/src/hooks/index.ts`)
- Hono API entry → User authentication routes: mounts routes (evidence: `backend/src/index.ts`)
- Hono API entry → Blog routes: mounts routes (evidence: `backend/src/index.ts`)
- User authentication routes → Shared input schemas: validates inputs (evidence: `backend/src/routes/user.ts`)
- Blog routes → Shared input schemas: validates inputs (evidence: `backend/src/routes/blog.ts`)
- User authentication routes → PostgreSQL data model: reads and writes (evidence: `backend/src/routes/user.ts`)
- Blog routes → PostgreSQL data model: reads and writes (evidence: `backend/src/routes/blog.ts`)
