How imartindav/nextportfolio works
Main Components
• Frontend Client: Represent the Next.js client running in user browsers. This includes pages built using the new Next.js App Router (the “app” directory with pages like home, about, resume, etc.) and rich UI components distributed under the “components” folder.
• Backend/API Layer: Although it’s all part of the Next.js framework, note the dedicated API routes in the “app/api” directory (e.g., routes for fetching GitHub stars, project posts, Umami stats/events). These endpoints encapsulate server-side logic and serve data to the UI.
• Component & UI Library: Highlight the extensive set of UI and animation components (in “components”, with subdivisions for About, Home, Projects, Resume, and “components/ui”) that provide the building blocks for the application’s pages.
• Utility & Data Layer: Include the “lib” directory that contains helper methods such as data fetchers, SEO metadata templates, and other utility functions used across the project.
• External Integrations/Services: Represent connections to third-party services like GitHub, Umami Analytics, PDF rendering tools, and the adjacent “projects.imartin.dev” instance used for detailed project showcases and blog content.
Out Relationships and Data Flow
• From the Next.js Server, branch into two main flows:
• The Page Routing Flow: Show how the “app” directory routes (layout.tsx, page.tsx, and sub-pages like about, resume, worldwide-reach) render components that call shared libraries (lib) and utilize UI components.
• Internal interactions, such as how the UI components call functions from the utilities (“lib”) and how SEO components in “components/SEO” help populate metadata dynamically.
Architectural Patterns and Technology Stack
• That the project leverages the Next.js App Router and React Server Components, so separate client-side interactive components from server-rendered content.
• That styles are handled with TailwindCSS and that UI accessibility is enhanced using Radix UI as well as interactive animations using Framer Motion and custom “magicui” components.
• Mention the integration of performance optimizations (Turbopack, optimized asset loading) and real-time analytics via Umami.
• Frontend (pages, UI components)
• Server/API layer (Next.js API routes)
• External integrations (GitHub, Umami, projects.imartin.dev)
• Shared libraries and utilities
Specific Elements
• Clear labels: Ensure every component (e.g., “Home Page (app/page.tsx)”, “About Section (components/About/*)”, “GitHub Stars API (app/api/fetch-github-stars/route.ts)”) is clearly marked.