Directory overview
The project follows a clean, modular structure optimized for performance and maintainability:Key directories
/public directory
Contains all static assets that are served directly without processing:
CV API endpoints
XML, JSON, and TXT versions of the CV for programmatic access
PDF resumes
Downloadable CV files in three languages (English, Spanish, Basque)
Images
Optimized images in WebP format for fast loading
SEO files
sitemap.xml, robots.txt, and Open Graph images
Files in
/public are served at the root path. For example, public/cv.xml is accessible at /cv.xml./src/components directory
Modular, self-contained React components with clear responsibilities:
Header.tsx
Header.tsx
Fixed navigation header with:
- Language switcher (ES/EN/EU)
- Social links (GitHub, LinkedIn, Email)
- Scroll-based background opacity transition
- Accessibility attributes for screen readers
Hero.tsx
Hero.tsx
Full-screen hero section with:
- GSAP character-by-character text animation
- ScrollTrigger parallax effect
- useLayoutEffect for FOUC prevention
- Download CV buttons with language-specific PDFs
InteractiveCanvas.tsx
InteractiveCanvas.tsx
HTML5 Canvas background animation with:
- 100 floating particles with random motion
- requestAnimationFrame loop for 60fps
- Memory leak prevention on unmount
Intro.tsx
Intro.tsx
Introduction section with:
- IntersectionObserver reveal animations
- Feature cards with icons
- Responsive grid layout
Experience.tsx
Experience.tsx
Work experience and education timeline with:
- Vertical timeline with dots
- Staggered reveal animations
- Hover effects on timeline items
Stack.tsx
Stack.tsx
Technology stack grid with:
- Icon loading from Devicon CDN
- Grayscale to color on hover
- Responsive columns (2/3/5)
- Intersection Observer for staggered reveals
Projects.tsx
Projects.tsx
Project showcase with:
- Horizontal scrolling gallery (29KB component)
- Detailed modal views
- GitHub API integration
- Scroll indicators
Stats.tsx
Stats.tsx
GitHub statistics with:
- Contribution calendar using react-github-calendar
- Activity metrics
- Responsive layout
ApiSection.tsx
ApiSection.tsx
Public API showcase with:
- Terminal-style UI
- Copy-to-clipboard functionality
- Example curl command
Contact.tsx
Contact.tsx
Contact section with:
- Social CTA buttons
- Inverted color scheme on hover
- Email and LinkedIn links
Footer.tsx
Footer.tsx
/src/context directory
Global state management using React Context:
LanguageContext.tsx (308 lines)
Provides internationalization functionality:
- Language state (en/es/eu)
- Translation function with parameter interpolation
- Complete translation objects for all three languages
- Dynamic SEO metadata updates
- Automatic
html[lang]attribute management
Key files
Entry points
src/main.tsx
Application entry point that:
- Imports global CSS
- Renders the root React component
- Mounts to the DOM element with id “root”
src/main.tsx
src/App.tsx
Main application component (90 lines) that:
- Sets up Lenis smooth scrolling
- Registers GSAP plugins (ScrollTrigger)
- Implements lazy loading with React.lazy() and Suspense
- Manages interaction-triggered loading with
loadReststate - Integrates analytics (Vercel, Microsoft Clarity)
src/App.tsx (excerpt)
Configuration files
vite.config.ts
Vite build configuration (47 lines) with:
- React plugin for Fast Refresh
- Tailwind CSS v4 integration
- CSS injection plugin for Tailwind v4 compatibility
- Terser minification (removes console and debugger)
- Manual chunks for vendor code splitting
- Path aliases (
@points to root) - HMR control via environment variable
vite.config.ts
package.json
Defines project metadata, dependencies, and scripts:
package.json
The
dev script binds to 0.0.0.0 to allow network access from other devices (mobile testing).tsconfig.json
TypeScript compiler configuration with:
- Target: ES2020
- Module: ESNext
- Strict mode enabled
- React JSX runtime
- Path resolution for
@alias
Component loading strategy
Components are split into two groups:Immediately loaded (critical path)
InteractiveCanvas
Background animation for visual appeal
Header
Navigation and language switcher
Hero
First screen with animated title
Lazy loaded (deferred)
All other components are loaded after:- User interaction (scroll, mousemove, touchstart)
- OR 2.5 second timeout
Build output
After runningnpm run build, the dist/ directory contains:
Next steps
Performance optimization
Learn about lazy loading, code splitting, and Core Web Vitals optimization
Animation system
Understand GSAP implementation and ScrollTrigger integration
Components
Explore individual component implementations
Customization
Learn how to customize the portfolio for your own use
