How samarthshukla20/portfolio works
This repository is a small Next.js App Router site, likely a personal portfolio or showcase, with a clear route-per-section structure and a shared visual shell.
1. Top-level architecture
- The app is built with Next.js using the app/ directory.
- Routing is file-based: each folder under app/ becomes a route segment.
- There is no visible backend, database, or API layer in the tree; the architecture is primarily static/UI-driven.
2. Root application shell
- app/layout.js defines the shared page frame used across all routes.
- app/globals.css provides global styling applied site-wide.
- This is the main cross-cutting layer for typography, spacing, and overall layout behavior.
3. Landing page
- app/page.js is the home route (/).
- This is the entry point for the site and likely ties together the main visual identity and navigation to the other sections.
4. Section-based routes
- The app has four dedicated top-level content areas:
- app/projects/page.js → /projects
- app/hackathons/page.js → /hackathons
- app/network/page.js → /network
- app/tech/page.js → /tech
- These are separate presentation routes rather than nested API or domain layers, which suggests a content/portfolio structure organized by topic.
5. Shared UI components
- components/ contains reusable building blocks used by multiple pages.
- components/loader.js is likely a loading/transition UI used while heavier assets or interactive content initialize.
- components/computer.js is a specialized visual component, probably the most complex shared UI element in the repo.
6. 3D or media asset pipeline
- public/models/computer.glb is a static model asset served directly by Next.js.
- The computer.js component likely loads and renders this model, which means the app has a client-side interactive/media boundary around that feature.
- This is the only non-code asset visible, and it appears to support a centerpiece visual on the site.
7. Data flow
- Browser requests a route like /projects.
- Next.js resolves the corresponding app/.../page.js.
- The page composes shared layout/UI from layout.js, components/, and static assets from public/.
- If the 3D model is used, the browser fetches computer.glb from /public/models/ at runtime.
8. Interaction boundary
- Most pages are likely simple content pages, while the computer component is the main candidate for client-side interactivity and performance-sensitive rendering.
- That means the architecture has a lightweight static/content layer plus one heavier visual subsystem.
9. Styling and build tooling
- The repo includes postcss.config.mjs, eslint.config.mjs, and next.config.mjs, indicating standard Next.js build/lint tooling.
- jsconfig.json suggests path aliasing or editor/runtime resolution support.
- The README references next/font and Geist, so font loading is handled through Next.js rather than manual CSS imports.
10. Deployment/runtime shape
- This is a web app intended to run in the browser and be deployed as a Next.js application, with Vercel being the default deployment target.
- No custom server process is visible, so the deployment model is the typical Next.js-managed runtime/static hosting setup.
11. What to draw in an architecture diagram
- Draw one central Next.js app layer containing:
- root layout
- global styles
- route pages
- shared components
- Draw a separate static assets boundary for public/models/computer.glb.
- Show the computer component as the bridge between UI code and the 3D asset.
- Show the four content routes as sibling pages under the app router.
12. Overall characterization
- This is a content-focused, multi-section Next.js site with a shared shell and one standout interactive asset path.
- The architecture is intentionally simple: route-driven pages, reusable components, and static public assets, with no visible service-tier complexity.
Main entry points: layout.js Root layout · page.js Home · loader.js Loader · computer.js Computer
Components 15
Next.js app
App Router routes and shared shell
- Root layout · Shared page frame for all routes
app/layout.js - Global CSS · Application-wide styling layer
app/globals.css - Home · Landing route for the site
app/page.js - Projects · Projects section route
app/projects/page.js - Hackathons · Hackathons section route
app/hackathons/page.js - Network · Network section route
app/network/page.js - Tech · Tech section route
app/tech/page.js
Shared UI
Reusable visual components
Static assets
Public files served at runtime
- Computer GLB · Static 3D model consumed at runtime
public/models/computer.glb
Tooling
Build, lint, and config files
- Next config · Next.js framework configuration
next.config.mjs - PostCSS · CSS processing configuration
postcss.config.mjs - ESLint · Code quality and linting setup
eslint.config.mjs - JS config · Path and language resolution settings
jsconfig.json - README · Project overview and usage notes
README.md
Connections 18
- Root layout → Global CSS: applies · Global styles are loaded by the shared shell
- Home → Root layout: uses · Home route renders within the root layout
- Projects → Root layout: uses · Section route renders within the root layout
- Hackathons → Root layout: uses · Section route renders within the root layout
- Network → Root layout: uses · Section route renders within the root layout
- Tech → Root layout: uses · Section route renders within the root layout
- Home → Computer: may embed · Landing page likely includes the centerpiece visual component
- Projects → Loader: may use · Route pages can share loading UI
- Hackathons → Loader: may use · Route pages can share loading UI
- Network → Loader: may use · Route pages can share loading UI
- Tech → Loader: may use · Route pages can share loading UI
- Computer → Computer GLB: loads · 3D component bridges code and static model asset
- Computer → Loader: coordinates · Interactive visual may show loading state while asset initializes
- Next config → Home: supports · Framework config supports app runtime and build
- PostCSS → Global CSS: processes · CSS toolchain supports global styles
- ESLint → Home: checks · Linting applies across app code
- JS config → Computer: resolves · Editor/runtime path resolution supports components
- README → Home: describes · Documentation covers the app structure and usage