This project is a modern React + Vite application. The file dev-folio-tamplate.html is provided only as a legacy reference to the original HTML version. All main development and features are implemented in React components under the src/ directory. Please use index.html and the React code for all deployment and customization.
A professional, minimal portfolio template refactored from a monolithic HTML file into a modern, scalable React + Vite application following SOLID principles and Atomic Design.
| Original | React Version |
|---|---|
| Single 500+ line HTML file | Modular component architecture (25+ files) |
Inline onclick="downloadSource()" |
Custom React hook useDownloadSource |
| Tailwind CDN (not tree-shakable) | npm Tailwind with production optimization |
Generic <div> elements |
Semantic HTML (<article>, <nav>, <main>) |
| No accessibility labels | Full ARIA labels on all interactive elements |
| No image error handling | Lazy loading + fallback UI for broken images |
β
Issue #1: Extracted inline handlers to useDownloadSource hook
β
Issue #2: Added semantic HTML + ARIA labels for accessibility
β
Issue #3A: Implemented lazy loading + error boundaries for images
β
Issue #4: Migrated to npm Tailwind for production builds
β
Issue #5: Kept original design (no mobile menu per your request)
β
Issue #6: Optimized font loading with preconnect
src/
βββ components/
β βββ common/
β β βββ MaterialIcon.jsx # Reusable icon wrapper
β β βββ Button.jsx # Primary/Secondary button variants
β β
β βββ ui/
β β βββ BrowserChrome.jsx # Traffic light dots for mockups
β β βββ Badge.jsx # Pill-shaped label component
β β
β βββ layout/
β β βββ Navbar.jsx # Fixed nav with glassmorphism
β β βββ Footer.jsx # Social links footer
β β
β βββ cards/
β β βββ ProjectCard.jsx # Project card with hover effects
β β
β βββ sections/
β βββ HeroSection/
β β βββ HeroSection.jsx # Main container
β β βββ HeroContent.jsx # Left: Text + CTAs
β β βββ IsometricMockup.jsx # Right: 3D cards (pure CSS)
β β
β βββ ProjectsSection/
β β βββ ProjectsSection.jsx
β β βββ SectionHeader.jsx
β β
β βββ CodeSection/
β βββ CodeSection.jsx
β βββ FeaturesList.jsx
β βββ CodeTerminal.jsx
β
βββ hooks/
β βββ useDownloadSource.js # Download functionality
β
βββ data/
β βββ projects.js # Project data (easily editable)
β
βββ utils/
β βββ constants.js # Site config & social links
β
βββ styles/
β βββ global.css # Tailwind + custom CSS
β
βββ pages/
β βββ Home.jsx # Main page composition
β
βββ App.jsx # Root with Helmet provider
βββ main.jsx # React 18 entry point
- Node.js 18+
- npm, yarn, or pnpm
# Navigate to project
cd dev-folio-react
# Install dependencies
npm install
# Start development server
npm run devThe app will open at http://localhost:3000 π
npm run build
npm run previewEdit src/utils/constants.js:
export const SITE_CONFIG = {
name: 'DevFolio',
tagline: 'Your Job Title Here',
author: 'Your Name',
description: 'Your bio...',
socialLinks: [
{ name: 'GitHub', url: 'https://github.com/yourusername', label: '...' },
// Add more...
]
};Edit src/data/projects.js:
export const projectsData = [
{
id: 4,
title: 'Your New Project',
tech: 'Tech Stack',
image: 'image-url',
alt: 'Descriptive alt text'
},
// ...
];Edit tailwind.config.js:
colors: {
accent: '#YOUR_BRAND_COLOR',
navy: '#YOUR_DARK_COLOR',
// ...
}| Technology | Purpose |
|---|---|
| React 18 | UI library with hooks |
| Vite | Lightning-fast build tool |
| Tailwind CSS | Utility-first CSS (tree-shakable) |
| React Helmet Async | SEO meta tags |
| Material Symbols | Icon library |
// β Original (inline handler)
<button onclick="downloadSource()">Download</button>
// β
React (custom hook)
const handleDownload = useDownloadSource();
<button onClick={handleDownload}>Download</button>// β Original (CDN)
<script src="https://cdn.tailwindcss.com"></script>
// β
React (npm + PostCSS)
// tailwind.config.js with tree-shaking// β Original
<img src="..." alt="..." />
// β
React (with error handling)
<img
src="..."
alt="..."
loading="lazy"
onError={handleImageError}
/>// β Original
<a href="#">GitHub</a>
// β
React
<a href="#" aria-label="Visit my GitHub profile">GitHub</a>npm install -g vercel
vercelnpm run build
# Drag 'dist' folder to NetlifyUpdate vite.config.js:
export default defineConfig({
base: '/your-repo-name/',
// ...
})- β Single Responsibility: Each component does ONE thing
- β
No Direct DOM: Use
useRefor state, NEVERquerySelector - β Functional Only: No class components
- β
Extract Logic: Complex logic goes in
src/hooks/ - β
Semantic HTML: Use
<article>,<section>,<nav>, etc.
- Components: PascalCase (
HeroSection.jsx) - Hooks: camelCase with
useprefix (useDownloadSource.js) - Data: camelCase (
projects.js) - Styles: kebab-case (
global.css)
This template was built following strict architectural standards. When contributing:
- Follow the Atomic Design structure (common β ui β sections)
- NO inline styles (use Tailwind or CSS modules)
- Add accessibility labels to all interactive elements
- Extract non-UI logic to custom hooks
- Use semantic HTML elements
MIT License - feel free to use for personal or commercial projects.
Built with β€οΈ following Principal Frontend Architect standards
Original monolithic HTML β Modern React application with SOLID principles, Atomic Design, and production-ready architecture.