How md-tuhin-hasnat/portfolio-v2 works
This is a Next.js portfolio site with public pages for a personal profile, skills, achievements, education, projects, and work, programming, and volunteering experience. Visitors can also ask questions about the portfolio through an AI chat. An admin can edit portfolio content, which the client loads and saves through API routes backed by MongoDB. The graph shows these documented page, chat, and editing flows; some page components and the admin panel were not sampled, so their internal behavior is not expanded.
Main entry points: portfolio-context.tsx Portfolio Context · route.ts Portfolio API · app/page.tsx Profile Page · education/page.tsx Education Page
Components 21
Public Portfolio
- Profile Page
app/page.tsx - Profile Sections
components/custom/about-me - Education Page
app/education/page.tsx - Education Content
components/custom/education/education-content.tsx - Experience Page
app/experience/page.tsx - Experience Views
components/custom/experiences - Projects Page
app/projects/page.tsx - Projects Content
components/custom/projects/projects-content.tsx
AI Assistant
- Ask AI Page
app/askai/page.tsx - Chat Interface
components/chat.tsx - Answer Flow
ai/flows/answer-question-with-context.ts - Genkit Setup
ai/genkit.ts
Portfolio Editing
- Admin Panel
components/custom/admin/admin-panel.tsx - Editable Sections
components/custom/admin/editable-section.tsx - Portfolio Context
components/custom/admin/portfolio-context.tsx - Auth API
app/api/auth/route.ts
Persistence
- Portfolio API
app/api/portfolio/route.ts - Portfolio Model
models/Portfolio.ts - MongoDB
lib/mongodb.ts
Other components
- Visitor
- Admin
Connections 19
- Visitor → Profile Page: views
- Profile Page → Profile Sections: renders
app/page.tsx - Visitor → Education Page: views
- Education Page → Education Content: renders
app/education/page.tsx - Visitor → Experience Page: views
- Experience Page → Experience Views: renders
app/experience/page.tsx - Visitor → Projects Page: views
- Projects Page → Projects Content: renders
app/projects/page.tsx - Visitor → Ask AI Page: asks
- Ask AI Page → Chat Interface: renders
app/askai/page.tsx - Chat Interface → Answer Flow: sends question
components/chat.tsx - Answer Flow → Genkit Setup: defines prompt
ai/flows/answer-question-with-context.ts - Admin → Admin Panel: edits
- Admin Panel → Portfolio Context: uses context
- Editable Sections → Portfolio Context: uses context
components/custom/experiences/timeline.tsx - Portfolio Context → Auth API: checks status
components/custom/admin/portfolio-context.tsx - Portfolio Context → Portfolio API: loads and saves
components/custom/admin/portfolio-context.tsx - Portfolio API → MongoDB: connects
app/api/portfolio/route.ts - Portfolio API → Portfolio Model: reads and writes
app/api/portfolio/route.ts