Directory Overview
The project follows a standard Vite + React + TypeScript structure with shadcn/ui components:Key Directories Explained
/src/components/
Purpose: Reusable React components organized by feature.
Custom Components (7 files):
AboutSection.tsx- About/bio sectionContactSection.tsx- Contact form and informationExperienceSection.tsx- Work experience timelineHeroSection.tsx- Landing hero bannerNavLink.tsx- Navigation link componentNavbar.tsx- Main navigation barSkillsSection.tsx- Skills showcase section
/src/components/ui/
Purpose: shadcn/ui component library (59 components).
These are highly customizable, accessible components built on Radix UI primitives:
- Layout:
card,separator,sheet,sidebar,tabs - Forms:
button,input,textarea,checkbox,select,form,label - Feedback:
alert,toast,toaster,sonner,progress,skeleton - Overlays:
dialog,alert-dialog,drawer,popover,hover-card,tooltip - Navigation:
navigation-menu,menubar,breadcrumb,pagination - Data Display:
table,avatar,badge,chart,calendar,carousel - Interactive:
accordion,collapsible,dropdown-menu,context-menu,command
All UI components are managed via the
components.json:2 config and can be updated using the shadcn CLI./src/hooks/
Purpose: Custom React hooks for shared logic.
use-toast.ts- Toast notification system state managementuse-mobile.tsx- Responsive breakpoint detection hook
/src/lib/
Purpose: Utility functions and helpers.
Key file: utils.ts contains the cn() function for conditional class merging:
/src/pages/
Purpose: Top-level page components mapped to routes.
From src/App.tsx:16-20:
Index.tsx- Homepage with all portfolio sectionsNotFound.tsx- 404 error page
/src/test/
Purpose: Test configuration and test files.
setup.ts- Global test setup (imports@testing-library/jest-dom, mockswindow.matchMedia)example.test.ts- Example test demonstrating Vitest usage
Key Files Explained
Application Entry Points
index.html
Root HTML file loaded by the browser. References
/src/main.tsx:20 as the module entry point.Configuration Files
Import Conventions
Path Aliases
Configured incomponents.json:13-18:
Absolute vs Relative Imports
File Naming Patterns
| Type | Pattern | Example |
|---|---|---|
| Components | PascalCase .tsx | HeroSection.tsx, Navbar.tsx |
| UI Components | kebab-case .tsx | button.tsx, alert-dialog.tsx |
| Hooks | kebab-case use-*.ts | use-toast.ts, use-mobile.tsx |
| Utils | kebab-case .ts | utils.ts |
| Pages | PascalCase .tsx | Index.tsx, NotFound.tsx |
| Tests | *.test.ts or *.spec.tsx | example.test.ts |
| Config | kebab-case .ts/.js | vite.config.ts, eslint.config.js |
Technology Stack
React 18.3
UI library with hooks and modern features
TypeScript 5.8
Static typing for better DX and fewer bugs
Vite 5.4
Lightning-fast build tool and dev server
Tailwind CSS 3.4
Utility-first CSS framework
shadcn/ui
59 accessible components via Radix UI
React Router 6.30
Client-side routing with future flags enabled
TanStack Query 5.83
Powerful data fetching and caching
Framer Motion 12.34
Production-ready animation library
Next Steps
Local Setup
Set up your development environment
Building & Deploying
Learn how to build and deploy the application