A stunning, interactive portfolio website that mimics the macOS Big Sur interface, built with React, Vite, and TailwindCSS.
- 🖥️ Authentic macOS Interface: Draggable windows, glassmorphic dock, and top menu bar
- 🌓 Dark/Light Mode: Seamless theme switching with dynamic wallpapers
- 🤖 AI Integration: Built-in Gemini AI chat assistant
- 💼 Portfolio Showcase: Finder-style project browser
- 💻 Interactive Terminal: Command-line interface with AI capabilities
- 🎨 Interactive Typography: Mouse-reactive font weight effects on welcome screen
- 📱 Responsive Design: Optimized for various screen sizes
- ⚡ Fast Performance: Built with Vite for lightning-fast HMR
mac-os-portfolio/
├── public/
├── src/
│ ├── components/
│ │ ├── apps/ # Window content components
│ │ │ ├── Finder.jsx
│ │ │ ├── Terminal.jsx
│ │ │ ├── Safari.jsx
│ │ │ ├── Welcome.jsx
│ │ │ ├── Settings.jsx
│ │ │ └── GeminiChat.jsx
│ │ ├── desktop/ # OS UI components
│ │ │ ├── Desktop.jsx
│ │ │ ├── Dock.jsx
│ │ │ ├── DockIcon.jsx
│ │ │ └── TopBar.jsx
│ │ └── window/ # Window management
│ │ ├── Window.jsx
│ │ └── WindowControls.jsx
│ ├── data/ # Configuration files
│ │ ├── projects.js
│ │ ├── commands.js
│ │ └── wallpapers.js
│ ├── hooks/ # Custom React hooks
│ │ └── useGemini.js
│ ├── store/ # State management
│ │ └── useWindowStore.js
│ ├── App.jsx
│ ├── main.jsx
│ └── index.css
├── .env
├── index.html
├── package.json
├── tailwind.config.js
└── vite.config.js
- Node.js (v16 or higher)
- npm or yarn
- Clone the repository:
git clone <your-repo-url>
cd MacOS-style\ Portfolio- Install dependencies:
npm install-
(Optional) Add your Gemini API key:
- Create a
.envfile in the root directory - Add:
VITE_GEMINI_API_KEY=your_api_key_here
- Create a
-
Start the development server:
npm run dev- Open your browser and navigate to
http://localhost:5173
npm run dev- Start development servernpm run build- Build for productionnpm run preview- Preview production build
- Open Apps: Click icons in the dock or desktop
- Drag Windows: Click and drag the title bar
- Close/Minimize: Use the traffic light buttons (red/yellow/green)
- Focus Windows: Click anywhere on a window to bring it to front
- Toggle Theme: Open Settings app and click the Toggle button
help- Display available commandsabout- Learn about the developerskills- View technical skillscontact- Get contact informationclear- Clear terminal historyai <prompt>- Ask the Gemini AI assistant
Click the purple sparkle icon in the dock to open the AI chat interface. Ask questions and get intelligent responses powered by Google's Gemini API.
Edit src/data/projects.js:
export const PROJECTS = [
{
id: 'proj1',
title: 'Your Project',
category: 'Tech Stack',
description: 'Project description',
color: 'bg-blue-500',
link: '#'
},
// Add more projects...
];Edit src/data/wallpapers.js:
export const WALLPAPERS = {
light: "your-light-wallpaper-url",
dark: "your-dark-wallpaper-url"
};Edit src/data/commands.js:
export const COMMANDS = {
yourcommand: "Output text",
// Add more commands...
};- React 18 - UI framework
- Vite - Build tool and dev server
- TailwindCSS - Utility-first CSS framework
- Zustand - Lightweight state management
- Lucide React - Beautiful icon library
- Google Gemini API - AI chat integration
The app uses Zustand for centralized window state management, handling:
- Window position tracking
- Z-index management for focus
- Open/close/minimize states
- Drag and drop functionality
The Welcome screen features a unique mouse-proximity effect:
- Each character's font weight dynamically adjusts based on cursor distance
- Exponential falloff creates a "magnetic" feel
- Smooth transitions for natural animations
Authentic macOS Big Sur aesthetics using:
backdrop-blurfor glass effects- Semi-transparent backgrounds
- Border overlays with subtle opacity
- Shadow layering for depth
This project is open source and available under the MIT License.
Contributions, issues, and feature requests are welcome!
Sahan Viranga Hettiarachchi
- Portfolio: sahan-hettiarachchi.vercel.app
- GitHub: @Sahancoder
- Email: sahanviranga18@gmail.com
- LinkedIn: Sahan Viranga Hettiarachchi
- Inspired by macOS Big Sur design language
- Icons by Lucide Icons
- Wallpapers from Unsplash
Made By Sahan Hettiarachchi