How soyeb-jim285/portfolio works
This is a portfolio site with a separate API for its visitor-facing assistant. The main journey is a visitor asking a question in the assistant panel, receiving a streamed answer with tool activity and citations, and optionally navigating the portfolio, drafting contact, downloading an artifact, or arranging a calendar slot. The API also supports a repository-code index and optional generative UI. The README documents several capabilities whose implementation was not sampled; those links are shown only where documentation supports them.
Main entry points: app.ts Hono API routes · chat-turn.ts Chat turn orchestration · chat-stream.ts Chat stream client · ChatPanel.tsx Assistant panel
Components 27
Portfolio site
- Portfolio content
src/data/content.ts - Projects and research
src/data/projects.ts - Navigation targets
src/data/site-map.ts
Assistant interface
- Assistant panel
src/components/chat/ChatPanel.tsx - Panel session state
src/components/chat/panel-hooks.ts - Ask and actions
src/components/chat/panel-ask.ts - Chat stream client
src/lib/chat-stream.ts - Site navigation actions
src/lib/site-actions.ts - Answer rendering
src/components/ai-elements/message.tsx
Assistant API
- Hono API routes
server/src/app.ts - Shared API dependencies
server/src/app/deps.ts - Chat turn orchestration
server/src/app/chat-turn.ts - Tool-step execution
server/src/app/chat-step.ts - Assistant tools
server/src/tools.ts - Generative UI
server/src/gen-ui.ts - Voice transcription
server/src/app/transcribe.ts
Code knowledge
- Repository indexing
server/src/index-run.ts - Code retrieval
server/src/retrieval.ts - Embedding provider
server/src/embeddings.ts
State and integrations
- PostgreSQL
server/src/db.ts - Calendar scheduler
server/src/scheduler.ts - Contact mailer
server/src/mailer.ts - Artifact storage
server/src/storage.ts
Other components
- Visitor
- OpenRouter
- Cal.com
- S3-compatible R2
Connections 29
- Visitor → Assistant panel: asks
- Assistant panel → Panel session state: uses state
src/components/chat/panel-hooks.ts - Panel session state → Chat stream client: starts session
src/components/chat/panel-hooks.ts - Assistant panel → Ask and actions: submits question
- Ask and actions → Chat stream client: streams answer
src/components/chat/panel-ask.ts - Chat stream client → Hono API routes: sends requests
- Hono API routes → Chat turn orchestration: routes chat
server/src/app.ts - Hono API routes → Shared API dependencies: builds dependencies
server/src/app/deps.ts - Chat turn orchestration → Tool-step execution: runs tool steps
server/src/app/chat-turn.ts - Tool-step execution → Code retrieval: searches code
server/src/app/chat-step.ts - Tool-step execution → Assistant tools: dispatches tools
server/src/app/chat-step.ts - Chat turn orchestration → Generative UI: composes UI
- Chat turn orchestration → OpenRouter: streams model answer
- Chat stream client → Answer rendering: renders response
- Ask and actions → Site navigation actions: runs navigation
src/components/chat/panel-ask.ts - Site navigation actions → Navigation targets: looks up target
src/lib/site-actions.ts - Visitor → Portfolio content: views portfolio
- Portfolio content → Projects and research: exports projects
src/data/content.ts - Hono API routes → Voice transcription: routes transcription
server/src/app.ts - Repository indexing → Embedding provider: embeds windows
- Code retrieval → Embedding provider: embeds queries
server/src/retrieval.ts - Code retrieval → PostgreSQL: queries index
- Repository indexing → PostgreSQL: promotes index
- Hono API routes → PostgreSQL: stores sessions and answers
server/src/app.ts - Calendar scheduler → Cal.com: reads availability
- Hono API routes → Calendar scheduler: handles bookings
server/src/app.ts - Hono API routes → Contact mailer: handles contact
server/src/app.ts - Hono API routes → Artifact storage: issues signed links
server/src/app.ts - Artifact storage → S3-compatible R2: stores objects
server/src/storage.ts