How aashishthakuri/3d-portfolio works
Project type and purpose
• This is a full-stack, server-side-rendered (SSR) React application built with Next.js (v13+ using the “app” directory).
• It appears to be a personal/portfolio site: it renders pages, a 3D scene, project cards, a contact form, and uses optimized fonts.
File structure
• Top-level folders:
• app/ – the Next.js “app router” source code (pages, layout, React components).
• public/ – static assets (images, media).
• dist/ – build artifacts: client bundles, server bundles, static chunks, manifests.
• src/app/ – duplicate or legacy source (could be unused; verify if this is shadowed by app/).
• Config files: next.config.js, tsconfig.json, tailwind.config.ts, postcss.config.mjs, eslint.config.mjs, vercel.json.
• Package.json and lock file for dependency management.
README for additional insights
• Bootstrapped via Create Next App.
• Uses next/font for automatic font optimization.
• Deploys on Vercel, implying serverless functions / edge network.
Main components
a. Source Code (Git repository)
• Directories: app/, public/, next.config.js, Tailwind/PostCSS configs, tsconfig.json.
b. Build Pipeline
• Next.js build process
• Webpack (client-side bundles, server-side bundles)
• next/font optimization
c. Deployment Infrastructure
• Vercel Platform
• CDN / Edge Network
• Serverless Functions or Edge Functions for SSR
d. Runtime Components
• Browser (client)
• React components (ThreeScene, ProjectCard, ContactForm)
• Static assets (images, CSS) served from CDN
• Next.js Serverless / Edge Functions
• SSR / SSG page rendering
• Build manifests and routing
e. External Services
• Vercel font hosting (Geist font)
• Any analytics or third-party scripts (if present)
Relationships and Interactions
• Developer pushes code → Git → Vercel CI/CD triggers Next.js build
• Build output:
• Client bundles → uploaded to CDN
• Server bundles → deployed as serverless/edge functions
• Manifests (build-manifest.json, app-build-manifest.json) for runtime routing
• User requests URL in browser → DNS → Vercel CDN (static assets) or Edge Function (SSR)
• Edge Function executes Next.js server bundle → renders React tree → returns HTML + JS + CSS
• Browser hydrates React components, loads Three.js scene, ContactForm, etc.
Architectural patterns and design principles
• Monorepo-style source, single Next.js application (not microservices)
• Universal rendering: SSR + client hydration
• Code splitting via Webpack, dynamic imports if used
• File-based routing (app/router)
• Static asset optimization (next/font, automatic image optimization if used)
• Tailwind CSS for utility-first styling
• Both client and server bundles and their flow into deployment
• Clearly label SSR vs. static asset serving
• How the 3D scene and dynamic components load in the browser
• Keep it detailed but focused on these architectural elements—don’t overcomplicate with unrelated infrastructure