How shaafshahzad/portfolio works
This repository is a small, content-driven Next.js portfolio site built with the App Router. It is primarily a front-end application with no obvious custom backend, API layer, or database. Most of the “application data” lives in TypeScript modules checked into the repo, which makes the site effectively a statically defined personal website.
Main architectural layers:
1. Route and page layer
• The app/ directory defines the site’s routes.
• app/page.tsx is the home page.
• app/projects/page.tsx is the projects listing page.
• app/resume/page.tsx is the resume page.
• app/layout.tsx provides the shared top-level shell for all routes.
This means navigation is organized by route segments rather than a separate router configuration file.
2. Shared UI component layer
• components/Navbar.tsx is the global navigation.
• components/Footer.tsx is the site-wide footer.
• components/Sidebar.tsx suggests a secondary navigation or layout helper, likely used on some pages or for responsive layout.
• components/Project.tsx is the reusable project card/detail component.
These components are the main presentation building blocks reused across pages.
3. Content/data layer
• lib/completedProjects.ts
• lib/ongoingProjects.ts
These files likely export arrays or structured objects describing portfolio projects. The project pages probably consume this data and render it through Project.tsx. This is a key architectural boundary: project content is separated from UI rendering, but it still lives in the codebase rather than an external CMS.
4. Cross-cutting concerns
• app/_analytics/provider.tsx indicates an analytics integration wrapped into the app shell, likely initialized near the root layout so page views can be tracked across routes.
• app/globals.css contains global styles.
• tailwind.config.ts and postcss.config.js indicate Tailwind CSS is the primary styling system, with PostCSS in the build pipeline.
• next.config.js, tsconfig.json, and .eslintrc.json define build/runtime, TypeScript, and linting behavior.
5. Static asset layer
• public/ShaafShahzadResume2024.pdf is a directly served static file used by the resume page or linked from navigation.
• The public/ directory is the normal Next.js static asset boundary.
Important data flow:
• A request enters one of the route pages under app/.
• app/layout.tsx wraps the route with shared structure such as navigation, footer, and any analytics/provider setup.
• Pages import reusable UI from components/.
• Project pages pull structured content from lib/ and pass it into components/Project.tsx.
• The resume page likely links to or embeds the PDF from public/.
• Styling is applied through Tailwind classes and global CSS.
Technologies that materially shape the architecture:
• Next.js App Router for route-based composition and shared layouts.
• React components for UI reuse.
• TypeScript for typed content and component contracts.
• Tailwind CSS for utility-first styling.
• Vercel is the intended deployment target according to the README, which fits a mostly static, file-based portfolio site.
In diagram terms, this repo is best represented as:
• A root layout/shell
• Three primary content routes
• A shared component library
• Static typed content modules for projects
• A static assets area for the resume PDF
• A lightweight analytics cross-cutting layer
Main entry points: layout.tsx Root shell · page.tsx Projects · Navbar.tsx Navbar · Project.tsx Project
Components 18
Routes
App Router pages and shared shell
- Root shell · Shared application wrapper for all routes
app/layout.tsx - Home · Landing page
app/page.tsx - Projects · Projects listing page
app/projects/page.tsx - Resume · Resume page
app/resume/page.tsx
UI
Reusable presentation components
Content
Typed portfolio data modules
Cross-cutting
Analytics and global styling
- Analytics · Analytics wrapper
app/_analytics/provider.tsx - Global CSS · Application-wide styles
app/globals.css
Config
Build and toolchain settings
- Next config · Next.js runtime/build settings
next.config.js - Tailwind · Tailwind CSS configuration
tailwind.config.ts - PostCSS · PostCSS pipeline configuration
postcss.config.js - TS config · TypeScript compiler settings
tsconfig.json - ESLint · Linting rules
.eslintrc.json
Connections 26
- Root shell → Navbar: includes · Shared shell renders site navigation
- Root shell → Footer: includes · Shared shell renders site footer
- Root shell → Analytics: wraps · Analytics is initialized at the root
- Root shell → Global CSS: imports · Root layout applies global styles
- Root shell → Home: hosts · Layout wraps the home route
- Root shell → Projects: hosts · Layout wraps the projects route
- Root shell → Resume: hosts · Layout wraps the resume route
- Home → Project: may reuse · Home page can reuse shared project rendering
- Projects → Completed: reads · Projects page consumes completed project content
- Projects → Ongoing: reads · Projects page consumes ongoing project content
- Projects → Project: renders · Projects are displayed through the reusable card
- Resume → Resume PDF: links · Resume page references the static PDF
- Navbar → Home: navigates · Global navigation links to home
- Navbar → Projects: navigates · Global navigation links to projects
- Navbar → Resume: navigates · Global navigation links to resume
- Sidebar → Projects: supports · Secondary navigation may surface project routes
- Sidebar → Resume: supports · Secondary navigation may surface resume route
- Completed → Project: feeds · Project data is passed into the card component
- Ongoing → Project: feeds · Project data is passed into the card component
- Tailwind → Global CSS: drives · Tailwind utilities are composed with global CSS
- PostCSS → Tailwind: enables · PostCSS pipeline supports Tailwind processing
- Next config → Root shell: configures · Next.js config shapes the app runtime
- TS config → Root shell: types · TypeScript settings apply across the app
- ESLint → Root shell: governs · Linting applies to application source
- ESLint → Navbar: governs · Linting applies to UI components
- ESLint → Project: governs · Linting applies to UI components