PanelMint is a local-first AI-assisted text-to-comic generator.
The open-source runtime is centered on:
- Next.js 16 + React 19 frontend.
- Single local workspace owner, with no hosted identity service in OSS v1.
- Postgres via Prisma.
- Local DB-backed worker queue.
- Local generated asset storage.
- WaveSpeed BYOK through
WAVESPEED_API_KEY.
npm install
cp .env.example .env
docker compose up -d --wait
npx prisma generate
npx prisma migrate deploy
npm run devThe app runs at http://localhost:3000.
Run the local worker in a second terminal while the app is running:
npm run workerThe worker processes queued analysis, storyboard, character sheet, and image jobs. Generated images are stored under PANELMINT_STORAGE_DIR, which defaults to .panelmint/generated.
Use the sample manuscript in examples/sample-manuscript.md, then follow examples/local-generation-workflow.md.
Real generation requires a WaveSpeed key:
WAVESPEED_API_KEY=your_key_herePanelMint reads that key from .env. It does not store provider keys in the database.
npx prisma validate
npm test
npm run build
curl http://localhost:3000/api/health/api/health returns degraded status when generation env is missing. If only WAVESPEED_API_KEY is missing, setup is still close: add the key to .env before running real generation.
| Variable | Required | Notes |
|---|---|---|
DATABASE_URL |
Yes | Postgres runtime connection string. The default .env.example value matches docker-compose.yml. |
DIRECT_URL |
Optional | Direct Postgres connection for Prisma migrations. For local Docker setup, use the same value as DATABASE_URL. |
WAVESPEED_API_KEY |
Yes for generation | Your WaveSpeed API key; used for both LLM and image generation. |
WAVESPEED_BASE_URL |
Optional | Defaults to https://api.wavespeed.ai/api/v3; override only for a WaveSpeed-compatible proxy. |
ALLOWED_ORIGINS |
Optional | Extra trusted origins for mutating requests. Local same-origin requests work without extra values. |
PANELMINT_STORAGE_DIR |
Optional | Local directory for generated images; defaults to .panelmint/generated. |
IMAGE_MODEL |
Optional | WaveSpeed image model override. |
LLM_MODEL |
Optional | WaveSpeed LLM model override. |
IMAGE_RATE_LIMIT |
Optional | Local image request concurrency budget. |
IMAGE_RATE_LIMIT_TIMEOUT_MS |
Optional | Timeout for waiting on image generation budget. |
The default setup uses local Docker Postgres. To use a hosted Postgres database instead, replace DATABASE_URL and DIRECT_URL in .env with that provider's connection strings, then run:
npx prisma migrate deployStart the local database and apply migrations:
docker compose up -d --wait
npx prisma migrate deployMake sure .env uses:
DATABASE_URL=postgresql://postgres:change-local-dev-password@127.0.0.1:15432/panelmint?schema=public
DIRECT_URL=postgresql://postgres:change-local-dev-password@127.0.0.1:15432/panelmint?schema=publicSet WAVESPEED_API_KEY in .env, then restart npm run dev and npm run worker.
Start the worker in a second terminal:
npm run workerCheck PANELMINT_STORAGE_DIR in .env. The default path is .panelmint/generated. Make sure the process can create and write to that directory.
Regenerate the Prisma client and rerun checks:
npx prisma generate
npx prisma validate
npm run buildUse the local red-green-refactor loop for behavior changes in src/app, src/lib, src/app/api, src/components, and src/hooks.
- Write or update the failing test first.
- Run that targeted test and confirm the failure.
- Make the smallest implementation that passes.
- Rerun the targeted test, then the owning folder suite when it exists.
- Run broader checks before opening a PR.
See CONTRIBUTING.md for contributor setup and expectations.
runIdin the public API maps toepisode.id.- Durable pipeline state lives in
pipeline_runs,pipeline_events, andpipeline_jobs. - Coarse UI state mirrors
episodes.status,episodes.progress, andepisodes.error. - Public examples live in
examples/.