Open source AI media indexer, protocol, and viewer.
Browse the live viewer at generatedgallery.com. No account needed.
Useful links:
Generated Gallery started as a searchable gallery of AI generated images and prompts. It is now moving toward an open stack for AI media discovery:
- Protocol: portable JSON records for generated media, prompts, safety flags, and provenance
- Indexer: source adapters that crawl public AI media sources and normalize metadata
- Registry: a Supabase/Postgres store with dedupe, filtering, and search
- Viewer: a Next.js app for browsing any compatible index
The goal is to make AI image discovery portable. Anyone should be able to crawl a source, publish a JSONL feed, and point a viewer at it.
Machine Dream Finds are small, themed AI image packs built on top of the protocol. Each pack is meant to be useful as a moodboard, prompt notebook, model test set, or agent-readable collection.
A good pack has:
- One memorable theme
- 5 to 12 images
- Prompt fragments where available
- Source URLs and provenance
- Safety labels
- A manifest so another viewer or crawler can inspect it
See the live hub at generatedgallery.com/machine-dream-finds and the publishing guide at generatedgallery.com/protocol/creator-kit.
- Browse thousands of AI images across categories like fantasy, portraits, sci-fi, anime, architecture, and more
- See the full prompt where available
- Search by title, description, or prompt text
- Download images from their upstream URLs
- NSFW toggle, off by default
- Upvote and save images
- Infinite scroll with masonry grid layout
- Mobile friendly
The v0.1 protocol spec lives in docs/protocol/README.md.
The canonical record schema lives in schemas/generated-gallery-record.schema.json.
A protocol record looks like this:
{
"id": "civitai:123456",
"url": "https://example.com/image.jpeg",
"source": { "site": "civitai.com", "url": "https://civitai.com/images/123456" },
"media": { "type": "image", "width": 1024, "height": 1024 },
"generation": { "prompt": "cinematic portrait", "model": "Flux" },
"taxonomy": { "category": "portraits", "tags": ["portrait"] },
"safety": { "nsfw": false, "rating": "sfw" },
"indexedAt": "2026-05-06T00:00:00.000Z"
}| Layer | Tech |
|---|---|
| Frontend | Next.js 14, TypeScript, Tailwind CSS |
| Database | Supabase, PostgreSQL |
| Indexer | Node.js crawlers |
| Feed format | JSONL plus JSON Schema |
| Hosting | PM2 or Vercel compatible |
- Node.js 18+
- Supabase project, free tier is enough for development
git clone https://github.com/generatedgallerybot/generatedgallery.git
cd generatedgallery
npm installCreate .env.local:
NEXT_PUBLIC_SUPABASE_URL=https://your-project-ref.supabase.co
NEXT_PUBLIC_SUPABASE_ANON_KEY=your-anon-key
SUPABASE_SERVICE_ROLE_KEY=your-service-role-keyRun the database schema:
npm run setup-dbStart the dev server:
npm run devOpen localhost:3000.
npm run crawlThe current crawler pulls from Civitai and writes normalized rows into Supabase. Source adapters will be split out as the open indexer matures.
npm run export:indexBy default this writes SFW records to public/index/generated-gallery.jsonl, plus:
public/index/manifest.json— feed metadata, record count, checksum, source/category countspublic/index/generated-gallery.sample.json— first 3 sample records for quick inspection
You can pass a path and limit:
npm run export:index -- ./exports/sfw.jsonl 5000Or use explicit flags:
npm run export:index -- --out ./exports/all.jsonl --limit 5000 --safety all
npm run validate:index -- ./exports/all.jsonldocs/protocol/ protocol spec and feed notes
schemas/ JSON Schema for portable records
scripts/ crawlers, dedupe, and export tools
src/app/ Next.js App Router pages
src/components/ viewer UI components
src/lib/ Supabase client, protocol mapping, utilities
migrations/ database migrations
See CONTRIBUTING.md for adapter contracts, JSONL import/export workflows, verification commands, and safety/provenance rules.
Useful contributions:
- Source adapters for new AI media sites
- Better prompt and model metadata extraction
- Deduplication improvements
- Search improvements, including embeddings or hybrid search
- Static JSONL feed support in the viewer
- Moderation and provenance tooling
- Docs for running a mirror
Open an issue before large changes so we can keep the protocol small and useful.
MIT
Media rights and licenses remain with the upstream creators and source platforms. Generated Gallery records provenance instead of erasing it.
Live: generatedgallery.com
