DEV Community

Cover image for SanjayOS: I Built an AI-Powered Operating System for My Portfolio ๐Ÿš€
Sanjay Kumar Sah
Sanjay Kumar Sah Subscriber

Posted on

SanjayOS: I Built an AI-Powered Operating System for My Portfolio ๐Ÿš€

New Year, New You Portfolio Challenge Submission

This is a submission for the New Year, New You Portfolio Challenge Presented by Google AI

About Me

Welcome to SanjayOS v1.0 โ€” an AI-native Developer Operating System.

Instead of navigating a menu, you boot into a desktop environment. You can drag windows, run terminal commands, and interact with an intelligent system core.

Go ahead, give it a spin! The entire OS is running serverless on Google Cloud Run.

Portfolio

Welcome to SanjayOS v1.0 โ€” an AI-native Developer Operating System.

Instead of navigating a menu, you boot into a desktop environment. You can drag windows, run terminal commands, and interact with an intelligent system core.

Go ahead, give it a spin! The entire OS is running serverless on Google Cloud Run.

(If the interactive embed above doesn't load fully, you can launch SanjayOS in a new tab here)

How I Built It

Building an "Operating System" in the browser is no small feat. Here is the architecture that powers SanjayOS:

๐Ÿ› ๏ธ The Tech Stack

  • Framework: Next.js 16 (App Router) for the core structure.
  • Runtime: Bun for ultra-fast builds and package management.
  • Styling: Tailwind CSS + Shadcn/ui (heavily customized for that "Glassmorphism" OS look).
  • State Management: Zustand to handle the complex window manager logic (z-indexing, minimizing, focusing apps).
  • Deployment: Dockerized and hosted on Google Cloud Run to handle Server-Side Rendering (SSR) while scaling to zero when idle.

๐Ÿง  The Google AI & Antigravity Workflow

The heart of SanjayOS is Google Gemini 2.5 Flash, integrated via the Vercel AI SDK. But the construction of this complex system was accelerated by Google Antigravity.

  • Built with Antigravity: I used Google's Antigravity (AI-first IDE) to scaffold the complex window management logic and rapidly prototype the Generative UI components. It acted as my "pair programmer," helping me integrate the Gemini API correctly and ensuring my prompt engineering was optimized for tool calling.
  • System Instructions: I fed the AI a structured JSON context of my entire career (resume, projects, skills). This means no RAG vector database was neededโ€”Gemini's massive context window handles it all in real-time.
  • Tool Calling: The AI has permission to "control" the OS. If you ask, "Show me Sanjay's projects," Gemini doesn't just write a list; it executes a function to launch the Project Viewer app automatically.

What I'm Most Proud Of

There are three specific achievements I'm thrilled with:

  1. The "Alive" Feeling: The moment you realize the AI isn't just a text boxโ€”it's the OS Kernel. Seeing the AI open windows and highlight UI elements based on a conversation feels like the future of web interfaces.
  2. The Window Manager: Building a performant, draggable, resizable window system in React was a complex challenge. Solving the "z-index stacking" (ensuring the clicked window always comes to the front) without causing re-renders was a great engineering puzzle.
  3. The Cloud Run Deployment: Getting a Next.js Docker container to run smoothly on Cloud Run with the correct standalone output and environment variables was a huge win. It proves that personal portfolios can be both high-tech and cost-effective.

I hope you enjoy exploring SanjayOS as much as I enjoyed building it.

Happy Hacking! ๐Ÿ’ปโœจ

Top comments (2)

Collapse
 
mayank_207 profile image
mayank

Awesome portfolio creation, heads up..

Collapse
 
sanjaysah profile image
Sanjay Kumar Sah

Thank you