Skip to content

ApoorvGit/macos-themed-portfolio

Repository files navigation

๐ŸŽ macOS-Themed Portfolio Website

A highly interactive portfolio website that perfectly replicates the macOS/iPadOS experience in the browser. Built with modern web technologies to deliver a pixel-perfect desktop environment with draggable windows, a functional dock, and smooth animations.

React TypeScript Vite TailwindCSS

๐ŸŒŸ About This Project

This is an innovative portfolio website that transforms the traditional web experience into an immersive macOS-style desktop environment. Users can interact with various applications through resizable and draggable windows, navigate using a functional dock, and enjoy a complete desktop experienceโ€”all within their browser.

Key Highlights

  • ๐Ÿ”’ Authentic Lock Screen - Complete with a password entry system and animated helper cat (password: meow)
  • ๐Ÿ–ฅ๏ธ Full Desktop Environment - Menu bar with system controls, date/time, and status indicators
  • ๐ŸชŸ Window Management System - Fully functional windows that can be dragged, resized, minimized, and maximized
  • ๐ŸŽฏ Interactive Dock - macOS-style dock with app icons, hover effects, and active indicators
  • ๐Ÿ“ Finder Window - Browse through portfolio content in a familiar Finder interface
  • ๐Ÿ“„ PDF Viewer - Built-in resume viewer using PDF.js
  • ๐Ÿ’ฌ AI-Powered Messages - Real-time chat with AI responses powered by Groq, persistent conversation history
  • ๐Ÿ“น FaceTime Simulation - Live video with real-time face mesh detection using MediaPipe
  • ๐Ÿค– Siri Integration - Voice-like AI assistant interface with context-aware responses
  • ๐ŸŽจ Drag & Drop Icons - Reorganize desktop icons with smooth animations
  • โŒจ๏ธ Keyboard Navigation - Full accessibility with keyboard shortcuts
  • ๐Ÿ“ฑ Responsive Design - Adapts beautifully to different screen sizes

๐Ÿ“ฆ Technology Stack

Core Framework

  • React 19.2.0 - Latest React with improved performance and features
  • TypeScript 5.9.3 - Type-safe development with strong typing
  • Vite 7.2.4 - Lightning-fast build tool and dev server

Styling & UI

  • Tailwind CSS 3.4.19 - Utility-first CSS framework for rapid UI development
  • PostCSS - CSS processing and transformations

State & Navigation

  • Zustand 5.0.9 - Lightweight state management for window states
  • React Router DOM 7.10.1 - Client-side routing with protected routes
  • Session Storage - Authentication state persistence

Interactive Features

  • @dnd-kit - Modern drag-and-drop toolkit for React
  • react-rnd 10.5.2 - Resizable and draggable windows
  • @szhsin/react-menu 4.5.1 - Context menu implementation

Document & Media

  • react-pdf 10.2.0 - PDF viewing capabilities
  • pdfjs-dist 5.4.449 - PDF.js library for rendering PDFs
  • react-markdown 10.1.0 - Markdown parsing and rendering

AI & Computer Vision

  • Groq API - Ultra-fast AI inference for Siri-like interactions
  • MediaPipe Face Mesh - Real-time face detection for FaceTime simulation

Developer Tools

  • ESLint 9.39.2 - Code linting with TypeScript support
  • Prettier 3.7.4 - Opinionated code formatting
  • TypeScript ESLint 8.46.4 - TypeScript-specific linting rules

๐ŸŽฏ Project Structure

macos-themed-portfolio/
โ”œโ”€โ”€ src/
โ”‚   โ”œโ”€โ”€ components/              # Reusable UI components
โ”‚   โ”‚   โ”œโ”€โ”€ Dock.tsx            # macOS-style dock with app icons
โ”‚   โ”‚   โ”œโ”€โ”€ MenuBar.tsx         # Top menu bar with system controls
โ”‚   โ”‚   โ”œโ”€โ”€ Window.tsx          # Draggable/resizable window component
โ”‚   โ”‚   โ”œโ”€โ”€ FinderWindow.tsx    # File browser interface
โ”‚   โ”‚   โ”œโ”€โ”€ IconGrid.tsx        # Desktop icon grid with drag-drop
โ”‚   โ”‚   โ”œโ”€โ”€ IconTile.tsx        # Individual icon component
โ”‚   โ”‚   โ”œโ”€โ”€ PasswordCat.tsx     # Lock screen helper animation
โ”‚   โ”‚   โ”œโ”€โ”€ PDFViewer.tsx       # Resume/document viewer
โ”‚   โ”‚   โ”œโ”€โ”€ SiriContent.tsx     # AI chat interface (Siri)
โ”‚   โ”‚   โ”œโ”€โ”€ MessagesContent.tsx # AI-powered iMessage-style chat
โ”‚   โ”‚   โ”œโ”€โ”€ FaceTimeContent.tsx # Video call with face tracking
โ”‚   โ”‚   โ”œโ”€โ”€ StickyNote.tsx      # Sticky notes widget
โ”‚   โ”‚   โ””โ”€โ”€ Wallpaper.tsx       # Dynamic wallpaper component
โ”‚   โ”œโ”€โ”€ pages/                  # Main page components
โ”‚   โ”‚   โ”œโ”€โ”€ LockPage.tsx       # Authentication screen
โ”‚   โ”‚   โ””โ”€โ”€ DesktopPage.tsx    # Main desktop environment
โ”‚   โ”œโ”€โ”€ lib/                    # Utilities and services
โ”‚   โ”‚   โ”œโ”€โ”€ window-manager.ts  # Zustand store for window state
โ”‚   โ”‚   โ”œโ”€โ”€ keyboard.ts        # Keyboard shortcut handlers
โ”‚   โ”‚   โ”œโ”€โ”€ groq-service.ts    # AI service integration
โ”‚   โ”‚   โ””โ”€โ”€ constants.ts       # App configurations & constants
โ”‚   โ”œโ”€โ”€ styles/                 # Global styles
โ”‚   โ”‚   โ”œโ”€โ”€ globals.css        # Global CSS rules
โ”‚   โ”‚   โ””โ”€โ”€ tokens.css         # Design system tokens
โ”‚   โ”œโ”€โ”€ assets/                 # Images, icons, and static files
โ”‚   โ”œโ”€โ”€ router.tsx              # Route configuration
โ”‚   โ”œโ”€โ”€ App.tsx                 # Root application component
โ”‚   โ””โ”€โ”€ main.tsx                # Application entry point
โ”œโ”€โ”€ public/
โ”‚   โ””โ”€โ”€ resume.md               # Resume content in markdown
โ”œโ”€โ”€ .github/
โ”‚   โ””โ”€โ”€ workflows/
โ”‚       โ””โ”€โ”€ deploy.yml          # GitHub Actions CI/CD
โ”œโ”€โ”€ vite.config.ts              # Vite configuration
โ”œโ”€โ”€ tailwind.config.js          # Tailwind CSS configuration
โ”œโ”€โ”€ tsconfig.json               # TypeScript configuration
โ””โ”€โ”€ package.json                # Project dependencies

๐Ÿš€ Getting Started

Prerequisites

  • Node.js 18.x or higher
  • npm or yarn package manager
  • Groq API Key (free at console.groq.com)

Installation

  1. Clone the repository

    git clone https://github.com/ApoorvGit/macos-themed-portfolio.git
    cd macos-themed-portfolio
  2. Install dependencies

    npm install
  3. Set up environment variables

    Create a .env file in the root directory:

    VITE_GROQ_API_KEY=your_groq_api_key_here

    Get your free Groq API key from https://console.groq.com

  4. Start development server

    npm run dev

    The app will be available at http://localhost:5173

Available Scripts

npm run dev      # Start development server with hot reload
npm run build    # Build for production (TypeScript + Vite)
npm run preview  # Preview production build locally
npm run lint     # Run ESLint to check code quality
npm run format   # Format code with Prettier

๐ŸŽฎ How It Works

Authentication Flow

  1. Lock Screen - Users are greeted with a macOS-style lock screen
  2. Helper Cat - An animated cat walks across the screen revealing the password
  3. Password Entry - Enter the password (meow) to unlock
  4. Session Management - Authentication state is stored in sessionStorage
  5. Protected Routes - Desktop is only accessible after authentication

Window Management System

The window system is powered by Zustand for state management and react-rnd for interactions:

  • State Storage - Window positions, sizes, z-index, and minimized state stored in Zustand
  • Dragging - Windows can be dragged by their title bars
  • Resizing - Resize handles on all corners and edges
  • Minimize/Maximize - macOS-style traffic light controls
  • Focus Management - Clicking a window brings it to the front (z-index management)
  • Dock Integration - Minimized windows appear in the dock

Icon Organization

Desktop icons use @dnd-kit for smooth drag-and-drop:

  • Drag & Drop - Rearrange icons with mouse or touch
  • Keyboard Navigation - Arrow keys for full accessibility
  • Grid Snapping - Icons snap to a grid layout for alignment
  • Visual Feedback - Hover effects and drag shadows
  • Sortable - Maintains icon order across interactions

AI-Powered Messages App

The Messages app provides an interactive chat experience powered by Groq AI:

  • Real-time AI Responses - Instant replies powered by Groq's fast inference
  • Conversation Persistence - Messages are saved to localStorage per user
  • Unique User Sessions - Each visitor gets a unique ID for personalized conversations
  • Typing Indicators - Visual feedback while AI is generating responses
  • Markdown Support - Rich text formatting in messages with react-markdown
  • Context Awareness - AI maintains conversation history for coherent discussions
  • Auto-scroll - Automatic scrolling to latest messages
  • Welcome Message - Friendly greeting on first visit
  • iMessage-style UI - Authentic macOS Messages appearance with bubbles

AI Chat (Siri)

Powered by Groq's ultra-fast AI inference:

  • Natural Conversations - Chat with AI about portfolio, skills, projects
  • Streaming Responses - Real-time response generation
  • Context Aware - Maintains conversation history
  • Fast Inference - Sub-second response times with Groq

Face Tracking (FaceTime)

Uses MediaPipe for real-time face mesh detection:

  • Camera Access - Requests webcam permissions
  • Face Detection - 468-point face mesh tracking
  • Real-time Processing - 30+ FPS face tracking
  • Visual Overlay - Displays face mesh points on video

๐ŸŒ Deployment

Automated Deployment (GitHub Pages)

This project includes GitHub Actions for automatic deployment:

  1. Push to main branch - Triggers automatic build and deployment
  2. GitHub Actions - Builds the project and deploys to GitHub Pages
  3. Environment Secrets - Securely injects API keys during build

Setup Instructions:

  1. Go to repository Settings โ†’ Pages
  2. Under Source, select GitHub Actions
  3. Go to Settings โ†’ Secrets and variables โ†’ Actions
  4. Add repository secret: VITE_GROQ_API_KEY with your Groq API key
  5. Push to main branch - deployment happens automatically

Live URL: https://apoorvgit.github.io/macos-themed-portfolio/

Manual Deployment

# Build the project
npm run build

# The dist/ folder contains the production build
# Deploy this folder to any static hosting service

Compatible Hosting Services:

  • โœ… GitHub Pages (automated with Actions)
  • โœ… Vercel (vercel deploy)
  • โœ… Netlify (drag & drop dist/)
  • โœ… Cloudflare Pages
  • โœ… AWS S3 + CloudFront
  • โœ… Azure Static Web Apps

๐ŸŽจ Customization

Adding New Applications

  1. Create component in src/components/YourApp.tsx
  2. Add window config in src/lib/constants.ts:
    export const APPS = {
      yourApp: {
        id: 'your-app',
        title: 'Your App',
        icon: YourIcon,
        component: YourAppContent,
      }
    }
  3. Register in window manager (Zustand store)
  4. Add dock icon in src/components/Dock.tsx

Modifying Theme

  • Colors: Edit tailwind.config.js or src/styles/tokens.css
  • Wallpaper: Replace in src/components/Wallpaper.tsx or add images to src/assets/
  • Fonts: Update in src/index.css
  • Animations: Modify transitions in src/styles/globals.css

Customizing Content

  • Resume: Edit public/resume.md (Markdown format)
  • About Info: Update Finder window content in components
  • Messages: Modify src/components/MessagesContent.tsx
  • Projects/Skills: Update content in respective components

โŒจ๏ธ Keyboard Shortcuts

  • Enter - Submit password / Open selected icon
  • Escape - Cancel / Deselect icons
  • Cmd/Ctrl + W - Close focused window
  • Cmd/Ctrl + M - Minimize focused window
  • Arrow Keys - Navigate desktop icons
  • Tab - Navigate between focusable elements

๐Ÿค Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

How to contribute:

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

๐Ÿ“ License

This project is open source and available under the MIT License.

๐Ÿ‘จโ€๐Ÿ’ป Author

Apoorv Mishra

๐Ÿ™ Acknowledgments

  • Inspired by Apple's macOS design language and Human Interface Guidelines
  • React and Vite communities for excellent tooling and documentation
  • All open-source library maintainers used in this project
  • Groq for providing ultra-fast AI inference
  • MediaPipe team for face detection technology

Made with โค๏ธ using React + TypeScript + Vite

If you found this project helpful, please consider giving it a โญ on GitHub!

About

Interactive macOS themed portfolio website built with React, TypeScript, and Tailwind CSS

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages