How deibyrayo/portfolio works
Project Type and Purpose
• This is a single-page, component-driven portfolio web application built with Next.js (App Router), showcasing interactive 3D and canvas effects using Three.js and Framer Motion, styled via Tailwind CSS. It’s primarily a frontend-centric project with light server-side/static rendering responsibilities.
File Structure Analysis
• app/ – Next.js 13 App Router directory. Contains server and client components:
• layout.tsx, globals.css, global-error.tsx – global wrappers and styling
• page.tsx – root landing page
• provider.tsx – context or state provider at app level
• components/ – React UI building blocks, subdivided into:
• top-level UI (Hero, Footer, Grid, etc.)
• ui/ – low-level, reusable primitives (3d-pin, MagicButton, CanvasRevealEffect, Globe, etc.)
• data/ – static JSON assets and index.ts exporting content (confetti.json, globe.json).
• lib/ – utility functions (utils.ts).
• public/ – static assets (images, fonts).
• instrumentation.ts + **sentry.*.config.ts** – application monitoring/tracing with Sentry.
• Config files – next.config.mjs, postcss.config.mjs, tailwind.config.ts, tsconfig.json.
Key Architectural Insights from README
• UI is assembled from independent React/Next.js components.
• Heavy use of Three.js for 3D, Framer Motion for animation.
• Styled with Tailwind; site supports server-side rendering (SSR) and static generation.
• No separate backend API—data is local/static.
Main Components
a. Browser (Client)
b. Next.js Application (Server-Side/Host)
• App Router (app/)
• Components Layer (components/, components/ui/)
• Data Layer (data/)
• Utility Layer (lib/)
• Monitoring (instrumentation.ts + Sentry configs)
c. Static Assets CDN (public/)
d. External Services
• Sentry (Error/Performance Monitoring)
• (Optional) Vercel or Hosting Provider for deployment
Relationships & Data Flow
• User → Browser: interacts with UI components (Hero, Grid, Footer, 3D Globe)
• Browser ↔ Next.js Server:
• Initial HTML (SSR/SSG) delivered
• Subsequent client hydration loads React, Three.js, Framer Motion bundles
• Static JSON data fetched from /_next/static or imported at build time
• Next.js Server ↔ CDN: serves static assets (images, fonts, confetti.json, globe.json)
• App ↔ Sentry: instrumentation.ts sends logs/metrics to Sentry endpoints
Architectural Patterns & Design Principles
• Component-Based Architecture: reusable building blocks under components/ui
• Feature-Based Grouping: grouping by feature (Hero, Approach, Experience)
• File-Based Routing via Next.js App Router
• Server/Client Components: Next.js 13 automatic segregation
• Static-First Approach: most data is static, reducing API complexity