Skip to content

Latest commit

Β 

History

75 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Micracode
Open-Source AI Web App Builder

Micracode Demo

Describe an app in natural language and Micracode streams code into an in-browser workspace.
Iterate by chat or edit the code directly in a Monaco editor β€” everything runs on your laptop.


License: MIT Next.js 15 Electron TypeScript


Your local AI coding workspace β€” no database, no auth, and cloud sharing only when you ask.


Quick Install

Micracode ships as a desktop app. Download the latest macOS build from the Releases page, open it, and you're ready to go β€” no Node.js, no Python, no separate backend to run. The core backend runs in-process inside the app.

1. Add an API key

On first launch, open Settings and paste a key for whichever LLM provider you want to use β€” OpenAI, Google (Gemini), or Anthropic. The model picker shows whichever providers have a key set. Keys are stored locally in a config file on your machine; nothing is sent to a Micracode server.

2. Build something

  • Type a description on the home screen β†’ Micracode generates a working project
  • Chat to iterate, edit code in the Monaco editor, and preview your app live
  • Projects are saved as plain folders at ~/opener-apps/

Getting started & staying tuned with us.

Star us, and you will receive all release notifications from GitHub without any delay!


Features

Image 1 Image 2
  • ** Temporary Preview Links** β€” Explicitly build and share a public static preview through temp.md, then update the same URL or revoke it from the workspace.

Tech Stack

Core backend (@micracode/core)

  • TypeScript β€” runs in-process inside the Electron main (no spawned child)
  • pi coding agent SDK β€” LLM orchestration and tool use
  • Hono β€” the /v1 HTTP + SSE app the renderer talks to
  • Event-sourced β€” an append-only log backs /v1/events and the live stream

Desktop shell

  • Electron 33 β€” packages the web UI + core into a native app
  • electron-builder + electron-updater β€” builds and auto-updates releases

Frontend (apps/web)

  • Next.js 15 β€” React framework with App Router
  • React 19 β€” Latest React with concurrent features
  • Tailwind CSS β€” Utility-first CSS framework
  • Radix UI + shadcn/ui β€” Accessible component primitives
  • Monaco Editor β€” VS Code's editor in the browser
  • Zustand β€” Lightweight state management
  • ai-sdk β€” Vercel AI SDK for chat streaming

Tooling

  • Bun β€” JS workspace manager and runtime
  • TypeScript β€” End-to-end type safety, with shared types in packages/shared

Development Setup

For contributors and people building from source. If you just want to use Micracode, download it from Releases.

Prerequisites

  • Node.js v22.18.0 (pinned via .nvmrc)
  • Bun β‰₯ 1.1.0
  • An OpenAI, Google Gemini, or Anthropic API key

Environment Setup

Copy the example env file and add your key(s):

cp .env.example .env
$EDITOR .env

Minimum config (any one provider key works):

NEXT_PUBLIC_API_BASE_URL=http://localhost:8000
OPENAI_API_KEY=your_openai_api_key
# or GOOGLE_API_KEY / ANTHROPIC_API_KEY

Projects are written to ~/opener-apps by default; override with OPENER_APPS_DIR.

Installation

nvm use                # picks up .nvmrc -> Node 22.18.0
bun install            # installs all workspaces (web, core, desktop, shared)

Running the Application

Run the desktop app in dev (web UI + core inside Electron):

bun run desktop

Or run the web + core stack in the browser (no Electron):

bun run dev            # Next.js on :3000, @micracode/core on :8000

You can also run them individually:

bun run dev:web        # Next.js only
bun run dev:core       # @micracode/core only (PORT=8000)

Open http://localhost:3000 (or the desktop window), type a project description into the prompt box, and you're off.

Building a Release

bun run build          # build the Next.js frontend
bun run desktop:release # package a signed macOS app via electron-builder

Project Structure

micracode/
β”œβ”€β”€ apps/
β”‚   β”œβ”€β”€ web/                    # Next.js 15 frontend (renderer)
β”‚   β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”‚   β”œβ”€β”€ app/            # App Router pages
β”‚   β”‚   β”‚   β”œβ”€β”€ components/     # React components (incl. shadcn/ui)
β”‚   β”‚   β”‚   β”œβ”€β”€ lib/            # Utilities, API clients, generated types
β”‚   β”‚   β”‚   └── store/          # Zustand stores
β”‚   β”‚   └── package.json
β”‚   β”‚
β”‚   β”œβ”€β”€ core/                   # @micracode/core β€” TS backend (in-process)
β”‚   β”‚   └── src/
β”‚   β”‚       β”œβ”€β”€ server.ts       # Hono /v1 app
β”‚   β”‚       β”œβ”€β”€ sessions.ts     # one pi agent run per session
β”‚   β”‚       β”œβ”€β”€ eventlog.ts     # append-only event log
β”‚   β”‚       β”œβ”€β”€ storage.ts      # local filesystem project storage
β”‚   β”‚       └── index.ts        # startCoreServer() entry point
β”‚   β”‚
β”‚   └── desktop/                # Electron shell
β”‚       β”œβ”€β”€ src/main.ts         # imports the core, serves the renderer
β”‚       └── electron-builder.config.js
β”‚
β”œβ”€β”€ packages/
β”‚   └── shared/                 # Shared TypeScript types (stream event contract)
β”‚
β”œβ”€β”€ docs/                       # End-user documentation
└── README.md

API Endpoints

The core exposes a /v1 HTTP + SSE contract that the renderer speaks.

Method Endpoint Description
GET /v1/health Service health check
GET /v1/models List available LLM models (per configured keys)
GET/POST /v1/settings Read / update provider keys
POST /v1/generate Stream code generation events (SSE)
GET/POST /v1/projects List / create projects
GET/DELETE /v1/projects/{id} Get / delete a project
GET/PUT /v1/projects/{id}/files Read / write project files
GET /v1/projects/{id}/prompts Prompt history
GET/POST/DELETE /v1/projects/{id}/temp-preview Inspect, publish/update, or revoke a temp.md static preview
POST /v1/sessions Start an agent session
POST /v1/sessions/{id}/turn Send a turn to a session
POST /v1/sessions/{id}/interrupt resume Control a running session
DELETE /v1/sessions/{id} Stop a session
GET /v1/events , /v1/events/stream Event log (poll / SSE)

Some endpoints (VCS/checkpoints, threads, command bus, project download, snapshots) are stubbed and return 501 β€” see apps/core/README.md for the full status of the vertical slice.


Documentation

End-user docs live in docs/:


Useful Scripts

bun run desktop        # Electron app in dev (web + core in-process)
bun run dev            # web + core in the browser (:3000 / :8000)
bun run dev:web        # Next.js only
bun run dev:core       # @micracode/core only
bun run build          # build the Next.js frontend
bun run desktop:release # package a macOS release
bun run typecheck      # TS across all workspaces
bun run lint           # eslint across workspaces
bun run format         # prettier

Contributor β™₯️

Big thanks to everyone who's been part of the Micracode journey.

Micracode is a community effort, and it keeps getting better because of people like you.

Contributors


License

This project is licensed under the MIT License.


Contributing

Contributions are welcome! Feel free to open issues and pull requests.


Join our community Discord

About

Open Source Alternative to Lovable, v0, Bolt, Replit, Emergent. 🌟 Star if you like it!

Topics

Resources

Contributing

Stars

278 stars

Watchers

4 watching

Forks

Releases

Packages

Contributors

Languages