# drbrookskim/gitmark architecture

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

- Interactive diagram: https://gitdiagram.com/drbrookskim/gitmark
- Repository: https://github.com/drbrookskim/gitmark

## Overview

Gitmark is a small social app for leaving posts (“traces”), browsing a live feed, reacting and commenting, and viewing one’s own posts. The main journey is sign in or sign up, enter the authenticated app, browse or write a post, then open its detail to like or comment. Firebase Authentication and Firestore provide identity and persistence. The excerpts show the main routes and data operations; the Firebase services are inferred from the SDK calls, and the README is empty.

Main entry points: [`src/App.tsx`](https://github.com/drbrookskim/gitmark/blob/main/src/App.tsx) (App routes), [`src/components/PostCard.tsx`](https://github.com/drbrookskim/gitmark/blob/main/src/components/PostCard.tsx) (Post card), [`src/pages/AuthPage.tsx`](https://github.com/drbrookskim/gitmark/blob/main/src/pages/AuthPage.tsx) (Sign in / sign up), [`src/pages/PostDetailPage.tsx`](https://github.com/drbrookskim/gitmark/blob/main/src/pages/PostDetailPage.tsx) (Post and comments)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["App and identity"]
  node_app["App routes<br/>[App.tsx]"]
  node_authpage["Sign in / sign up<br/>[AuthPage.tsx]"]
  node_authcontext["Auth state<br/>[AuthContext.tsx]"]
end

subgraph group_posts["Posts and discussion"]
  node_feed["Live feed<br/>[FeedPage.tsx]"]
  node_write["Write post<br/>[WritePage.tsx]"]
  node_detail["Post and comments<br/>[PostDetailPage.tsx]"]
  node_postcard["Post card<br/>[PostCard.tsx]"]
end

subgraph group_profile["Profile and presentation"]
  node_mypage["My posts<br/>[MyPage.tsx]"]
  node_avatar["Avatar<br/>[Avatar.tsx]"]
  node_pseudonym["Nickname rules<br/>[pseudonym.ts]"]
  node_time["Time formatting<br/>[time.ts]"]
end

subgraph group_services["Firebase services"]
  node_firebase["Firebase client<br/>[firebase.ts]"]
  node_authservice(("Firebase Auth"))
  node_firestore[("Firestore")]
end

node_visitor(("Visitor"))

node_visitor -->|"opens app"| node_app
node_app -->|"provides auth"| node_authcontext
node_app -->|"routes to"| node_authpage
node_app -->|"routes to"| node_feed
node_app -->|"routes to"| node_write
node_app -->|"routes to"| node_detail
node_app -->|"routes to"| node_mypage
node_authpage -->|"checks nickname"| node_pseudonym
node_authpage -->|"uses client"| node_firebase
node_authcontext -->|"uses client"| node_firebase
node_authcontext -->|"observes session"| node_authservice
node_authcontext -->|"loads user"| node_firestore
node_authpage -->|"signs in or up"| node_authservice
node_authpage -->|"creates user record"| node_firestore
node_feed -->|"subscribes to posts"| node_firestore
node_feed -->|"renders posts"| node_postcard
node_write -->|"uses client"| node_firebase
node_write -->|"writes post"| node_firestore
node_detail -->|"reads and updates"| node_firestore
node_detail -->|"renders author"| node_avatar
node_detail -->|"formats nickname"| node_pseudonym
node_detail -->|"formats timestamps"| node_time
node_mypage -->|"subscribes to own posts"| node_firestore
node_mypage -->|"renders posts"| node_postcard
node_mypage -->|"renders profile"| node_avatar
node_mypage -->|"formats nickname"| node_pseudonym
node_postcard -->|"updates likes and deletion"| node_firestore
node_postcard -->|"reads session"| node_authcontext
node_postcard -->|"renders author"| node_avatar
node_postcard -->|"formats nickname"| node_pseudonym
node_postcard -->|"formats timestamp"| node_time
node_avatar -->|"gets initial"| node_pseudonym
node_firebase -->|"initializes auth"| node_authservice
node_firebase -->|"initializes database"| node_firestore

click node_app "https://github.com/drbrookskim/gitmark/blob/main/src/App.tsx"
click node_authpage "https://github.com/drbrookskim/gitmark/blob/main/src/pages/AuthPage.tsx"
click node_authcontext "https://github.com/drbrookskim/gitmark/blob/main/src/contexts/AuthContext.tsx"
click node_feed "https://github.com/drbrookskim/gitmark/blob/main/src/pages/FeedPage.tsx"
click node_write "https://github.com/drbrookskim/gitmark/blob/main/src/pages/WritePage.tsx"
click node_detail "https://github.com/drbrookskim/gitmark/blob/main/src/pages/PostDetailPage.tsx"
click node_postcard "https://github.com/drbrookskim/gitmark/blob/main/src/components/PostCard.tsx"
click node_mypage "https://github.com/drbrookskim/gitmark/blob/main/src/pages/MyPage.tsx"
click node_avatar "https://github.com/drbrookskim/gitmark/blob/main/src/components/Avatar.tsx"
click node_pseudonym "https://github.com/drbrookskim/gitmark/blob/main/src/lib/pseudonym.ts"
click node_time "https://github.com/drbrookskim/gitmark/blob/main/src/lib/time.ts"
click node_firebase "https://github.com/drbrookskim/gitmark/blob/main/src/firebase.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_authpage,node_authcontext toneBlue
class node_feed,node_write,node_detail,node_postcard toneAmber
class node_mypage,node_avatar,node_pseudonym,node_time toneMint
class node_firebase,node_authservice,node_firestore toneRose
class node_visitor toneIndigo
```

## Components

### App and identity

- [App routes](https://github.com/drbrookskim/gitmark/blob/main/src/App.tsx): `src/App.tsx`
- [Sign in / sign up](https://github.com/drbrookskim/gitmark/blob/main/src/pages/AuthPage.tsx): `src/pages/AuthPage.tsx`
- [Auth state](https://github.com/drbrookskim/gitmark/blob/main/src/contexts/AuthContext.tsx): `src/contexts/AuthContext.tsx`

### Posts and discussion

- [Live feed](https://github.com/drbrookskim/gitmark/blob/main/src/pages/FeedPage.tsx): `src/pages/FeedPage.tsx`
- [Write post](https://github.com/drbrookskim/gitmark/blob/main/src/pages/WritePage.tsx): `src/pages/WritePage.tsx`
- [Post and comments](https://github.com/drbrookskim/gitmark/blob/main/src/pages/PostDetailPage.tsx): `src/pages/PostDetailPage.tsx`
- [Post card](https://github.com/drbrookskim/gitmark/blob/main/src/components/PostCard.tsx): `src/components/PostCard.tsx`

### Profile and presentation

- [My posts](https://github.com/drbrookskim/gitmark/blob/main/src/pages/MyPage.tsx): `src/pages/MyPage.tsx`
- [Avatar](https://github.com/drbrookskim/gitmark/blob/main/src/components/Avatar.tsx): `src/components/Avatar.tsx`
- [Nickname rules](https://github.com/drbrookskim/gitmark/blob/main/src/lib/pseudonym.ts): `src/lib/pseudonym.ts`
- [Time formatting](https://github.com/drbrookskim/gitmark/blob/main/src/lib/time.ts): `src/lib/time.ts`

### Firebase services

- [Firebase client](https://github.com/drbrookskim/gitmark/blob/main/src/firebase.ts): `src/firebase.ts`
- **Firebase Auth**
- **Firestore**

### Other components

- **Visitor**

## Connections

- Visitor → App routes: opens app (evidence: `src/App.tsx`)
- App routes → Auth state: provides auth (evidence: `src/App.tsx`)
- App routes → Sign in / sign up: routes to (evidence: `src/App.tsx`)
- App routes → Live feed: routes to (evidence: `src/App.tsx`)
- App routes → Write post: routes to (evidence: `src/App.tsx`)
- App routes → Post and comments: routes to (evidence: `src/App.tsx`)
- App routes → My posts: routes to (evidence: `src/App.tsx`)
- Sign in / sign up → Nickname rules: checks nickname (evidence: `src/pages/AuthPage.tsx`)
- Sign in / sign up → Firebase client: uses client (evidence: `src/pages/AuthPage.tsx`)
- Auth state → Firebase client: uses client (evidence: `src/contexts/AuthContext.tsx`)
- Auth state → Firebase Auth: observes session (evidence: `src/contexts/AuthContext.tsx`)
- Auth state → Firestore: loads user (evidence: `src/contexts/AuthContext.tsx`)
- Sign in / sign up → Firebase Auth: signs in or up (evidence: `src/pages/AuthPage.tsx`)
- Sign in / sign up → Firestore: creates user record (evidence: `src/pages/AuthPage.tsx`)
- Live feed → Firestore: subscribes to posts (evidence: `src/pages/FeedPage.tsx`)
- Live feed → Post card: renders posts (evidence: `src/pages/FeedPage.tsx`)
- Write post → Firebase client: uses client (evidence: `src/pages/WritePage.tsx`)
- Write post → Firestore: writes post (evidence: `src/pages/WritePage.tsx`)
- Post and comments → Firestore: reads and updates (evidence: `src/pages/PostDetailPage.tsx`)
- Post and comments → Avatar: renders author (evidence: `src/pages/PostDetailPage.tsx`)
- Post and comments → Nickname rules: formats nickname (evidence: `src/pages/PostDetailPage.tsx`)
- Post and comments → Time formatting: formats timestamps (evidence: `src/pages/PostDetailPage.tsx`)
- My posts → Firestore: subscribes to own posts (evidence: `src/pages/MyPage.tsx`)
- My posts → Post card: renders posts (evidence: `src/pages/MyPage.tsx`)
- My posts → Avatar: renders profile (evidence: `src/pages/MyPage.tsx`)
- My posts → Nickname rules: formats nickname (evidence: `src/pages/MyPage.tsx`)
- Post card → Firestore: updates likes and deletion (evidence: `src/components/PostCard.tsx`)
- Post card → Auth state: reads session (evidence: `src/components/PostCard.tsx`)
- Post card → Avatar: renders author (evidence: `src/components/PostCard.tsx`)
- Post card → Nickname rules: formats nickname (evidence: `src/components/PostCard.tsx`)
- Post card → Time formatting: formats timestamp (evidence: `src/components/PostCard.tsx`)
- Avatar → Nickname rules: gets initial (evidence: `src/components/Avatar.tsx`)
- Firebase client → Firebase Auth: initializes auth (evidence: `src/firebase.ts`)
- Firebase client → Firestore: initializes database (evidence: `src/firebase.ts`)
