Stop wrestling with Photoshop. Start generating "content."
Get Started ยท Features ยท Architecture ยท Contributing
โ ๏ธ A Note on "Art"Let's be real: what this tool produces is not art. It's AI-generated images arranged into panels. Real comics are made by artists who spent years mastering anatomy, perspective, and storytelling through sequential imagery. This is... not that.
Graphix is for rapid prototyping, concept visualization, moodboards, and having fun. If you're using this to replace actual artists, please reconsider your life choices. If you're using it to iterate on ideas before hiring an artist, or just messing aroundโwelcome aboard, ye scurvy dog. ๐ดโโ ๏ธ
We're not delusional. We're just building tools.
Creating visual narratives is a fragmented nightmare. You need Photoshop for editing, Midjourney for generation, ComfyUI for control, spreadsheets for character consistency, and a prayer for workflow sanity. The tools fight you instead of helping you iterate on ideas.
Graphix is an AI-native creation tool built for the workflow you actually need:
Characters that stay (somewhat) consistent. Panels that generate in context. Pages that compose themselves.
Instead of juggling 10 apps, Graphix gives you one unified workspace where characters remember their appearance (mostly), panels understand their narrative context, and you focus on the story, not the tools.
Is it art? No. Is it useful? Hell yes.
Define a character onceโspecies, colors, styleโand Graphix attempts visual consistency across panels. IP-Adapter embeddings, LoRA associations, and prompt fragments all managed automatically. Results may vary. Hands will still look weird.
Write your premise, break it into beats, and watch panels scaffold themselves. Narrative context flows into generation prompts automatically. Your story drives the slop, not the other way around.
Pose references, depth maps, lineart extractionโall the power of ComfyUI's ControlNet stacking, exposed through an ergonomic UI that doesn't require a PhD in diffusion models.
Every variant, every iteration, visualized as a D3-powered tree. Branch from any generation, compare results side-by-side, never lose a good idea to overwriting.
Drag panels into templates, adjust gutters, add captions. WYSIWYG page composition that exports to print-ready PDFs or image sequences.
Your data, your machine. SQLite database, local file storage, no cloud dependency. Deploy to Turso when you're ready to share your magnificent AI slop with the world.
| Traditional AI Workflow | Graphix | |
|---|---|---|
| Character Consistency | Manual prompt copy-paste | โ Automatic embedding + LoRA |
| Panel Context | Noneโeach gen is isolated | โ Story beats inform prompts |
| ControlNet | ComfyUI node spaghetti | โ Visual preset picker |
| Version History | Overwrite and pray | โ Full generation tree |
| Page Layout | Photoshop/InDesign | โ Built-in composer |
| Data Ownership | Cloud lock-in | โ Local-first, your files |
| Self-Awareness | "AI art is real art!" | โ We know what this is |
| Dashboard | Story Editor | Generation Tree |
|---|---|---|
| Project overview with characters | Narrative-driven panel creation | D3 visualization of all variants |
Full UI launching soon
Graphix is a monorepo with clean separation between business logic, API adapters, and UI.
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ UI (PWA) โ
โ React 19 ยท TanStack Router ยท Zustand ยท Fabric.js โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ @graphix/server โ
โ Hono REST API ยท MCP Server ยท OpenAPI Spec โ
โโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ โ
โผ โผ
โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ @graphix/core โ โ ComfyUI MCP โ
โ Business Logic โ โ Image/Video Generation via MCP โ
โ Drizzle ORM โ โ โ
โโโโโโโโโโฌโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โผ
โโโโโโโโโโโโโโโโโโโ
โ SQLite/Turso โ
โ Database โ
โโโโโโโโโโโโโโโโโโโ
| Package | Purpose |
|---|---|
@graphix/core |
Pure business logicโservices, generation, composition. Zero transport concerns. |
@graphix/server |
REST API (Hono) + MCP server. OpenAPI spec with Zod schemas. |
@graphix/client |
Type-safe TypeScript client generated from OpenAPI spec. |
@graphix/ui |
React frontendโdashboard, editors, canvas, generation tree. |
| Layer | Technology | Why |
|---|---|---|
| Runtime | Bun | Fast, TypeScript-native, great DX |
| Frontend | React 19, TanStack Router | Modern React with file-based routing |
| State | Zustand + Immer | Simple, performant state management |
| Styling | Panda CSS | Type-safe, zero-runtime CSS-in-JS |
| Canvas | Fabric.js | Proven canvas library for composition |
| Visualization | D3.js | Generation tree rendering |
| API | Hono | Fast, lightweight, middleware ecosystem |
| Database | Drizzle ORM + SQLite/Turso | Type-safe, local-first with cloud option |
| Validation | Zod | Runtime validation + OpenAPI generation |
| Testing | Bun Test, Vitest, Playwright | Unit, integration, E2E coverage |
| Desktop | Tauri | Native app distribution |
- Bun 1.0+
- ComfyUI (for image generation)
- comfyui-mcp (MCP bridge)
# Clone the repository
git clone https://github.com/Peleke/graphix.git
cd graphix
# Install dependencies
bun install
# Set up environment
cp .env.example .env# .env
# Database (SQLite for local, Turso for cloud)
STORAGE_MODE=sqlite
DATABASE_URL=file:./graphix.db
# For Turso (optional)
# STORAGE_MODE=turso
# TURSO_DATABASE_URL=libsql://your-db.turso.io
# TURSO_AUTH_TOKEN=your-token
# ComfyUI MCP
COMFYUI_MCP_URL=http://localhost:3001
# Text Generation (optional)
OLLAMA_URL=http://localhost:11434# Push schema to database
bun run db:push
# Or run migrations
bun run db:migrate# Start everything (recommended)
bun run dev
# Or start individually:
# Terminal 1: API server (port 3002)
cd packages/server && bun run dev
# Terminal 2: UI (port 5173)
cd packages/ui && bun run devOpen http://localhost:5173 ๐
Graphix exposes 200+ tools via MCP for AI-assisted comic creation.
Option A: Install from npm (recommended)
{
"mcpServers": {
"graphix": {
"command": "npx",
"args": ["-y", "@graphix/server"],
"env": {
"COMFYUI_MCP_URL": "http://localhost:3001"
}
}
}
}Option B: Run from source (for development)
{
"mcpServers": {
"graphix": {
"command": "bun",
"args": ["run", "/path/to/graphix/packages/server/src/bin-mcp.ts"],
"env": {
"COMFYUI_MCP_URL": "http://localhost:3001"
}
}
}
}The only required env var is COMFYUI_MCP_URL. SQLite database auto-creates on first run. See docs/MCP.md for the full tool reference and optional configuration.
graphix/
โโโ packages/
โ โโโ core/ # Business logic
โ โ โโโ src/
โ โ โ โโโ db/ # Drizzle schema & connection
โ โ โ โโโ services/ # Project, Character, Panel, etc.
โ โ โ โโโ generation/ # ComfyUI client, ControlNet, LoRA
โ โ โ โโโ composition/ # Page layout, export
โ โ โ โโโ utils/ # Security, upload handling
โ โ โโโ package.json
โ โ
โ โโโ server/ # API layer
โ โ โโโ src/
โ โ โ โโโ rest/ # Hono routes
โ โ โ โโโ mcp/ # MCP server
โ โ โ โโโ openapi/ # OpenAPI spec generation
โ โ โโโ package.json
โ โ
โ โโโ client/ # Generated TypeScript client
โ โ โโโ src/
โ โ
โ โโโ ui/ # React frontend
โ โโโ src/
โ โ โโโ routes/ # TanStack Router pages
โ โ โโโ components/ # React components
โ โ โ โโโ dashboard/ # Project list, cards
โ โ โ โโโ characters/ # Character editor, LoRA browser
โ โ โ โโโ generation-tree/ # D3 visualization
โ โ โ โโโ panel-generator/ # Panel creation UI
โ โ โ โโโ page-composer/ # Canvas composition
โ โ โโโ api/ # TanStack Query hooks
โ โ โโโ stores/ # Zustand stores
โ โ โโโ theme/ # Design tokens
โ โโโ e2e/ # Playwright tests
โ โโโ package.json
โ
โโโ docs/ # Planning & documentation
โโโ scripts/ # Build & deploy scripts
โโโ package.json # Workspace root
# Run all tests
bun test
# Run by package
cd packages/core && bun test # 1941 tests
cd packages/server && bun test # 583 tests
cd packages/ui && bun run test # 876 tests (Vitest)
# E2E tests
cd packages/ui && bun run test:e2e
# Watch mode
bun test --watch| Package | Tests | Coverage |
|---|---|---|
| @graphix/core | 1,941 | Services, generation, composition |
| @graphix/server | 583 | REST routes, contract tests |
| @graphix/ui | 876 | Stores, hooks, components |
| Total | 3,400 | Full stack coverage |
The REST API is fully documented with OpenAPI 3.0. Start the server and visit:
- Swagger UI: http://localhost:3002/api/docs
- OpenAPI Spec: http://localhost:3002/api/docs/spec.json
| Endpoint | Description |
|---|---|
GET /api/projects |
List all projects |
POST /api/projects |
Create new project |
GET /api/characters |
List characters for a project |
POST /api/panels/:id/generate |
Generate panel image |
GET /api/generations/:panelId |
Get all generations for a panel |
POST /api/composition/export |
Export page as PDF/PNG |
- Project & character management
- Story scaffolding (premise โ beats โ panels)
- Panel generation with ControlNet
- Generation tree visualization
- Page composition & export
- Full E2E flow validation
- Click panel โ I2V animation
- Audio integration
- Timeline editor
- T2I โ I2V โ V2V pipeline
- Scene-based workflow
- Multi-minute video export
- Fork the repository
- Create a feature branch (
git checkout -b feat/amazing-feature) - Write tests for your changes
- Run the test suite (
bun test) - Commit with conventional commits (
git commit -m 'feat: add amazing feature') - Push and open a Pull Request
MIT License โ see LICENSE for details.
- ComfyUI โ The backbone of image generation
- comfyui-mcp โ MCP bridge for ComfyUI
- Hono โ Lightning-fast web framework
- TanStack โ Router & Query excellence
- D3.js โ Generation tree visualization
- Actual artists โ Who do the real thing. Hire them.
Built for rapid iteration, not artistic pretension.
๐ดโโ ๏ธ ARRR, NOW GO GENERATE SOME MAGNIFICENT SLOP! ๐ดโโ ๏ธ