A modern, full-stack web application showcasing Peramanathan Sathyamoorthy's professional portfolio as a Senior Software Engineer. Built with Next.js 16 App Router, featuring profile Q&A, interactive document viewing, and automated PDF CV generation.
- π¬ Profile Q&A: Ask interview-style questions about experience, grounded in CV data and curated notes β see Profile Q&A architecture and
src/lib/qa/README.md - π Dynamic PDF Generation: Server-side PDF creation with professional styling
- ποΈ Interactive Document Viewer: Inline PDF viewing with full browser integration
- π X search: Curated X/Twitter post search by date range (
/x;/content-hubredirects here β Content Hub UI removed; seedocs/content-hub-deferred.md) - π¨ Modern UI/UX: Beautiful shadcn/ui components with responsive design
- β‘ Performance Optimized: Fast loading with Next.js App Router and Turbopack
- βΏ Accessibility: WCAG-oriented patterns with keyboard navigation
- π Production Ready: Cross-platform deployment support (Vercel, Netlify, AWS)
- π± Mobile-First: Responsive design optimized for all device sizes
- Next.js 16 β React framework with App Router
- React 19 β UI library
- TypeScript β Type-safe JavaScript
- shadcn/ui β Components on Radix UI
- Radix UI β Accessible primitives
- Lucide React β Icons
- Motion β Animation (
motion/react)
- @react-pdf/renderer β PDF generation from React
- react-pdf β In-browser PDF viewing
- @huggingface/transformers β Local embeddings (Profile Q&A retrieval)
- pnpm β Package manager (
pnpm-lock.yaml, workspace supply-chain policy) - Biome β Lint and format (replaces ESLint for this repo)
- Bun β Fast runtime for PDF generation scripts
- Playwright β E2E tests (system Brave Beta, not bundled Chromium)
- Node.js 24+ (LTS recommended)
- pnpm 11+ (Corepack:
corepack enable pnpm) - Brave Beta (or set
BRAVE_BETA_PATH) for local E2E β see tests/e2e/README.md - Bun (optional, for
generate-pdfscript) - Git
-
Clone the repository
git clone <repository-url> cd devprofile
-
Install dependencies
pnpm install
For stricter supply-chain installs (recommended when changing deps), use Socket Firewall or your team's wrapper, e.g.
sfw pnpm install --frozen-lockfile. Workspace policy lives inpnpm-workspace.yaml.Optional Profile Q&A Ollama (narrative answers): copy
.env.local.exampleβ.env.local, setOLLAMA_BASE_URL, then restartpnpm dev. See tests/qa/README.md.Optional xAI Agentic QA Reactor: see xAI Agentic QA Reactor.
-
Sync editor profile (optional, Cursor / VS Code)
pnpm editor:sync
Applies
.editor/profile.jsonβ.vscode/settings.json, extension recommendations, and related editor config. Install the Biome extension, then reload the window. -
Generate initial CV PDF (optional, first deploy)
pnpm run generate-pdf # or: bun scripts/generate-pdf.tsx
-
Start the dev server
pnpm dev
- App:
http://localhost:3000 - Hot reload via Turbopack
- App:
-
Useful routes
- Portfolio:
/ - CV page:
/cv - Certificates:
/certificates - X search:
/x(/content-hubredirects here; Content Hub removed β seedocs/content-hub-deferred.md) - Profile Q&A:
/qa
Default
/qa(no reactor): usessrc/data/qa-index.json(git-tracked; regenerated on everypnpm build). For dev-only refresh:pnpm build-qa-index.- CV PDF:
/cv.pdf
- Portfolio:
Visitors use /qa and POST /api/cv/qa. All server logic lives in src/lib/qa/ β full design, env vars, troubleshooting, and BDD tests are documented in src/lib/qa/README.md.
One JSON contract for the UI: { answer, details[] }. Two backends, selected by ENABLE_XAI_REACTOR:
flowchart LR
subgraph visitor [Visitor]
QA["/qa page"]
end
subgraph api [API]
Route["POST /api/cv/qa"]
GW["handleQaRequest"]
end
subgraph paths [Backends]
Local["Local-index default"]
Agentic["Agentic optional"]
end
subgraph local_detail [Local-index]
Index["qa-index.json"]
Retrieve["BM25 + embeddings"]
Golden["golden-routing"]
Gen["template / Ollama"]
end
subgraph agentic_detail [Agentic]
Defense["abuse-defense first"]
Prefetch["preflight search"]
Grok["Grok + 6 tools"]
Coll["xAI Collections or local files"]
end
QA --> Route --> GW
GW -->|reactor off or fallback| Local
GW -->|ENABLE_XAI_REACTOR=true| Agentic
Local --> Index --> Retrieve --> Golden --> Gen
Agentic --> Defense --> Prefetch --> Grok
Grok --> Coll
Gen --> GW
Grok --> GW
| Path | When | Retrieval | Answer |
|---|---|---|---|
| Local-index | Default; also fallback if agentic fails or returns empty placeholder | Pre-built qa-index.json (hybrid RRF) |
Curated golden text, CV templates, or optional Ollama |
| Agentic | ENABLE_XAI_REACTOR=true + XAI_API_KEY |
xAI Collections API or bundled persona files | Grok (streamText + tools), with preflight search and chunk synthesis if the model is silent |
Agent skills / agents: load src/lib/qa/README.md for module layout, production vs branch notes, and env tuning (XAI_MODEL, XAI_MAX_OUTPUT_TOKENS, etc.).
Optional xAI reactor setup: xAI Agentic QA Reactor below.
# Development
pnpm dev # next dev --turbopack
pnpm build # generate PDF + SW version + production build
pnpm start # production server
# Quality
pnpm lint # Biome lint only (errors) β best practices, correctness, unused vars/imports
pnpm lint:report # Biome lint β full diagnostics
pnpm lint:fix # Biome lint --write (errors only)
pnpm format # Biome format --write (pure formatting: indent, quotes, semicolons, etc.)
pnpm imports:fix # Organize imports only (assist action)
pnpm type-check # tsc --noEmit
# PDF
pnpm generate-pdf # bun scripts/generate-pdf.tsx
# Editor profile
pnpm editor:sync # sync .editor profile β .vscode / Cursor
# E2E (Brave Beta β see tests/e2e/README.md)
pnpm test:e2e # all projects (desktop + mobile viewport)
pnpm test:e2e:headed # visible Brave window
pnpm test:e2e:ui # Playwright UI (opens Brave Beta)
pnpm test:e2e:debug # inspector + BraveDependency / security checks (after lockfile changes):
pnpm audit
pnpm install
pnpm type-check && pnpm lintE2E uses Brave Beta via playwright.config.ts / playwright.brave.ts, not Playwright-downloaded Chromium.
export BRAVE_BETA_PATH=/path/to/brave-browser-beta # optional
pnpm test:e2eDo not run pnpm exec playwright install chromium for day-to-day work. Remove unused Playwright browsers: pnpm exec playwright uninstall.
Details: tests/e2e/README.md
Agentic Profile Q&A on /qa using xAI Collections + Grok (flag-gated). Default /qa uses src/data/qa-index.json (git-tracked, synced on pnpm build) when the reactor is off or on fallback.
Copy .env.example β .env.local and set:
| Variable | Required | Notes |
|---|---|---|
XAI_API_KEY |
Yes | Chat β Grok model inference for reactor answers (console.x.ai) |
XAI_MANAGEMENT_API_KEY |
Recommended | Collections β read-only search against XAI_PROFILE_COLLECTION (preferred over reusing the chat key) |
XAI_PROFILE_COLLECTION |
Yes | Collection name or ID from console.x.ai |
ENABLE_XAI_REACTOR |
Yes | true to enable the agentic path |
XAI_MODEL |
Recommended | e.g. grok-4.3 β must match a model your account can use |
XAI_MAX_OUTPUT_TOKENS |
Optional | Default 400 β short essence answers |
XAI_REASONING_EFFORT |
Optional | low (default) or high |
Two keys, two roles: XAI_API_KEY is for chat (Grok). XAI_MANAGEMENT_API_KEY is for Collections (search/list). Use a read-only collections key so a leak only exposes content you already published. Upload/sync stays in console.x.ai or an external tool β not this app.
Collections setup: Create a Collection and upload profile sources (minimum: src/data/persona/ps-profile-v1.md; optional: src/data/cvdata.json, golden-qa.md, casual-qa.md, top-three-achievements.md). Set XAI_PROFILE_COLLECTION to its name or ID. Runtime reads live collection content via the Collections API on each request.
Development (with keys and collection in .env.local):
ENABLE_XAI_REACTOR=true XAI_MODEL=grok-4.3 pnpm dev --turbopackTest production build locally (after pnpm build; same vars in .env.local):
pnpm build
ENABLE_XAI_REACTOR=true XAI_MODEL=grok-4.3 pnpm startDeep dive: src/lib/qa/README.md (architecture diagrams, request flows, troubleshooting, tests). Also .env.example, docs/phase-1-xai-agentic-profile-qa-reactor.md.
Portable skills for Cursor and other coding agents live under .agents/skills/. Index: AGENTS.md and .agents/README.md.
| Skill | Use when |
|---|---|
fix-dependency-security |
Audit, sfw, supply-chain policy |
upgrade-packages |
Dependency upgrades and majors |
audit-allow-builds |
allowBuilds / lifecycle scripts |
audit-ide-dependencies |
Editor extension supply-chain |
project-editor-profile |
pnpm editor:sync, .editor/profile.json |
react-client-expert |
Client React refactors (minimal state/effects) |
pnpm build
pnpm startConfigured for:
- Vercel (recommended)
- Netlify
- AWS Amplify
- Any Node.js host
- Push to GitHub
- Connect the repository
- Deploy on push (use
pnpm install/pnpm buildin project settings)
- src/lib/qa/README.md β Profile Q&A library: dual-path architecture, env vars, production troubleshooting, BDD tests
- ARCHITECTURE.md β App structure and customization
- docs/vercel-err-require-esm-next-16.2.md β Vercel
ERR_REQUIRE_ESMon Next 16.2 - CONTRIBUTING.md β Branching, Biome, React client guidelines, E2E
- CHANGELOG.md β Version history
- AGENTS.md β Agent conventions and Playwright notes
- tests/e2e/README.md β Brave Beta, headed/UI/debug modes
This project is private and proprietary.
For questions or issues:
- Review the code and docs above
- See AGENTS.md and .agents/README.md for agent-oriented conventions
- Contact Peramanathan Sathyamoorthy directly
Built with Next.js 16 & React 19