Introduction
The Drakk3 Portfolio is a single-page portfolio site built with modern web technologies that prioritize performance and developer experience. The architecture leverages Astro’s islands architecture to deliver a fast, static site with strategic client-side interactivity.Technology Stack
Astro 6
Static site generator with islands architecture for optimal performance
React 19
Interactive components with modern React features (useTransition, etc.)
Tailwind CSS v4
Utility-first styling with native Vite plugin configuration
shadcn/ui
Accessible, customizable component primitives
Project Structure
The project follows a clean, organized directory layout:Astro Islands Architecture
Islands Architecture is a paradigm where most of your page is static HTML, with “islands” of interactivity sprinkled throughout. This results in significantly better performance compared to fully client-rendered SPAs.
How It Works
- Server-side rendering: Astro components render to static HTML at build time
- Selective hydration: Only interactive components load JavaScript
- Zero JS by default: Non-interactive sections ship zero JavaScript to the browser
- Progressive enhancement: The page works without JavaScript, interactivity enhances the experience
Page Composition Example
Here’s how the main page is structured insrc/pages/index.astro:1:
- All
.astrocomponents are static (Navbar, Hero, About, Skills, Projects, Footer) - Only
Contact.tsxuses theclient:loaddirective, making it an interactive “island” - The majority of the page ships as pre-rendered HTML with zero JavaScript
When to Use Astro vs React Components
Use this decision tree:Does it need interactivity?
If the component is purely presentational with no user interaction (navigation, content sections, footers), use an Astro component (
.astro).Does it need client-side state?
If it requires
useState, useEffect, or other React hooks, use a React component (.tsx) with a client directive.Does it need form handling?
For forms with validation, dynamic UI updates, or API calls, use a React component (
.tsx).Component Type Matrix
| Component Type | Technology | Example |
|---|---|---|
| Navigation | Astro | Navbar.astro - static links with anchor scrolling |
| Hero section | Astro | Hero.astro - heading, subheading, CTA buttons |
| Content sections | Astro | About.astro, Skills.astro, Projects.astro |
| Interactive forms | React | Contact.tsx - form state, validation, submission |
| UI primitives | React | components/ui/* - buttons, inputs (shadcn/ui) |
| Footer | Astro | Footer.astro - static links and copyright |
Build Process
The build process follows these steps:React component bundling
React components marked with client directives are bundled separately for client-side hydration.
Build Commands
Requires Node.js >= 22.12.0
Performance Characteristics
The architecture delivers exceptional performance through:Minimal JavaScript
- Static sections: Zero JavaScript sent to browser
- Interactive sections: Only the Contact form (~10KB gzipped) includes React runtime
- Total JS budget: < 50KB for the entire page
Optimized CSS
- Tailwind v4: Generates only the utility classes actually used
- Single CSS file: All styles bundled and minified
- Critical CSS: Inlined in HTML for fastest first paint
Fast Loading
First Contentful Paint
< 0.5s
Time to Interactive
< 1.5s
Lighthouse Score
95+ across all metrics
Why It’s Fast
- Static HTML: Most content is pre-rendered at build time
- Selective hydration: JavaScript only loads for interactive components
- No framework overhead: Static sections have zero React/Astro runtime
- Optimized assets: Automatic code splitting and tree shaking
- CSS optimization: Tailwind v4 generates minimal CSS
Path Alias Configuration
The project uses@/ as an alias to ./src/ for cleaner imports:
astro.config.mjs:15
src/components/Contact.tsx:2:
Next Steps
Astro + React Integration
Learn how Astro and React work together with client directives
Tailwind v4 Configuration
Explore Tailwind CSS v4 native configuration and theme customization