How sarmad259/portfolio works
Project Type & Purpose
• This is a Next.js 13 “app-router” frontend application that renders a chat-style UI to display GitHub and LinkedIn data.
• It syncs with the v0.dev platform (your chat builder), pushes code into this GitHub repo, and is automatically built & deployed on Vercel.
File-Structure Analysis
• app/
• layout.tsx, page.tsx, globals.css → Next.js “app”-directory entry points and global CSS.
• components/
• theme-provider.tsx → top-level ThemeContext wrapper.
• ui/… → 40+ reusable UI primitives (buttons, cards, dialogs, etc.)
• hooks/ → custom React hooks (useMobile, useToast)
• lib/utils.ts → shared helper functions
• public/images → static assets
• styles/, tailwind.config.ts, postcss.config.mjs → styling stack (TailwindCSS)
• next.config.mjs, tsconfig.json, package.json, pnpm-lock.yaml → build & config files
README Insights
• Explains the automatic GitHub sync triggered by changes in v0.dev.
• Mentions Vercel deployment and live URL.
• No in-repo backend—data fetching likely occurs client-side or via v0.dev APIs embedded in page.tsx.
a. Frontend (blue)
• Next.js app (app/layout.tsx & app/page.tsx)
• UI Library (components/ui)
• Custom hooks (hooks/)
• Client browser environment
b. External Services (orange)
• v0.dev chat & sync service
• GitHub API (to fetch repos, commits, stars, etc.)
• LinkedIn API (to fetch profile, posts)
c. CI/CD & Version Control (green)
• GitHub repository
• Vercel build & deployment platform
Component Relationships & Data Flow
• Developer → (push) → GitHub Repo
• GitHub → (webhook) → Vercel → (build & deploy) → Live Next.js App
• User Browser ↔ Next.js Frontend (SSR/CSR)
• Next.js Frontend → (HTTP REST/GraphQL) → GitHub API & LinkedIn API
• Next.js Frontend ↔ v0.dev Service (for real-time chat UI & sync)
Architectural Patterns & Design Principles
• “Separation of concerns”:
• Presentation (components/ui) vs. data hooks (hooks/) vs. page/layout (app/)
• CSS-in-JS + Tailwind combination for utility-first styling
• CI/CD pipeline connecting v0.dev → GitHub → Vercel for automated deploys