How dhruv-mavani/my-portfolio works
1. This repository is a small Next.js application built with the App Router. The core runtime boundary is the Next.js server/client split: page and layout files under app/ define the UI shell, while app/api/chat/route.ts defines a server-side HTTP endpoint.
2. The main user-facing surface is the root page at app/page.tsx, wrapped by app/layout.tsx. app/globals.css provides the global styling layer, so the visual architecture is centered on a single app shell rather than multiple feature pages.
3. The UI component structure is minimal and shared. src/components/Navbar.tsx is the only named reusable component in the tree, suggesting a lightweight top-level navigation/header that is imported into the page or layout rather than a large component ecosystem.
4. There is one explicit backend/API subsystem: app/api/chat/route.ts. In Next.js App Router terms, this is a request handler exposed as an HTTP route, likely used by the frontend to send chat messages and receive responses. That makes the app a combined frontend + serverless API project, not just a static site.
5. Static assets live in public/, which is a distinct delivery boundary from the app code. Two notable assets are public/resume.pdf and public/notion-pow.html, indicating the site serves downloadable or directly accessible documents alongside the main app UI.
6. The project has no separate database, queue, auth, or background worker directories in the tree. Architecturally, that suggests a thin application layer with state and processing either handled in-browser or inside the chat route handler rather than through external infrastructure managed in-repo.
7. The technology stack is standard Next.js + TypeScript. Supporting config files (next.config.ts, tsconfig.json, eslint.config.mjs, postcss.config.mjs) indicate conventional build, type-checking, linting, and CSS processing, but no unusual framework extensions are present.
8. The deployment model is the default Next.js one, likely suitable for Vercel or any Node-capable host. The chat API route would be deployed alongside the frontend as the same application, so there is a single deployable unit with mixed server and client responsibilities.
9. Data flow is probably straightforward: browser request loads the page, the page renders shared navigation and content, and any interactive chat behavior calls the /api/chat endpoint over HTTP. Static documents in public/ bypass application logic and are served directly.
10. From an architecture-diagram perspective, the main boxes are:
• Browser/UI client
• Next.js app shell (app/layout.tsx, app/page.tsx, src/components/Navbar.tsx)
• Serverless/API layer (app/api/chat/route.ts)
• Static asset bucket (public/)
11. The repository is small enough that the most important boundary is not between many internal modules, but between presentation, API handling, and static content delivery. That is the key separation to preserve in any diagram.
12. In short: this is a single Next.js app with one reusable UI component, one API endpoint for chat, and a couple of static documents exposed from public/. The architecture is intentionally simple and monolithic, with Next.js handling both frontend rendering and backend request handling in one codebase.
Main entry points: page.tsx Home page · layout.tsx Root layout · route.ts Chat route · tsconfig.json TypeScript config
Components 12
Client/UI
Browser-facing rendering and interaction
- Browser · Loads the app and calls the chat endpoint
- Root layout · Top-level document shell for the App Router
app/layout.tsx - Home page · Main user-facing landing view
app/page.tsx - Navbar · Reusable top-level navigation/header
src/components/Navbar.tsx - Global CSS · Shared global styling for the app
app/globals.css
Server/API
App Router request handling
- Chat route · Server-side API endpoint for chat requests
app/api/chat/route.ts
Static Assets
Files served directly from public/
- Resume PDF · Downloadable public PDF asset
public/resume.pdf - Notion page · Directly served public HTML document
public/notion-pow.html
Tooling
Build, type, lint, and style configuration
- Next config · Next.js runtime/build configuration
next.config.ts - TypeScript config · TypeScript project and path settings
tsconfig.json - ESLint config · Code quality rules and checks
eslint.config.mjs - PostCSS config · CSS processing pipeline configuration
postcss.config.mjs
Connections 14
- Browser → Root layout: loads · Initial app shell render
- Root layout → Home page: wraps · Root document shell wraps the home page
- Home page → Navbar: uses · Page composes the shared navigation component
- Root layout → Global CSS: imports · Global styles are applied at the app shell level
- Home page → Chat route: calls · Interactive chat flow sends requests to the API route
- Browser → Resume PDF: opens · Public asset can be downloaded directly
- Browser → Notion page: opens · Public HTML can be accessed directly
- Root layout → Next config: shaped by · Framework behavior is controlled by Next.js config
- Home page → TypeScript config: typed by · App code is compiled under the TypeScript setup
- Navbar → TypeScript config: typed by · Shared component participates in the same TS project
- Chat route → TypeScript config: typed by · Route handler is compiled with the same TypeScript settings
- Home page → ESLint config: linted by · UI code follows the repository lint rules
- Chat route → ESLint config: linted by · Server code follows the repository lint rules
- Global CSS → PostCSS config: processed by · CSS is processed through PostCSS