Introduction
This portfolio is built with Astro and follows a modular component architecture. All components are located insrc/components/ and organized by their purpose and functionality.
Component Architecture
The component system is organized into four main categories:Card Components
Specialized display components for projects, blog posts, work experience, and achievements
UI Elements
Reusable UI primitives like buttons, badges, cards, and icons
Navigation
Header and footer components for site navigation
Sections
Full-page section components like the hero banner
Directory Structure
Using Components
All components in this portfolio are Astro components (.astro files) that accept props and can contain slots for flexible content.
Basic Usage
With Props
Components accept props that are destructured in the frontmatter:With Slots
Many components support slot content for maximum flexibility:Design System
Color Palette
The portfolio uses a consistent color scheme:- Primary: Red (
red-500tored-700) - Used for CTAs and accents - Secondary: Gray (
gray-100togray-900) - Used for text and backgrounds - Success: Emerald - Used for positive states
- Warning: Orange - Used for attention states
Typography
The site uses system fonts with these base styles:- Headings: Font weight
black(900) orbold(700) - Body: Font weight
normal(400) ormedium(500) - Display: Large text sizes (4xl-8xl) for hero sections
Spacing
Components use Tailwind’s spacing scale:- Sections:
py-20(80px vertical padding) - Cards:
p-6orp-8internal padding - Gaps:
gap-4,gap-6,gap-8for grid layouts
Type Definitions
Type definitions for data structures are located insrc/types/index.ts. Key interfaces include:
Project- Project data structureBlogPost- Blog post frontmatterWorkExperience- Work experience with positionsAchievement- Achievement with icon and URLNavigationItem- Navigation link structureSocialLink- Social media link structure
Best Practices
Component Composition
Build complex UIs by composing simple components:Styling
Use Tailwind utility classes for styling. Theclass prop is supported on all components:
Accessibility
Components include proper ARIA attributes and semantic HTML:- Buttons have
aria-labelwhen icon-only - Navigation has
aria-expandedfor mobile menus - Links have
rel="noopener noreferrer"for external URLs
Next Steps
Card Components
Learn about ProjectCard, BlogCard, and more
UI Elements
Explore Button, Badge, Icon, and other UI primitives
