# academind/claude-code-course-resources architecture

> Architecture diagram of the GitHub repository academind/claude-code-course-resources, 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/academind/claude-code-course-resources
- Repository: https://github.com/academind/claude-code-course-resources

## Overview

This repository is course-resource snapshots, not a single deployed application; the finished-project snapshot contains the clearest product, NextNotes, a personal note-taking app. Its main workflow is signing in, creating or editing rich-text notes, and viewing or deleting them; owners can also publish notes for public viewing. The graph focuses on that snapshot and includes the documented course-resource role only as context. Several routes and helpers are identified from the tree but were not excerpted, so their connections are left unverified rather than inferred.

Main entry points: [`code-snapshots/finished-project/lib/db.ts`](https://github.com/academind/claude-code-course-resources/blob/main/code-snapshots/finished-project/lib/db.ts) (SQLite database), [`code-snapshots/finished-project/app/notes/[id]/page.tsx`](https://github.com/academind/claude-code-course-resources/blob/main/code-snapshots/finished-project/app/notes/%5Bid%5D/page.tsx) (Note viewer), [`code-snapshots/finished-project/lib/auth.ts`](https://github.com/academind/claude-code-course-resources/blob/main/code-snapshots/finished-project/lib/auth.ts) (Authentication), [`code-snapshots/finished-project/app/notes/[id]/edit/page.tsx`](https://github.com/academind/claude-code-course-resources/blob/main/code-snapshots/finished-project/app/notes/%5Bid%5D/edit/page.tsx) (Edit-note page)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_account["Account access"]
  node_authpage["Sign-in page<br/>[page.tsx]"]
  node_authroute["Auth API route<br/>[route.ts]"]
  node_authlib["Authentication<br/>[auth.ts]"]
  node_header["User header<br/>[header.tsx]"]
end

subgraph group_notes["Note management"]
  node_dashboard["Notes dashboard<br/>[page.tsx]"]
  node_newpage["New-note page<br/>[page.tsx]"]
  node_newform["New-note form<br/>[new-note-form.tsx]"]
  node_createaction["Create-note action<br/>[actions.ts]"]
  node_notepage["Note viewer<br/>[page.tsx]"]
  node_noteactions["Note controls<br/>[note-actions.tsx]"]
  node_noteaction["Delete and share actions<br/>[actions.ts]"]
  node_editpage["Edit-note page<br/>[page.tsx]"]
  node_editform["Edit-note form<br/>[edit-note-form.tsx]"]
  node_editaction["Update-note action<br/>[actions.ts]"]
  node_home["Home page<br/>[page.tsx]"]
end

subgraph group_sharing["Public sharing"]
  node_sharetoggle["Sharing controls<br/>[share-toggle.tsx]"]
  node_publicpage["Public note page<br/>[page.tsx]"]
end

subgraph group_content["Content and storage"]
  node_editor["Rich-text editor"]
  node_renderer["Rich-text renderer"]
  node_validation["Input validation<br/>[validation.ts]"]
  node_sanitize["Content sanitization<br/>[sanitize.ts]"]
  node_contentlib["Content helpers<br/>[content.ts]"]
  node_db[("SQLite database<br/>[db.ts]")]
end

node_visitor(("Visitor"))

node_authpage -.->|"uses auth"| node_authroute
node_authlib -->|"configures database"| node_db
node_newpage -->|"checks session"| node_authlib
node_newpage -->|"renders"| node_newform
node_newform -->|"renders"| node_editor
node_newform -->|"submits to"| node_createaction
node_createaction -.->|"writes note"| node_db
node_editpage -->|"checks session"| node_authlib
node_editpage -->|"reads note"| node_db
node_editpage -->|"renders"| node_editform
node_editform -->|"renders"| node_editor
node_editform -->|"submits to"| node_editaction
node_editaction -.->|"updates note"| node_db
node_notepage -->|"checks session"| node_authlib
node_notepage -->|"reads note"| node_db
node_notepage -->|"renders content"| node_renderer
node_notepage -->|"renders controls"| node_noteactions
node_notepage -->|"renders controls"| node_sharetoggle
node_noteactions -->|"calls delete"| node_noteaction
node_sharetoggle -.->|"calls sharing"| node_noteaction
node_noteaction -->|"changes notes"| node_db
node_publicpage -.->|"reads shared note"| node_db
node_visitor -.->|"signs in"| node_authpage
node_visitor -.->|"manages notes"| node_dashboard
node_visitor -.->|"views shared note"| node_publicpage
node_home -.->|"welcomes"| node_visitor

click node_authpage "https://github.com/academind/claude-code-course-resources/blob/main/code-snapshots/finished-project/app/authenticate/page.tsx"
click node_authroute "https://github.com/academind/claude-code-course-resources/blob/main/code-snapshots/finished-project/app/api/auth/%5B...all%5D/route.ts"
click node_authlib "https://github.com/academind/claude-code-course-resources/blob/main/code-snapshots/finished-project/lib/auth.ts"
click node_header "https://github.com/academind/claude-code-course-resources/blob/main/code-snapshots/finished-project/components/header.tsx"
click node_dashboard "https://github.com/academind/claude-code-course-resources/blob/main/code-snapshots/finished-project/app/dashboard/page.tsx"
click node_newpage "https://github.com/academind/claude-code-course-resources/blob/main/code-snapshots/finished-project/app/notes/new/page.tsx"
click node_newform "https://github.com/academind/claude-code-course-resources/blob/main/code-snapshots/finished-project/app/notes/new/new-note-form.tsx"
click node_createaction "https://github.com/academind/claude-code-course-resources/blob/main/code-snapshots/finished-project/app/notes/new/actions.ts"
click node_notepage "https://github.com/academind/claude-code-course-resources/blob/main/code-snapshots/finished-project/app/notes/%5Bid%5D/page.tsx"
click node_noteactions "https://github.com/academind/claude-code-course-resources/blob/main/code-snapshots/finished-project/app/notes/%5Bid%5D/note-actions.tsx"
click node_noteaction "https://github.com/academind/claude-code-course-resources/blob/main/code-snapshots/finished-project/app/notes/%5Bid%5D/actions.ts"
click node_editpage "https://github.com/academind/claude-code-course-resources/blob/main/code-snapshots/finished-project/app/notes/%5Bid%5D/edit/page.tsx"
click node_editform "https://github.com/academind/claude-code-course-resources/blob/main/code-snapshots/finished-project/app/notes/%5Bid%5D/edit/edit-note-form.tsx"
click node_editaction "https://github.com/academind/claude-code-course-resources/blob/main/code-snapshots/finished-project/app/notes/%5Bid%5D/edit/actions.ts"
click node_sharetoggle "https://github.com/academind/claude-code-course-resources/blob/main/code-snapshots/finished-project/components/share-toggle.tsx"
click node_publicpage "https://github.com/academind/claude-code-course-resources/blob/main/code-snapshots/finished-project/app/p/%5Bslug%5D/page.tsx"
click node_editor "https://github.com/academind/claude-code-course-resources/blob/main/code-snapshots/finished-project/components/rich-text-editor.tsx"
click node_renderer "https://github.com/academind/claude-code-course-resources/blob/main/code-snapshots/finished-project/components/tiptap-renderer.tsx"
click node_validation "https://github.com/academind/claude-code-course-resources/blob/main/code-snapshots/finished-project/lib/validation.ts"
click node_sanitize "https://github.com/academind/claude-code-course-resources/blob/main/code-snapshots/finished-project/lib/sanitize.ts"
click node_contentlib "https://github.com/academind/claude-code-course-resources/blob/main/code-snapshots/finished-project/lib/content.ts"
click node_db "https://github.com/academind/claude-code-course-resources/blob/main/code-snapshots/finished-project/lib/db.ts"
click node_home "https://github.com/academind/claude-code-course-resources/blob/main/code-snapshots/finished-project/app/page.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_authpage,node_authroute,node_authlib,node_header toneBlue
class node_dashboard,node_newpage,node_newform,node_createaction,node_notepage,node_noteactions,node_noteaction,node_editpage,node_editform,node_editaction,node_home toneAmber
class node_sharetoggle,node_publicpage toneMint
class node_editor,node_renderer,node_validation,node_sanitize,node_contentlib,node_db toneRose
class node_visitor toneIndigo
```

## Components

### Account access

- [Sign-in page](https://github.com/academind/claude-code-course-resources/blob/main/code-snapshots/finished-project/app/authenticate/page.tsx): `code-snapshots/finished-project/app/authenticate/page.tsx`
- [Auth API route](https://github.com/academind/claude-code-course-resources/blob/main/code-snapshots/finished-project/app/api/auth/%5B...all%5D/route.ts): `code-snapshots/finished-project/app/api/auth/[...all]/route.ts`
- [Authentication](https://github.com/academind/claude-code-course-resources/blob/main/code-snapshots/finished-project/lib/auth.ts): `code-snapshots/finished-project/lib/auth.ts`
- [User header](https://github.com/academind/claude-code-course-resources/blob/main/code-snapshots/finished-project/components/header.tsx): `code-snapshots/finished-project/components/header.tsx`

### Note management

- [Notes dashboard](https://github.com/academind/claude-code-course-resources/blob/main/code-snapshots/finished-project/app/dashboard/page.tsx): `code-snapshots/finished-project/app/dashboard/page.tsx`
- [New-note page](https://github.com/academind/claude-code-course-resources/blob/main/code-snapshots/finished-project/app/notes/new/page.tsx): `code-snapshots/finished-project/app/notes/new/page.tsx`
- [New-note form](https://github.com/academind/claude-code-course-resources/blob/main/code-snapshots/finished-project/app/notes/new/new-note-form.tsx): `code-snapshots/finished-project/app/notes/new/new-note-form.tsx`
- [Create-note action](https://github.com/academind/claude-code-course-resources/blob/main/code-snapshots/finished-project/app/notes/new/actions.ts): `code-snapshots/finished-project/app/notes/new/actions.ts`
- [Note viewer](https://github.com/academind/claude-code-course-resources/blob/main/code-snapshots/finished-project/app/notes/%5Bid%5D/page.tsx): `code-snapshots/finished-project/app/notes/[id]/page.tsx`
- [Note controls](https://github.com/academind/claude-code-course-resources/blob/main/code-snapshots/finished-project/app/notes/%5Bid%5D/note-actions.tsx): `code-snapshots/finished-project/app/notes/[id]/note-actions.tsx`
- [Delete and share actions](https://github.com/academind/claude-code-course-resources/blob/main/code-snapshots/finished-project/app/notes/%5Bid%5D/actions.ts): `code-snapshots/finished-project/app/notes/[id]/actions.ts`
- [Edit-note page](https://github.com/academind/claude-code-course-resources/blob/main/code-snapshots/finished-project/app/notes/%5Bid%5D/edit/page.tsx): `code-snapshots/finished-project/app/notes/[id]/edit/page.tsx`
- [Edit-note form](https://github.com/academind/claude-code-course-resources/blob/main/code-snapshots/finished-project/app/notes/%5Bid%5D/edit/edit-note-form.tsx): `code-snapshots/finished-project/app/notes/[id]/edit/edit-note-form.tsx`
- [Update-note action](https://github.com/academind/claude-code-course-resources/blob/main/code-snapshots/finished-project/app/notes/%5Bid%5D/edit/actions.ts): `code-snapshots/finished-project/app/notes/[id]/edit/actions.ts`
- [Home page](https://github.com/academind/claude-code-course-resources/blob/main/code-snapshots/finished-project/app/page.tsx): `code-snapshots/finished-project/app/page.tsx`

### Public sharing

- [Sharing controls](https://github.com/academind/claude-code-course-resources/blob/main/code-snapshots/finished-project/components/share-toggle.tsx): `code-snapshots/finished-project/components/share-toggle.tsx`
- [Public note page](https://github.com/academind/claude-code-course-resources/blob/main/code-snapshots/finished-project/app/p/%5Bslug%5D/page.tsx): `code-snapshots/finished-project/app/p/[slug]/page.tsx`

### Content and storage

- [Rich-text editor](https://github.com/academind/claude-code-course-resources/blob/main/code-snapshots/finished-project/components/rich-text-editor.tsx): `code-snapshots/finished-project/components/rich-text-editor.tsx`
- [Rich-text renderer](https://github.com/academind/claude-code-course-resources/blob/main/code-snapshots/finished-project/components/tiptap-renderer.tsx): `code-snapshots/finished-project/components/tiptap-renderer.tsx`
- [Input validation](https://github.com/academind/claude-code-course-resources/blob/main/code-snapshots/finished-project/lib/validation.ts): `code-snapshots/finished-project/lib/validation.ts`
- [Content sanitization](https://github.com/academind/claude-code-course-resources/blob/main/code-snapshots/finished-project/lib/sanitize.ts): `code-snapshots/finished-project/lib/sanitize.ts`
- [Content helpers](https://github.com/academind/claude-code-course-resources/blob/main/code-snapshots/finished-project/lib/content.ts): `code-snapshots/finished-project/lib/content.ts`
- [SQLite database](https://github.com/academind/claude-code-course-resources/blob/main/code-snapshots/finished-project/lib/db.ts): `code-snapshots/finished-project/lib/db.ts`

### Other components

- **Visitor**

## Connections

- Sign-in page → Auth API route: uses auth
- Authentication → SQLite database: configures database (evidence: `code-snapshots/finished-project/lib/auth.ts`)
- New-note page → Authentication: checks session (evidence: `code-snapshots/finished-project/app/notes/new/page.tsx`)
- New-note page → New-note form: renders (evidence: `code-snapshots/finished-project/app/notes/new/page.tsx`)
- New-note form → Rich-text editor: renders (evidence: `code-snapshots/finished-project/app/notes/new/new-note-form.tsx`)
- New-note form → Create-note action: submits to (evidence: `code-snapshots/finished-project/app/notes/new/new-note-form.tsx`)
- Create-note action → SQLite database: writes note
- Edit-note page → Authentication: checks session (evidence: `code-snapshots/finished-project/app/notes/[id]/edit/page.tsx`)
- Edit-note page → SQLite database: reads note (evidence: `code-snapshots/finished-project/app/notes/[id]/edit/page.tsx`)
- Edit-note page → Edit-note form: renders (evidence: `code-snapshots/finished-project/app/notes/[id]/edit/page.tsx`)
- Edit-note form → Rich-text editor: renders (evidence: `code-snapshots/finished-project/app/notes/[id]/edit/edit-note-form.tsx`)
- Edit-note form → Update-note action: submits to (evidence: `code-snapshots/finished-project/app/notes/[id]/edit/edit-note-form.tsx`)
- Update-note action → SQLite database: updates note
- Note viewer → Authentication: checks session (evidence: `code-snapshots/finished-project/app/notes/[id]/page.tsx`)
- Note viewer → SQLite database: reads note (evidence: `code-snapshots/finished-project/app/notes/[id]/page.tsx`)
- Note viewer → Rich-text renderer: renders content (evidence: `code-snapshots/finished-project/app/notes/[id]/page.tsx`)
- Note viewer → Note controls: renders controls (evidence: `code-snapshots/finished-project/app/notes/[id]/page.tsx`)
- Note viewer → Sharing controls: renders controls (evidence: `code-snapshots/finished-project/app/notes/[id]/page.tsx`)
- Note controls → Delete and share actions: calls delete (evidence: `code-snapshots/finished-project/app/notes/[id]/note-actions.tsx`)
- Sharing controls → Delete and share actions: calls sharing
- Delete and share actions → SQLite database: changes notes (evidence: `code-snapshots/finished-project/app/notes/[id]/actions.ts`)
- Public note page → SQLite database: reads shared note
- Visitor → Sign-in page: signs in
- Visitor → Notes dashboard: manages notes
- Visitor → Public note page: views shared note
- Home page → Visitor: welcomes
