How arian81/portfolio works
Project Overview & Type
• The project is a personal website built with the T3 Stack (primarily Next.js, TypeScript, and TailwindCSS). It integrates components for displaying a blog, projects, and a resume.
• Additionally, the project uses Sanity as a headless CMS (visible in the sanity directory with schemas and client configuration) and includes a dedicated resume generation system (with LaTeX and resume sections).
Key Components
a. Client/Browser:
• Represents the end users visiting the website (arian.gg).
• Initiates requests which flow to the Next.js frontend.
b. Next.js Frontend:
• Pages & Routing: Located in the src/pages directory and hosting pages like index, blog, resume, projects, etc. Also includes API endpoints under src/pages/api.
• Components & UI: The src/components folder holds the React components (e.g., Header, Footer, Layout, blog & resume components) which make up the visual interface.
• Styling: TailwindCSS and additional CSS files in src/styles.
c. API / Serverless Functions:
• Found under src/pages/api (e.g., lc.tsx and og.tsx) providing backend utilities for dynamic content or image generation.
• Acts as a serverless layer within the Next.js environment.
d. Sanity CMS Integration:
• Managed in the sanity directory (sanity.config.ts, sanity.cli.ts, schemas). Contains schemas for blog posts, projects, technologies, etc.
• Responsible for storing and serving dynamic content that is consumed by the frontend.
• The sanity/lib contains client and image-handling utilities, demonstrating abstraction for external data retrieval.
e. Resume Generation System:
• The resume directory holds LaTeX source files, styling, and built PDFs.
• The scripts folder (scripts/generate-resume-data.ts) indicates a build/automation process for generating or updating resume data. It suggests the resume information might be dynamically extracted and rendered.
f. Public Assets & External Resources:
• The public folder holds static assets (images, site manifest, and other media files) delivered directly to the client.
• External visual assets and logos are used throughout the components (found in src/logos and src/lotties for animations).
Relationships and Data Flow
• Users (Browsers) request the website, and the Next.js frontend responds with static and server-rendered pages.
• The frontend communicates with the Sanity CMS to retrieve content via the configured client in the sanity/lib.
• API routes in the Next.js application (serverless functions) handle auxiliary tasks such as dynamic image generation or other data fetching.
• The resume generation system uses static LaTeX files and custom scripts to output a downloadable PDF resume, which is then served as part of the website’s content.
• Deployment is managed via Vercel (as evidenced by the vercel.json), which orchestrates build commands, API endpoint execution, and frontend rendering.
Architectural Patterns & Design Principles
• Separation of Concerns: The project divides its functionality between user interface (Next.js pages and React components), content management (Sanity CMS), and specialized resume processing (LaTeX and custom scripts).
• Component-driven Design: The extensive use of React components under src/components indicates a reusable, modular UI architecture.
• Serverless Pattern: Next.js API routes implement serverless functions enhancing scalability and reducing the need for a dedicated backend server.
Additional Elements
• Configuration and Deployment: Briefly include blocks representing the build/deployment process (notably PNPM commands, Vercel deployment, and configuration files like next.config.mjs, tsconfig.json, etc.).