← All templates

AI Image Generator

AI-first · React + Node (Express) · 20 @molecule/* packages

Text-to-image generation with gallery, variations, and style control — with built-in Stripe-backed subscription tiers

Open in Molecule

What is inside

  • auth
  • image-generation
  • gallery
  • image-editing
  • subscriptions

Screens (18)

  • Landing /
  • Login /login
  • Signup /signup
  • ForgotPassword /forgot-password
  • ResetPassword /reset-password
  • Dashboard /dashboard (signed in)
  • Generate /generate (signed in)
  • Gallery /gallery (signed in)
  • ImageDetail /images/:id (signed in)
  • Styles /styles (signed in)
  • Settings /settings (signed in)
  • Editor /editor/:id (signed in)
  • Collections /collections (signed in)
  • CollectionDetail /collections/:id (signed in)
  • Prompts /prompts (signed in)
  • Models /models (signed in)
  • Notifications /notifications (signed in)
  • Profile /profile/:id (signed in)

Data model (12 tables)

  • api_credentials — id, user_id, provider, encrypted_key, created_at, updated_at
  • collection_images — id, user_id, collection_id, image_id, position, created_at
  • collections — id, user_id, name, description, cover_image_id, is_public, created_at, updated_at
  • credit_ledger — id, user_id, delta, reason, reference_id, created_at
  • devices — id, createdAt, updatedAt, userId, name, pushPlatform, pushSubscription, hasPushSubscription
  • edit_sessions — id, user_id, base_image_id, kind, result_image_id, params, created_at, updated_at
  • generations — id, user_id, prompt, negative_prompt, revised_prompt, model, provider, style_id, …
  • images — id, generation_id, user_id, s3_key, url, mime, width, height, …
  • notifications — id, user_id, kind, title, body, link, read_at, created_at
  • payments — id, createdAt, updatedAt, userId, transactionId, productId, platformKey, data, …
  • prompt_library — id, user_id, title, prompt_text, negative_prompt, default_style_id, tags, position, …
  • style_presets — id, user_id, name, prompt_modifier, negative_modifier, sample_image_url, description, created_at, …

API (12 handlers)

  • api-keys api/src/handlers/api-keys.ts
  • bootstrap api/src/handlers/bootstrap.ts
  • collections api/src/handlers/collections.ts
  • credits api/src/handlers/credits.ts
  • gallery api/src/handlers/gallery.ts
  • generations api/src/handlers/generations.ts
  • models api/src/handlers/models.ts
  • notifications api/src/handlers/notifications.ts
  • plans api/src/handlers/plans.ts
  • profile api/src/handlers/profile.ts
  • prompts api/src/handlers/prompts.ts
  • styles api/src/handlers/styles.ts

Subscription tiers

free / pro / team — gated by: maxGallery, maxGenerations, advancedFeatures, canExport, retentionDays

Built from 20 @molecule/* packages

Browse all @molecule/* packages →

Required secrets

  • DATABASE_URL PostgreSQL connection string
  • OPENAI_API_KEY OpenAI API key for DALL-E
  • ANTHROPIC_API_KEY Anthropic API key for prompt enhancement
  • AWS_ACCESS_KEY_ID AWS access key for S3 uploads
  • AWS_SECRET_ACCESS_KEY AWS secret key for S3 uploads
  • S3_BUCKET S3 bucket name for image storage

The @molecule/* packages are Apache-2.0. The app you build from this template is yours to export and self-host. Licensing