Loading portfolio
Skip to content
All posts

Building My macOS Portfolio

Kuldeep Rajput
Frontend Engineering
3 min read
The macOS-inspired portfolio desktop with its wallpaper, desktop icons, and dock.

Putting my projects in Finder

Finder gave me a way to make the desktop part of the portfolio. Open a project folder to find a note about the project, a preview, and links. NewTube, Coursenva, Resuvee, and Docs Editor each have their own folder.

  • The project notes explain what I built and which tools I used.
  • Image files give each project a preview you can open from the folder.
  • The dock gives visitors another way into the portfolio, including the résumé and contact apps.

How the desktop fits together

Next.js and React render the interface. The window store in Zustand holds the state shared by the dock and apps. GSAP handles movement, and the same window wrapper gives the desktop apps their drag behavior.

  1. src/constants/locations.js describes the Finder folders and their contents.
  2. src/store/window.js keeps track of open and minimized windows, the order they stack in, and the app data they carry.
  3. src/hoc/windowWrapper.jsx uses GSAP Draggable to let visitors drag a window by its header within the desktop.

What happens when you open a window

Opening a window clears its minimized state and gives it the next stacking position, so it appears in front. The caller can also pass in something to display, such as a file selected in Finder. Here’s the action from the window store.

javascript
openWindow: (windowKey, data = null) =>
  set((state) => {
    const win = state.windows[windowKey];
    if (!win) return;
    win.isOpen = true;
    win.isMinimized = false;
    win.zIndex = state.nextZIndex;
    win.data = data ?? win.data;
    state.nextZIndex++;
  }),

A separate layout for phones

A window you can drag comfortably with a mouse takes up most of a phone screen. I built a separate mobile layout with an app grid and a dock. The window wrapper also skips desktop dragging on small screens.

  • On desktop, you can keep Finder and another app open side by side.
  • On mobile, you can open an app from its icon without moving other windows out of the way.

A few other things to try

  • Change the wallpaper, move widgets around, or rearrange the dock.
  • Open the résumé, Terminal, or Notes from the desktop.
  • Ask the Siri-style assistant a question. The chat route uses Groq when the server has an API key configured.

What I learned about window state

  • One window can be open, minimized, or behind another app. Keeping those states in the same store gives the dock and the window the same view of what’s happening.
  • Passing a file to an existing window is what makes Finder useful. The same viewer can open another image or note without needing a new component for each project.
  • The mobile layout helped me separate what the apps do from how people open and move between them.
View source on GitHub

Related posts

“I have learned from everyone who was better than me. The real test came when I had to find my own forma of doing things.”

— Kuldeep Rajput