RepositoryTypeScript
clawnify

clawnify/OpenStudio

Open-source Higgsfield alternative — AI image generation studio with justified gallery and node-based workflows. Preact + Tailwind + Hono + SQLite.

77stars
16forks
0issues
2views

Featured achievements

The project's latest awards

2
TINIX TRENDING·Topic: creative-tools

#2 Repository of the week

2
TINIX TRENDING·Topic: clawnify

#2 Repository of the week

2
TINIX TRENDING·Topic: ai-image-generator

#2 Repository of the week

OpenStudio preview

OpenStudio

Deploy with Clawnify

A visual AI image generation studio with a justified gallery and node-based workflow editor. Built with Preact + Tailwind CSS + Hono + D1. Deploys to Cloudflare Workers via Clawnify.

Features

  • Quick Generate — prompt bar with model, aspect ratio, resolution, and batch count selectors
  • Justified gallery — generated images displayed in a pixel-perfect justified layout preserving aspect ratios
  • Image-to-image — drag a generated image or upload a file as source for the next generation
  • Node-based workflows — React Flow editor for building reusable multi-step generation pipelines
  • Style presets — save a look once (written direction, hex palette, reference images) and reuse it across every workflow, from a Style node on the canvas or the Quick Generate bar. Reference images are sent only to models that accept them; the rest still get the written direction and palette
  • Prompt variables — type / in a prompt node to reference another prompt's content with {{}} syntax, rendered as inline pills
  • Auto-naming — prompt nodes automatically get a descriptive title via Gemini 3.1 Flash Lite on blur
  • Editable titles — double-click any node title to rename it
  • 10+ models — Gemini 3.1 Flash, Gemini 3 Pro, GPT Image 1, FLUX.2 Max, SeedDream 4.5, and more via OpenRouter
  • Live model list — every image model OpenRouter currently offers, fetched at request time rather than hardcoded, so a withdrawn model disappears from the picker instead of failing mid-run
  • Cost visibility — each model is tagged $–$$$$ by relative price, and every generation records what the provider actually billed, with per-run and per-workflow totals
  • Generation history — all generations persisted with prompt, model, cost, and image
  • Node version history — browse every generation a node ever produced across runs, restore any past run's snapshot to the canvas
  • Side-by-side compare — pick any two outputs to compare full-screen, with per-image download and restore
  • Dual-mode UI — human-optimized + AI-agent-optimized (?agent=true)
  • Lightbox — click any image to view full-size
  • Drag-to-reuse — drag generated images into the prompt bar to use as input

Quickstart

git clone https://github.com/clawnify/OpenStudio.git
cd open-studio
pnpm install

Create a .dev.vars file with your OpenRouter API key:

OPENROUTER_API_KEY=your-key-here

Start the dev server:

pnpm dev

Open http://localhost:5173 in your browser. The database schema is applied automatically on startup.

Agent Mode

Append ?agent=true to the URL for an agent-friendly UI with always-visible delete buttons and large click targets.

Tech Stack

LayerTechnology
FrontendPreact, TypeScript, Tailwind CSS v4, Vite
Node EditorReact Flow (@xyflow/react) via Preact compat
BackendHono (Cloudflare Worker)
DatabaseD1 (SQLite at the edge)
StorageR2 (file uploads)
AIOpenRouter API (chat completions + image generation)

Prerequisites

Architecture

schema.sql    — Canonical database schema (workflows, generations)
src/
  server/
    index.ts    — Hono API with D1 middleware
    db.ts       — D1-native database adapter
    uploads.ts  — R2 file storage adapter
  client/
    app.tsx           — Root component with Generate/Workflows tabs
    context.tsx       — Preact context for workflow state
    hooks/use-workflow.ts — Workflow state management + execution engine
    components/
      quick-generate.tsx  — Generation view with justified gallery
      workflow-canvas.tsx — React Flow canvas wrapper
      sidebar.tsx         — Node palette + workflow list + history
      toolbar.tsx         — Workflow name + save/execute buttons
      nodes/
        node-header.tsx       — Shared editable node header
        prompt-node.tsx       — Text prompt with / variable autocomplete
        generate-node.tsx     — AI image generation node
        image-input-node.tsx  — Reference image upload node
        style-node.tsx        — Applies a saved style preset downstream
        output-node.tsx       — Result display node

Schema & Migrations

schema.sql at the project root is the canonical database schema for fresh deployments. Edit it directly to add tables, columns, or indexes — this is the file maintainers own.

On a fresh deploy, Clawnify applies schema.sql to an empty D1 once and records a baseline hash in the deployed instance's tracking table. From then on, the deployed instance evolves via auto-generated migration files (Clawnify's app-builder agent authors them when the user asks for schema changes). Existing deployed instances are not retroactively migrated when this file changes — only new deploys pick up the updated baseline.

Inside a deployed instance, schema.sql becomes an auto-regenerated snapshot of the live D1 — do not hand-edit it there. In this template repo, you do edit it directly.

API Endpoints

MethodEndpointDescription
GET/api/workflowsList all workflows
POST/api/workflowsCreate a workflow
GET/api/workflows/:idGet a workflow
PUT/api/workflows/:idUpdate a workflow
DELETE/api/workflows/:idDelete a workflow
POST/api/generateGenerate image via OpenRouter (returns costUsd)
GET/api/modelsList available image models, with relative price
GET/api/generations/:workflowIdList generations for a workflow
POST/api/generationsSave a generation record
GET/api/style-presetsList style presets
POST/api/style-presetsCreate a style preset
PUT/api/style-presets/:idUpdate a style preset
DELETE/api/style-presets/:idDelete a style preset
POST/api/suggest-nameAuto-suggest a node title via Gemini
POST/api/uploadsUpload an image file
GET/api/uploads/:filenameServe an uploaded image

Deploy

npx clawnify deploy

License

MIT

Similar Projects

Discover other similar projects and AI models.

RepositoryJavaScript
affaan-m/ECC

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

315.1k
Dec 1, 2026
RepositoryTypeScript
deepseek-ai/deepseek-harness

DeepSeek Harness: Everything is a Plugin.

290.1k
Nov 28, 2026
RepositoryJavaScript
DietrichGebert/ponytail

Makes your AI agent think like the laziest senior dev in the room. The best code is the code you never wrote.

203.5k
Nov 22, 2026
RepositoryTypeScript
thedotmack/claude-mem

Persistent Context Across Sessions for Every Agent – Captures everything your agent does during sessions, compresses it with AI, and injects relevant context back into future sessions. Works with Claude Code, OpenClaw, Codex, Gemini, Hermes, Copilot, OpenCode + More

121.3k
Dec 2, 2026
RepositoryPython
rohitg00/ai-engineering-from-scratch

Learn AI Engineering! Learn it. Build it. Ship it for others.

81.4k
Nov 30, 2026
RepositoryPython
NousResearch/hermes-agent

The agent that grows with you

267.7k
Dec 2, 2026
RepositoryJavaScript
Leonxlnx/taste-skill

Agent skills that give coding agents taste: art direction, reference images and a browser check instead of generic AI pages

124.6k
Nov 26, 2026
RepositoryTypeScript
glanderness/BeefTV

High-performance · Lightweight · AI Native Video workspace. 面向 AI 时代的视频创作工作台。 在画布中,和Agent一起自由连接创意和素材。

2.7k
Nov 30, 2026
RepositoryTypeScript
clawnify/OpenDesign

Open-source Canva alternative — design editor for social media graphics. Fabric.js + Preact + Hono + SQLite.

146
Nov 29, 2026