An interactive, high-performance portfolio environment mimicking a high-end macOS-inspired desktop. This project leverages Next.js 15, Three.js, and Google Gemini AI to create a unique professional showcase.
Follow these steps to get the project running on your local development environment.
- Node.js: Version
20.xor higher (LTS recommended). - npm: Version
10.xor higher. - Git: Installed and configured.
- Hardware: Dedicated GPU recommended for smooth 3D rendering (WebGL 2.0 support).
The Terminal component uses an AI Assistant powered by Google Gemini.
- Visit the Google AI Studio.
- Create a new API Key.
- Keep this key safe; you will need it for the environment configuration.
# Clone the repository
git clone https://github.com/sathwik13198/macos-portfolio.git
# Enter the project directory
cd macos-portfolio
# Install all dependencies
npm installCreate a file named .env.local in the root of the project:
# Google Gemini API Key
API_KEY=your_actual_api_key_hereNote: Do not commit this file to version control.
# Start the development server
npm run devThe application will be available at http://localhost:3000.
App.tsx: Core logic for theme switching and device-responsive view selection./components/Scene3D.tsx: The Three.js engine. Contains the "ScreenBot" model logic and interactive lighting./components/DesktopView.tsx: The macOS-style windowing system. Handles z-index stacking, dragging, and minimizing./components/ContentOverlay.tsx: The scroll-driven landing page experience (used for mobile or as a fallback)./components/Terminal.tsx: A functional CLI that acts as the primary interface for the Gemini AI./services/geminiService.ts: Handles the prompt engineering and API communication with Google's LLM.
The terminal is not just for show—it is a functional interface. Try these commands:
chat: Toggle the AI persona. Ask about Sathwik's experience at ISRO or Kritno.help: Lists all available system-level commands.whoami: Returns the guest user context.date: Pulls local system time.clear: Flushes the terminal buffer.exit: Returns to standard shell from AI chat mode.
If you see this in the browser console during local dev, ensure your package.json dependencies match exactly. The project uses 0.173.0 to maintain compatibility with the latest @react-three/drei features.
Ensure your .env.local file is in the root directory (not inside src or app). If you are running in a non-Next.js environment, the key must be passed via process.env.
- Ensure Hardware Acceleration is enabled in your browser settings.
- If testing on a laptop, ensure the browser is using the Discrete GPU rather than the Integrated one.
To prepare the site for a production environment:
# Generate optimized build
npm run build
# Preview the production build locally
npm run startBuilt with passion by Sathwik Pentapati.