How jethro-dev/personal-website works
Main Components Identification
• Frontend – App Pages:
• The app directory contains two key groups:
▪ The “(site)” folder houses public pages such as blogs and the main landing pages.
▪ The “(studio)” folder represents the admin interface (or studio) for managing content.
• Backend / API Actions:
• The “action” folder (with send-email.ts) indicates server-side actions, likely serving as API endpoints or utility tasks.
• Reusable UI Components:
• The components folder is rich with UI elements (e.g., blog cards, navbars, portfolio grids) and even a nested ui subfolder for styled components.
• CMS / Data Management:
• The schemas folder (with various schema files) and the lib folder (with sanity and utility modules) suggest integration with Sanity CMS for content management.
• Styling & Configuration:
• Global styles (globals.css, tailwind.config.ts) and configuration files (next.config.js, postcss.config.js, tsconfig.json) outline the project’s build and styling infrastructure.
• Other:
• Providers (like the theme provider) and hooks for state and effects add additional layers of client-side dynamism.
Identifying Relationships and Interactions
• The public site pages under app/(site) consume UI components from the components folder to render the layout, blog posts, and other content.
• The studio pages under app/(studio) are likely used by administrators and content creators, pulling schema definitions (from the schemas folder) and interacting with Sanity through the lib/sanity*.ts modules.
• The action folder’s email sending script interacts with server-side logic, potentially integrating with third-party email services.
• Configuration files and providers (e.g., theme-provider) define app-wide behaviors that affect both the public and studio components.
• Hooks and utilities provide cross-cutting solutions (e.g., useConfettiGradient) and maintain consistency across component interactions.
Architectural Patterns & Design Principles
• Component-Based Architecture: The project makes heavy use of reusable UI components for consistency and modularity.
• Separation of Concerns: There’s a clear separation between public pages and admin pages along with segregated routing (via folder grouping).
• CMS Integration: The Sanity CMS schemas indicate a headless CMS implementation where content management is abstracted from actual rendering.
• Server/Client Boundary: Using Next.js, there is a clear distinction between server-side actions (e.g., action/send-email.ts) and client-side interactivity (React components, hooks, and providers).
Including Relevant Technologies
• Next.js for rendering and routing.
• Sanity CMS (through sanity.cli.ts, sanity.config.ts, and schemas) for content management.
• Tailwind CSS for styling (tailwind.config.ts and globals.css).
• TypeScript for type safety (evidenced by tsconfig.json, .tsx files).
• ESLint and PostCSS for code and styling enforcement.