How raullize/my-personal-portfolio works
Project Type and Purpose
• This is a Next.js–based personal portfolio website (a frontend-centric full-stack application with server-side rendering and static-site generation).
• It showcases the developer’s bio, projects, timeline, language toggle (i18n), and provides downloadable resumes.
Main Components
a. Next.js Server & Routing
• layout.jsx & page.jsx under /app define the root layout and the homepage route.
• Next’s file-based routing mechanism automatically exposes these routes.
b. React UI Components
• /app/components: Leaf components (About, Contact, Footer, Header, etc.)
• /app/components/ui: Reusable UI primitives (FadeIn, GradientText, LoadingScreen, ProjectCard, ClickSpark, SmoothScroll, etc.)
c. Internationalization (i18n)
• /app/i18n/en.json & pt.json: translation dictionaries
• useTranslation.js + useLanguage.js hook manage language state and text injection.
d. Styling
• Tailwind CSS configured via tailwind.config.js, imported in globals.css.
• PostCSS pipeline via postcss.config.js
e. Static Assets
f. Build & Config
• next.config.mjs: Next.js custom configuration (e.g., image domains, i18n settings).
• package.json, package-lock.json, jsconfig.json, eslint.config.mjs for tooling and IDE support.
Relationships & Data Flow
• User’s Browser → HTTP Request → Next.js Server
• Server decides SSR vs. static generation → renders React components
• Components fetch translations from /app/i18n via hook
• Tailwind-generated CSS & bundled JS served
• Static assets served from /public
• Client-Side Interactions
• Language toggle triggers useLanguage → updates translations on the fly
• Smooth scroll, fade-ins and other UI effects handled client-side in the primitives
Architectural Patterns & Principles
• Component-Based Architecture: clean separation between “dumb” UI primitives and “smart” page-level components
• File-Based Routing (Next.js “app” directory)
• Utility-First CSS (Tailwind) for rapid, consistent styling
• Hook-Driven State & Effects (custom hooks for i18n)
• Static-First with SSR/SSG for performance and SEO