How rezaageng/me works
Project type and purpose
• This is a full-stack portfolio website that showcases creative work, built using Next.js. It focuses on a visually engaging, interactive experience with animations (via Framer Motion and Lenis) and responsive design (via Tailwind CSS).
• The README highlights that the website is a “canvas where pixels come alive” and integrates with an external API (by default, Strapi).
And segment the file structure
• Notice the separation between project concerns:
• The /app directory under src contains Next.js pages, API endpoints, and routing logic.
• The /components directory includes all reusable UI pieces (home, about, terminal, navbar, etc.), which indicate a well-modularized front-end.
• The /ssg folder indicates a static site generation (SSG) approach which likely pre-builds some parts of the site.
• The /graphql and /libs directories encapsulate external integrations and helper utilities, such as Apollo Client configuration and GraphQL queries.
• Extensive testing folders hint at robust test coverage and component isolation.
• Build and configuration files (like next.config.mjs, tailwind.config.js, tsconfig.json) that anchor the project’s technical stack.
Main components to capture
a. Client/Browser:
• End-user accessing the website, with support for the “Kawaii Mode” toggled via URL parameters.
b. Next.js Frontend:
• Next.js application divided into UI components (found in the /components and /app directories).
• Pages like Home, About, Projects, etc., and note the layout system (layout.tsx, globals.css) and the use of dynamic routing for projects ([slug] pages).
• How static generation (SSG) and API routes (in /app/api) are used to fetch and serve dynamic content.
c. API Routes (Backend Layer within Next.js):
• API endpoints under /app/api (e.g., for educations, experiences, home, etc.), which are used to interface with both internal logic and the external API.
d. External API Integration:
• Integration with third-party services like GitHub API (through stored tokens) and Wakatime.
e. GraphQL Layer:
• GraphQL integration as part of the data fetching architecture (see /graphql/github-gql.ts, leetcode-gql.ts) that pulls in external data.
f. State Management and Helpers:
• Summarize the client-side state management (e.g., terminal-store and kawaii-store) and utility functions (helpers, libs) that support the main interactive features.
Relationships and interactions between components
• From the Client’s browser, requests hit the Next.js server for pre-rendered pages and interactive components.
• API routes receive requests and may themselves call external APIs (Strapi) for dynamic data.
• SSG components at build time fetch and incorporate data from external sources (GraphQL or REST endpoints) into static content.
• Internal state management sits on the client side to manage UI interactions such as terminal commands and dynamic animations.
• That some components also interact with the external API asynchronously for real-time data updates.
Important architectural patterns and technologies
• Separation of concerns with distinct layers (presentation, API, data fetching).
• Use of modern frontend patterns such as component-based design (React components), static and server-side rendering, and API integration.
• Integrations: Next.js for SSR/SSG, Tailwind CSS for styling, Framer Motion for animations, and Lenis for smooth scrolling.
• Test-driven approach with comprehensive __tests__ and __mocks__ folders ensuring reliability.
• Clear labels for each component (e.g., "Home Page", "API Endpoint: /educations", "GraphQL Github Integration").
• Annotations for notable design choices such as SSG, and how routes in Next.js are structured (make special notes of the dynamic project routing and API integrations).