How noamroger/portfolio works
This is Noam Roger’s bilingual portfolio, built as Astro pages and served by a Cloudflare Worker. A visitor reaches a localized page or command-line representation; the Worker selects the language/domain, routes dynamic endpoints, or serves the static build. The site also publishes project and profile information, machine-readable text and SEO metadata, fetches GitHub statistics, and records anonymous page views for an authenticated dashboard. The README documents several page and Worker integrations whose implementation was not sampled; those links cite the README rather than implying the unsampled code was inspected.
Main entry points: index.js Request router · pages Page routes · index.ts Locale routing · views Page views
Components 25
Portfolio presentation
- Page routes
src/pages - Page views
src/views - Shared layout
src/layouts/Layout.astro - Navigation UI
src/components/Navbar.astro - Contact form
src/views/Contact.astro
Content and localization
- Translations
src/i18n/en.ts - Locale routing
src/i18n/index.ts - Project catalog
src/data/projects.ts - LLM site map
src/data/llms.ts - Plaintext generators
src/data/plaintext.ts - CLI portfolio
src/data/cli.ts
Worker runtime
- Request router
worker/index.js - Host and redirects
worker/hosts.js - Static site serving
worker/site.js - CLI responses
worker/ops.js - Response headers
worker/headers.js
Statistics and integrations
- GitHub statistics
worker/github.js - View beacon
src/scripts/stats.ts - Visit analytics
worker/stats.js - Statistics store
migrations/0001_stats.sql - Admin dashboard
worker/admin.js
Other components
- Visitor
- Browser page
- GitHub API
- Contact endpoint
Connections 33
- Visitor → Browser page: visits
README.md - Browser page → Page routes: requests pages
README.md - Page routes → Page views: renders
README.md - Page views → Shared layout: uses layout
README.md - Page views → Translations: reads text
README.md - Shared layout → Locale routing: gets locale
README.md - Navigation UI → Locale routing: builds language links
README.md - Page views → Project catalog: reads projects
README.md - Page routes → LLM site map: serves llms.txt
src/pages/llms.txt.ts - LLM site map → Project catalog: reads projects
src/data/llms.ts - LLM site map → Locale routing: gets localized content
src/data/llms.ts - Page routes → Plaintext generators: serves text files
src/pages/llms.txt.ts - Plaintext generators → Locale routing: reads site settings
src/data/plaintext.ts - Page routes → CLI portfolio: serves CLI text
src/pages/cli.txt.ts - CLI portfolio → Project catalog: reads projects
src/data/cli.ts - CLI portfolio → Locale routing: gets localized content
src/data/cli.ts - Visitor → Request router: requests site
README.md - Request router → Host and redirects: resolves host
worker/index.js - Request router → Static site serving: serves assets
worker/index.js - Request router → CLI responses: checks CLI request
worker/index.js - CLI responses → CLI portfolio: returns CLI portfolio
src/data/cli.ts - Request router → Response headers: adds headers
worker/index.js - Request router → GitHub statistics: routes API request
worker/index.js - GitHub statistics → GitHub API: queries GraphQL
README.md - Browser page → GitHub statistics: fetches statistics
README.md - Browser page → View beacon: reports page view
- View beacon → Request router: posts beacon
- Request router → Visit analytics: routes hit
worker/index.js - Visit analytics → Statistics store: reads and writes
worker/stats.js - Request router → Admin dashboard: routes admin host
worker/index.js - Admin dashboard → Statistics store: reads analytics
worker/admin.js - Visitor → Contact form: submits message
README.md - Contact form → Contact endpoint: posts form
README.md