How kkbaidu/my-terminal-portfolio works
This is a Next.js portfolio presented as an interactive terminal, with visitors issuing commands to explore profile data, projects, skills, work history, and other portfolio content. The main enhanced workflow is an AI question: the terminal sends it to the AI route, which builds a retrieval-grounded prompt and streams a response from a configured model, or falls back to generated text. Contact, GitHub, resume, projects, and blog are distinct capability branches. Some component wiring is inferred from the README and partial excerpts; uncertain links are omitted.
Main entry points: portfolio-terminal.tsx Terminal UI · commands.ts Command Handler · portfolio.ts Portfolio Access · route.ts AI Endpoint
Components 22
Terminal Experience
- Terminal Page
src/app/page.tsx - Terminal UI
src/components/portfolio-terminal.tsx - Command Handler
src/lib/commands.ts - Boot Sequence
src/components/boot-sequence.tsx - Markdown Renderer
src/components/terminal-markdown.tsx - Contact Form
src/components/contact-form.tsx - GitHub Profile Card
src/components/github-profile.tsx
Portfolio Content
- Portfolio Data
src/data/portfolio.json - Portfolio Access
src/lib/portfolio.ts - Context Retrieval
src/lib/rag.ts - Projects Page
src/app/projects/page.tsx - Blog Page
src/app/blog/page.tsx - Resume PDF
docs/Kingsley-Korankye-Baidu_Resume.pdf
API Services
- AI Endpoint
src/app/api/ai/route.ts - GitHub Endpoint
src/app/api/github/route.ts - Contact Endpoint
src/app/api/contact/route.ts - Resume Endpoint
src/app/api/resume/route.ts
External Integrations
- Google Gemini
- OpenAI
- GitHub API
- Resend Email
Other components
- Visitor
Connections 25
- Visitor → Terminal Page: opens
- Terminal Page → Terminal UI: renders
- Terminal UI → Boot Sequence: shows
- Terminal UI → Command Handler: dispatches commands
- Command Handler → Portfolio Access: reads portfolio
- Portfolio Access → Portfolio Data: reads
- Command Handler → Context Retrieval: retrieves context
- Context Retrieval → Portfolio Access: reads content
- Terminal UI → Markdown Renderer: renders output
- Terminal UI → AI Endpoint: sends questions
- AI Endpoint → Command Handler: builds prompt
- AI Endpoint → Google Gemini: streams response
- AI Endpoint → OpenAI: fallback model
- Terminal UI → GitHub Profile Card: renders card
- GitHub Profile Card → GitHub Endpoint: requests profile
- GitHub Endpoint → GitHub API: fetches user and repos
- Terminal UI → Contact Form: renders form
- Contact Form → Contact Endpoint: submits message
- Contact Endpoint → Resend Email: sends email
- Command Handler → Resume Endpoint: offers download
- Resume Endpoint → Resume PDF: reads PDF
- Visitor → Projects Page: opens
- Projects Page → Portfolio Access: reads projects
- Visitor → Blog Page: opens
- Blog Page → Portfolio Access: reads articles