Docs
Architecture
How pages, components, and content sources fit together.
System overview
The site is a layered system: routing and layout at the top, content and data in the middle,
and telemetry APIs at the edge. This page shows how those layers stay aligned.
Pages router
Static shells
Shared hooks
Telemetry edges
Routing map
| Route family | Source | Purpose |
|---|---|---|
| / | pages/index.tsx | Live overview, hero, and status surfaces. |
| /projects | pages/projects.tsx | Project cards with expandable detail panels. |
| /projects#pipeline-metrics | pages/projects.tsx | Repo activity and pipeline telemetry. |
| /docs | docs/*.md | Markdown-driven documentation. |
Page structure
Core layout
components/layout.tsxprovides the global header, navigation, and page shell.- Theme switching is handled by a dedicated toggle component.
- Reveal, grid tracking, and glow hotspots are shared hooks in
lib/hooks.
Telemetry and data
- Telemetry APIs live under
pages/apifor build and repo status. lib/cacheStore.tscentralizes caching, inflight dedupe, and rate limits.- Project detail panels fetch on demand and hydrate into expanded cards.
data/githubMetricsHistory.jsonstores historical commit and LOC snapshots.lib/metricsStore.tscan swap the JSON file for a database adapter.
Request journey
-
01. Route match
-
02. Content hydrate
-
03. Telemetry sync
Pages + Layout
Data + Markdown
Hooks + UI
Telemetry APIs
External APIs
Content inputs
posts/stores markdown-based blog posts.docs/stores markdown documentation that is published to the site.-
data/holds structured content for projects, tools, navigation, and hobbies. See Repository map for the full directory guide.
Consistency conventions
- Prefer declarative, data-driven rendering from
data/andlib/helpers. - Keep side effects in shared hooks instead of in-page ad hoc effects.
- Normalize cross-cutting logic (tag matching, key handling, scroll lock) into utilities.
- Treat markdown pipelines and search index builders as pure functions with explicit inputs.
Build output
public/serves static assets, RSS feeds, and the generated sitemap endpoint.- Next.js handles static generation for content pages and server-side rendering only where needed.