A powerful Next.js application for generating and managing AI images for Webflow CMS collections. This tool integrates with OpenAI (DALL-E) and Webflow to automate the process of creating and updating OG images and other assets for your CMS items.
Check out our other tools and resources:
- Beton App - The main application.
- Beton Facade - Manage your AI facades.
- Beton Blog - Tips, tricks, and updates.
- Webflow Integration: Seamlessly connect to your Webflow sites and collections.
- AI Image Generation: Generate images using OpenAI's DALL-E 3 based on your CMS content.
- Automated Updates: Automatically upload generated images to Webflow and update CMS items.
- Billing System: Integrated Stripe billing for pay-as-you-go usage.
- SEO Tools: Built-in SEO auditing and improvement suggestions (using Ahrefs data).
- All text edits and AI generations are staged locally; nothing is pushed to Webflow until you press Publish.
- Generate Selected counts only the visible columns in the grid. If 9 rows are selected and 5 columns are visible, only 45 fields are generated.
- Free limit =
5 * (visible columns)fields. Usage is tracked per field; inline single-field generation consumes 1 free field if applicable. - Inline actions: click/drag-drop on image cells to stage uploads; use the wand button to generate a single field immediately (still staged).
- SEO/meta ready: all CMS fields, including SEO/open graph fields returned by Webflow, are surfaced for editing and generation.
- Generations run field-by-field with full row context and field names to keep prompts accurate and avoid failing entire batches.
- Publishing from this tool updates CMS items only; republishing the live site must be confirmed separately inside Webflow.
- Node.js 18+
- Supabase Account
- Webflow Account (and API Token)
- OpenAI API Key
- Stripe Account
git clone https://github.com/getbeton/facade
cd webflow-cms-image-generator
npm installCopy the example environment file:
cp env.example .env.localFill in your credentials in .env.local:
- Supabase: URL and Anon Key.
- Stripe: Secret Key, Webhook Secret, Publishable Key.
- App URL:
http://localhost:3000for development.
This project uses Supabase for the backend. You need to apply the database migrations to set up the schema.
- Install Supabase CLI (if not installed).
- Login to Supabase:
supabase login - Link your project:
supabase link --project-ref your-project-ref - Apply migrations:
supabase db pushThis project uses Supabase (PostgreSQL). The schema is managed via migrations in supabase/migrations.
-
integrations- Stores user API keys (Webflow, OpenAI) encrypted.
- Linked to
profiles.
-
sites- Stores connected Webflow sites.
- Tracks preferred domains (
primary_domainfor the first custom domain if present,webflow_domainfallback,custom_domainsJSONB). - Linked to
integrations.
-
collections- Stores Webflow collections synced from sites.
- Includes
collection_slugandurl_baseto build per-item URLs from slugs. - Linked to
sites.
-
profiles- Extends Supabase Auth users.
- Tracks free tier usage and Stripe customer ID.
-
payments- Stores Stripe payment records for pay-as-you-go.
-
generation_logs- Tracks every image generation attempt, cost, and status.
-
seo_generations- Tracks SEO metadata generation requests.
-
seo_suggestions- Stores generated SEO suggestions (title/description) for review.
-
publications- One row per publish action; references
profiles,collections, andsites. - Stores totals for items/fields, success/failure counts, status, and timestamps.
- One row per publish action; references
-
publication_items- Per-CMS-item results for each publication.
- References
publications(and indirectly the user) pluscollections; stores slug/url, field totals, status, and errors.
To enable Google Login:
- Go to the Google Cloud Console.
- Create a new OAuth 2.0 Client ID.
- Add
https://<your-project>.supabase.co/auth/v1/callbackto Authorized redirect URIs. - Add your Google Client ID and Secret to your Supabase Auth settings.
- In Supabase > Authentication > URL Configuration, add
http://localhost:3000/**to Redirect URLs.
npm run devOpen http://localhost:3000 to view the app.
Use the dev compose stack to run the app in Docker while keeping hot code reloading:
cp env.example .env.local # if you have not created it yet
docker compose -f docker-compose.dev.yml up --build- The container installs dependencies into an internal
node_modulesvolume, so your host stays clean. - Code edits on the host are watched with polling (
WATCHPACK_POLLING/CHOKIDAR_USEPOLLING) and reload automatically. - The app listens on
http://localhost:3000inside Docker; update.env.localas needed for Supabase/Stripe keys before starting. - Stop with
docker compose -f docker-compose.dev.yml down(add-vif you want to clear thenode_modulesvolume).
Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.
This project is licensed under the MIT License - see the LICENSE file for details.