How rajin-khan/portfolio works
Purpose and runtime
This is Rajin Khan’s Astro 5 portfolio: static-first project/blog/profile pages plus interactive islands and serverless features. Astro routes and content collections provide the primary site surface; React powers stateful islands. Deployment targets Vercel, which hosts API routes and scheduled work. Core setup: astro.config.mjs, vercel.json, src/layouts/main.astro.
Site composition and routing
Page routes assemble shared layouts and reusable Astro components for home, portfolio, posts, about, uses, GitHub activity, and curated content. Dynamic detail routes resolve content by slug. Key paths: src/pages/index.astro, src/pages/post/[slug].astro, src/pages/projects/[slug].astro.
Content-driven publishing
Blog posts are Markdown and projects are JSON, validated/registered through Astro content configuration. Shared libraries derive project views, reading time, table of contents, and related content; static public assets supply media. Key paths: src/content/config.ts, src/content/post/, src/content/project/.
Interactive experience islands
Selective client-side components implement the sticker guestbook, curated carousel, and A.R.I.A. assistant rather than making the site a client-rendered app. Site-wide frontend behavior and GitHub dashboard interactions live separately. Key paths: src/components/sticker-board.jsx, src/components/aria/AriaApp.tsx, src/assets/js/github-dashboard.js.
A.R.I.A. assistant pipeline
A.R.I.A. has a React launcher/application client and a dedicated chat endpoint. The server pipeline controls protocol, environment/configuration, source policy, corpus retrieval, freshness, prompt construction, provider calls, actions, and security/link safety. This isolates model-facing logic from presentation and constrains responses to approved site knowledge. Key paths: src/pages/api/aria/chat.ts, src/lib/aria/retrieve.ts, src/lib/aria/provider.ts.
Stateful integrations and automation
Server endpoints bridge the site to external services: Upstash Redis persists stickers and newsletter subscriptions; Resend delivers newsletters; GitHub activity is fetched through an API route. A Vercel cron endpoint updates the daily heartbeat sticker. Key paths: src/pages/api/stickers.ts, src/pages/api/subscribe.ts, src/pages/api/send-newsletter.ts, src/pages/api/cron/heartbeat-sticker.ts.
Presentation assets and external surfaces
The public tree is directly served for portfolio media, PDFs, video, newsletter artifacts, and the separate RAJINTALKSALOT content bundle. Client rendering uses Three.js for the About globe and React where interactivity warrants hydration. Key paths: public/assets/, src/components/about-experience.astro, src/components/rajintalksalot.astro.
Main entry points: index.astro Site pages · sticker-board.jsx Interactive islands · config.ts Content collections · chat.ts A.R.I.A. chat API
Components 24
Static site
- Astro site runtime · Builds static-first pages and Vercel functions.
astro.config.mjs - Main layout
src/layouts/main.astro - Site pages · Home, profile, curated, portfolio, posts, and uses pages.
src/pages/index.astro - Post detail route
src/pages/post/[slug].astro - Project detail route
src/pages/projects/[slug].astro - Astro presentation · Shared page composition, including globe and RAJINTALKSALOT surfaces.
src/components/about-experience.astro - Interactive islands · Hydrated guestbook, carousel, assistant, and dashboard interactions.
src/components/sticker-board.jsx - GitHub dashboard client
src/assets/js/github-dashboard.js
Publishing
- Content collections · Validates and registers posts and projects.
src/content/config.ts - Blog posts
- Project records
- Public media bundle · Portfolio media, PDFs, video, newsletter artifacts, and RAJINTALKSALOT content.
A.R.I.A.
- A.R.I.A. client · Launcher and conversational interface.
src/components/aria/AriaApp.tsx - A.R.I.A. chat API · Applies source, security, and response protocol controls.
src/pages/api/aria/chat.ts - Corpus retrieval · Finds approved site knowledge and freshness context.
src/lib/aria/retrieve.ts - Model provider · Executes constrained provider calls.
src/lib/aria/provider.ts
Serverless integrations
- Sticker API · Persists guestbook stickers.
src/pages/api/stickers.ts - Subscription API · Persists newsletter subscriptions.
src/pages/api/subscribe.ts - Newsletter sender · Delivers newsletters through Resend.
src/pages/api/send-newsletter.ts - Heartbeat cron · Updates the daily heartbeat sticker.
src/pages/api/cron/heartbeat-sticker.ts - Upstash Redis · Stores stickers and subscriptions.
- Resend
- GitHub activity API · Supplies activity data to the site dashboard.
- Vercel · Hosts the site, API routes, and cron work.
vercel.json
Connections 22
- Astro site runtime → Site pages: builds
- Site pages → Main layout: uses
- Site pages → Astro presentation: composes
- Site pages → Content collections: queries
- Post detail route → Blog posts: resolves slug
- Project detail route → Project records: resolves slug
- Content collections → Blog posts: validates
- Content collections → Project records: validates
- Astro presentation → Public media bundle: serves media
- Site pages → Interactive islands: hydrates selectively
- GitHub dashboard client → GitHub activity API: fetches activity
- Interactive islands → Sticker API: guestbook requests
- A.R.I.A. client → A.R.I.A. chat API: sends chat
- Interactive islands → A.R.I.A. client: mounts
- A.R.I.A. chat API → Corpus retrieval: retrieves sources
- A.R.I.A. chat API → Model provider: constructs prompt and calls
- Sticker API → Upstash Redis: stores stickers
- Subscription API → Upstash Redis: stores subscriptions
- Newsletter sender → Resend: sends email
- Heartbeat cron → Sticker API: updates sticker
- Vercel → Astro site runtime: deploys
- Vercel → Heartbeat cron: schedules