How cattyman919/portfolio works
Main Components
• User Browser: The client that accesses the website.
• Next.js Application: Your overall application logic which includes server-side rendering (and/or static site generation) as well as client-side interactivity.
• UI / Presentation Layer: This is represented by the “src/app” directory which includes layout files (layout.tsx, globals.css, loading.tsx, page.tsx) and subdirectories like “_sections” that hold various parts of the portfolio (home, experience, projects, skills, etc.).
• Reusable Components: Under “src/app/_sections/_components”, you have dedicated components for experience cards, project modals, skills, navbar elements, etc. This layer handles the UI logic for each specific section.
• Data and Types: Data is maintained in the “src/app/_sections/_data” folder and the corresponding TypeScript type definitions in “src/app/_sections/_types”. These modules are essential for ensuring consistency between the dynamic content and its representation.
• Public Assets: The “public” folder holds static resources including images (for experiences and skills) and any other public static files.
• Configuration and Utility Files: Files like next.config.ts, tailwind.config.ts, postcss.config.mjs, and package.json define environment configurations, dependencies, and build settings. Additionally, the “lib” directory (with file like apollo-client.ts) may provide utility functions or support integration with external APIs or libraries if needed (even if it isn’t heavily used in the core UI).
Interactions and Relationships
• Directional Data Flow: Start with the User Browser, which makes HTTP requests to the Next.js application.
• The Next.js server (or build process for static deployment) references the “src/app” folder to determine routing and rendering.
• Each page in “src/app” (like home, projects, skills) uses multiple components from the “_sections/_components” folder.
• These components pull in static data (from “_data”) and type definitions (from “_types”) to render dynamic content.
• Static assets from the “public” directory are served directly to the browser to support the visual presentation (images, CSS from build.css, etc.).
Architectural Patterns and Design Principles
• Component-Based Design: The project is clearly organized as a component-based React/Next.js application. By splitting the UI into reusable components (cards, modals, nav elements), the architecture supports modularity and maintainability.
• Separation of Concerns: Data, UI components, styles, and configurations are kept in separate directories, emphasizing clear separation of responsibilities.
• Next.js Routing and Layout: The “src/app” structure leverages Next.js routing conventions along with global layout files, enabling efficient navigation and potentially server-side rendering.
Technologies and Their Roles
• Next.js & React: Core framework and UI library to build interactive and SEO-friendly web pages.
• Tailwind CSS: Provides responsive design and utility classes, ensuring the UI is modern and consistent.
• TypeScript: Enhances code maintainability and correctness, which you see in various type definitions and config files like tsconfig.json.
• (Optional) Apollo Client: Although a single file is visible in “lib”, if used, it may be intended for data fetching via GraphQL, which can be marked as an integration point for external data or CMS.