How decimozs/portfolio works
1. This repository is a personal portfolio / resume site built as a static Astro application. The rendered output is a small set of content-driven pages rather than a dynamic server app.
2. The top-level architecture is split into:
- page routes in src/pages
- reusable UI in src/components
- shared page shells in src/layouts
- content data in src/content
- shared utilities/constants in src/lib
- global styling in src/styles
- static public assets in public
3. The primary content model is JSON-based and lives under src/content:
- experience.json
- works.json
- notebooks.json
These files are the main data source for the site’s sections and feed the corresponding pages. src/content.config.ts defines how Astro treats this content layer.
4. The routes are simple and map directly to the site’s major sections:
- src/pages/index.astro for the home page
- src/pages/experience.astro
- src/pages/works.astro
- src/pages/notebooks.astro
This indicates a mostly brochure-style information architecture with separate content sections rather than nested application flows.
5. Layout composition is centralized. src/layouts/Layout.astro and src/components/main-layout.astro act as shared page wrappers, likely handling the global HTML structure, metadata hooks, and overall page chrome. This is the main boundary between page content and site-wide presentation.
6. Navigation and header behavior are isolated into dedicated components:
- header.astro
- nav.astro
- hamburger.tsx
These form the responsive site navigation layer. The mix of Astro and React/TSX suggests some client-side interactivity is used only where necessary, likely for mobile navigation toggling.
7. The site also includes client-side enhancement components:
- smooth-scroll.tsx for scrolling behavior
- posthog.astro for analytics instrumentation
- SEO.astro plus src/lib/seo.ts for metadata generation
These are cross-cutting concerns attached at the layout level rather than inside individual content pages.
8. Shared helpers in src/lib provide application constants and utility functions:
- constant.ts
- utils.ts
- seo.ts
This keeps page and component logic thin and pushes reusable logic into a central utility boundary.
9. Static assets are served from public, including:
- resume.pdf
- font files
- robots.txt
- site.webmanifest
- .assetsignore
This indicates the site includes downloadable and SEO-related assets directly in the build output, with no separate asset pipeline.
10. Styling is global-first. src/styles/globals.css appears to be the main stylesheet, suggesting the design system is lightweight and site-specific rather than built on a heavy component library.
11. The tooling and runtime stack is modern static-site focused:
- Astro as the framework
- TypeScript via tsconfig.json
- Bun lockfile for package management
- Biome for linting/formatting
- Lefthook for git hooks
This points to a small, fast frontend codebase optimized for developer ergonomics.
12. Deployment/runtime infrastructure is Cloudflare-oriented. wrangler.jsonc strongly suggests the site is deployed to Cloudflare Workers or Pages. The GitHub Actions workflow in .github/workflows/ci.yml likely runs checks/build validation before deployment.
13. From an architecture diagram perspective, the key data flow is:
content JSON and static assets → Astro pages/components/layouts → static HTML/CSS/JS output → deployment via Cloudflare tooling.
Interactive behavior is limited and localized to a few client-side islands rather than the whole app.
14. Overall, this is a content-first portfolio site with clear separation between data, presentation, and cross-cutting concerns, and with minimal backend complexity.
Main entry points: main-layout.astro Main Layout · index.astro Home · Layout.astro Layout · content.config.ts Content Config
Components 31
App Source
Astro site code, content, styles, and shared helpers.
- Home · Landing page route for the portfolio home.
src/pages/index.astro - Experience · Dedicated route for work history and experience content.
src/pages/experience.astro - Works · Dedicated route for featured projects or works.
src/pages/works.astro - Notebooks · Dedicated route for notes, writing, or notebook content.
src/pages/notebooks.astro - Layout · Shared page wrapper for site-wide structure and metadata.
src/layouts/Layout.astro - Main Layout · Higher-level shared layout composition for pages.
src/components/main-layout.astro - Header · Top-level site header and brand area.
src/components/header.astro - Nav · Primary site navigation links and menu structure.
src/components/nav.astro - Hamburger · Client-side mobile menu toggle interaction.
src/components/hamburger.tsx - Smooth Scroll · Client-side scrolling behavior enhancement.
src/components/smooth-scroll.tsx - SEO · Metadata and head-tag composition component.
src/components/SEO.astro - PostHog · Analytics instrumentation component attached at the layout level.
src/components/posthog.astro - Content Config · Defines how Astro treats the content layer.
src/content.config.ts - Experience Data · Primary data source for experience sections.
src/content/experience.json - Works Data · Primary data source for works sections.
src/content/works.json - Notebook Data · Primary data source for notebooks sections.
src/content/notebooks.json - Constants · Application constants used across pages and components.
src/lib/constant.ts - Utils · Reusable utility functions for site logic.
src/lib/utils.ts - SEO Lib · Shared SEO helpers for metadata generation.
src/lib/seo.ts - Globals · Site-wide stylesheet and design baseline.
src/styles/globals.css
Static Assets
Files served directly from the public directory.
- Resume PDF · Downloadable resume asset.
public/resume.pdf - Fonts · Static font files served directly.
public/font - Robots · Crawler directives served from the public root.
public/robots.txt - Manifest · Site manifest for installed app metadata.
public/site.webmanifest
Tooling
Build, lint, hook, and deployment configuration.
- Astro Config · Astro framework and build configuration.
astro.config.mjs - Package · Scripts and dependency definitions.
package.json - TypeScript · TypeScript compiler and path configuration.
tsconfig.json - Biome · Formatting and linting configuration.
biome.json - Lefthook · Pre-commit or local hook automation.
lefthook.yml
CI / Deploy
Automated validation and Cloudflare deployment plumbing.
- Wrangler · Cloudflare deployment/runtime configuration.
wrangler.jsonc - CI Workflow · GitHub Actions validation workflow.
.github/workflows/ci.yml
Connections 32
- Home → Layout: uses · Home page is wrapped by the shared layout.
- Experience → Layout: uses · Experience page is wrapped by the shared layout.
- Works → Layout: uses · Works page is wrapped by the shared layout.
- Notebooks → Layout: uses · Notebooks page is wrapped by the shared layout.
- Layout → Main Layout: composes · Core layout delegates page chrome to the main layout component.
- Main Layout → Header: includes · Shared page shell includes the header.
- Main Layout → Nav: includes · Shared page shell includes primary navigation.
- Nav → Hamburger: enhanced by · Navigation uses a client-side hamburger toggle for mobile interaction.
- Main Layout → SEO: includes · Shared page shell attaches SEO metadata composition.
- Main Layout → PostHog: includes · Shared page shell attaches analytics instrumentation.
- Main Layout → Smooth Scroll: enhanced by · Shared page shell enables smooth scrolling behavior.
- SEO → SEO Lib: uses · SEO component relies on shared metadata helpers.
- Experience → Experience Data: reads · Experience route renders from experience JSON content.
- Works → Works Data: reads · Works route renders from works JSON content.
- Notebooks → Notebook Data: reads · Notebooks route renders from notebooks JSON content.
- Content Config → Experience Data: defines · Content layer configuration covers experience entries.
- Content Config → Works Data: defines · Content layer configuration covers works entries.
- Content Config → Notebook Data: defines · Content layer configuration covers notebook entries.
- Home → Constants: uses · Home page shares site constants and configuration.
- Home → Utils: uses · Home page uses shared helpers for page logic.
- Main Layout → Globals: loads · Global stylesheet is applied through the shared layout.
- Main Layout → Fonts: serves · Layout depends on static font assets for presentation.
- Home → Resume PDF: links · Home page exposes the downloadable resume asset.
- Astro Config → Content Config: registers · Astro config wires in the content layer.
- Package → Astro Config: scripts · Project scripts build and run the Astro app.
- Package → Biome: uses · Package scripts likely invoke Biome checks.
- Package → Lefthook: uses · Package tooling is connected to git hooks.
- Wrangler → Astro Config: deploys · Wrangler targets the built Astro output for Cloudflare.
- CI Workflow → Package: runs · CI workflow validates the repository via project scripts.
- CI Workflow → Wrangler: checks · CI workflow aligns with Cloudflare deployment config.
- Home → Manifest: uses · Site shell exposes web app manifest metadata.
- Home → Robots: uses · Site output is paired with crawler directives.