MittenOS is a browser-based operating system simulator built with Next.js, Tailwind CSS v4, and Zustand. It features a complete window manager, a persistent virtual file system, a suite of built-in utility apps, and a sandboxed runtime for executing user-created applications safely in the browser.
- 100% Local & Private File System: Features a virtual directory structure persisted entirely in browser
localStorage—keeping your files and workspace data completely offline and private. - Full Desktop Experience: Complete window lifecycle management (open, close, minimize, maximize, focus), custom wallpapers, theming, context menus, and system notifications.
- Sandboxed App Runtime: User-built applications run inside isolated
iframesandboxes with strict Content Security Policies (CSP). Apps communicate with the host OS via apostMessagebridge API (window.mittenOS) for safe filesystem access and notification dispatching. - Integrated AI Workflow: Includes built-in AI coding assistance and local API key management to power AI-driven utilities directly from the desktop.
New applications are added weekly.
| Category | Application | Description | Access |
|---|---|---|---|
| System & Core | Files | Browse, organize, and manage the virtual file system. | Start Menu |
| Terminal | Command-line interface for interacting with the virtual file system. | Start Menu | |
| Settings | Configure system preferences (wallpaper, theme, accent color). | Start Menu | |
| App Store | Discover and install user-created sandboxed applications. | Start Menu | |
| About | View system specifications and OS version info. | Desktop Right-Click | |
| Productivity | Notepad | Lightweight plain-text editor for quick notes and code. | Start Menu |
| Pencil | Rich-text editor for writing and formatting documents. | Start Menu | |
| Calculator | Standard arithmetic calculator. | Start Menu | |
| AI Suite | MittenAI | AI-powered virtual coding and chat assistant. | Start Menu |
| Keys | Manage AI API endpoints and secret keys. | System / Hidden | |
| Media & Web | Browser | Embedded web browser for viewing external sites. | Start Menu |
| Photos | Image viewer and gallery browser. | Start Menu | |
| Weather | Check current local and global weather conditions. | Start Menu |
MittenOS is structured as a modular Next.js App Router application:
src/
├── components/
│ ├── os/ # Shell UI: Desktop, taskbar, start menu, window frames, dialogs
│ ├── apps/ # Built-in system utilities and SandboxedApp.tsx wrapper
│ └── ui/ # Reusable UI primitives (shadcn/ui + Tailwind v4 + Lucide icons)
├── stores/ # Zustand state management stores
├── lib/
│ ├── os-bridge/ # Sandbox iframe injection and postMessage host bridge (window.mittenOS)
│ └── ai/ # LLM service integrations, system prompts, and type definitions
| Store | Responsibility |
|---|---|
desktop-store |
Manages wallpaper, theme, accent colors, notifications, and desktop preferences. |
window-store |
Controls window lifecycles, z-index stacking, positioning, and window states. |
filesystem-store |
Implements the localStorage-backed virtual file system and file operations. |
app-registry-store |
Tracks installed built-in utilities and user-created sandboxed applications. |
- Node.js (v18+ recommended)
- npm (for package management and local development)
- Bun (required for running the standalone production server)
-
Clone the repository:
git clone [https://github.com/TechMitten/mitten-os.git](https://github.com/TechMitten/mitten-os.git) cd mitten-os -
Install dependencies:
npm install
-
Configure environment variables: Create a
.env.localfile in the project root and add any required environment variables. -
Start the development server:
npm run dev
The development server runs at
http://localhost:3131(with output piped todev.log).
| Command | Description |
|---|---|
npm run dev |
Starts the Next.js development server on port 3131 (logs to dev.log). |
npm run lint |
Runs a soft ESLint check across the codebase. |
npm run build |
Builds the application for standalone production deployment. |
npm run start |
Starts the built standalone production server using Bun. |
npm run build:pages |
Generates a static client-side export in out/ for Cloudflare Pages. |
npm run preview:pages |
Builds the static export and previews it locally using Wrangler. |
MittenOS supports two deployment modes: Self-Hosted Standalone (via Bun) and Static Edge Hosting (via Cloudflare Pages).
To build and self-host MittenOS as a standalone server:
# 1. Build the standalone application
npm run build
# 2. Start the production server via Bun
npm run startNote: The build script automatically copies
.next/staticandpublic/assets into the standalone output directory for seamless self-hosting.
Because MittenOS operates entirely client-side, it can be deployed as a static export (out/). Pushes to the main branch are automatically deployed via the .github/workflows/deploy.yml workflow.
- Create the Cloudflare Pages project:
npx wrangler pages project create mittenos --production-branch=main
- Configure GitHub Repository Secrets (Settings → Secrets and variables → Actions):
CLOUDFLARE_API_TOKEN: API token with Cloudflare Pages: Edit permissions.CLOUDFLARE_ACCOUNT_ID: Your Cloudflare Account ID.
- Custom Domain (Optional): Attach your custom domain (e.g.,
mittenai.dev) in the Cloudflare Pages dashboard.
To test the Cloudflare Pages static build locally before pushing:
npm run preview:pagesThis project is licensed under the MIT License. See the LICENSE file for details.