中文文档 | English
Visit Pixmind Official Site - The complete AI platform for image generation, video creation, and more.
A production-ready Next.js 15 SaaS template for building AI-powered image generation applications. Ship your AI startup in hours, not weeks.

This is the open-source version of the Pixmind AI Agent template, perfect for developers who want to build their own AI SaaS application.
Looking for more?
git clone https://github.com/yourusername/ai-image-saas.git
cd ai-image-saas
pnpm install
cp .env.example .env.local
Edit .env.local with your credentials:
# Required: NextAuth
AUTH_SECRET="your-secret-here"
AUTH_GOOGLE_ID="your-google-client-id"
AUTH_GOOGLE_SECRET="your-google-client-secret"
# Required: Supabase
SUPABASE_URL="your-supabase-url"
SUPABASE_ANON_KEY="your-supabase-anon-key"
SUPABASE_SERVICE_ROLE_KEY="your-service-role-key"
# Required: Cloudflare R2 Storage (for AI-generated images/videos)
STORAGE_ENDPOINT="https://your-account-id.r2.cloudflarestorage.com"
STORAGE_REGION="auto"
STORAGE_ACCESS_KEY="your-r2-access-key-id"
STORAGE_SECRET_KEY="your-r2-secret-access-key"
STORAGE_BUCKET="your-bucket-name"
STORAGE_DOMAIN="" # Optional: custom domain
# Optional: AI Providers
EVOLINK_API_KEY="your-evolink-api-key"
EVOLINK_API_URL="https://api.evolink.ai"
📖 New to R2? See our R2 Quick Start Guide for detailed setup instructions.
pnpm dev
Open http://localhost:3006 to see your app.
Update theme colors in app/theme.css:
app/theme.cssUpdate project name:
NEXT_PUBLIC_PROJECT_NAME in .env.locali18n/messages/en.json and i18n/messages/zh.jsonEdit landing page translations in:
i18n/pages/landing/en.json - English contenti18n/pages/landing/zh.json - Chinese contentAdd your AI provider credentials in .env.local:
# Evolink (nano-banana model)
EVOLINK_API_KEY="sk-your-key"
EVOLINK_API_URL="https://api.evolink.ai"
# Add more providers as needed
Google OAuth:
http://localhost:3006/api/auth/callback/googlehttps://yourdomain.com/api/auth/callback/google.env.localpnpm dev # Start development server (port 3006)
pnpm build # Build for production
pnpm start # Start production server
pnpm lint # Run ESLint
pnpm analyze # Analyze bundle size
├── app/
│ ├── [locale]/ # Localized routes
│ │ ├── (default)/ # Main app pages
│ │ ├── (admin)/ # Admin dashboard
│ │ └── (console)/ # User console
│ └── api/ # API routes
│ └── ai/ # AI generation endpoints
├── components/
│ ├── ui/ # Shadcn UI components
│ ├── blocks/ # Reusable page sections
│ └── auth/ # Authentication components
├── lib/ # Utility libraries
├── i18n/ # Internationalization
│ ├── messages/ # Global translations
│ └── pages/ # Page-specific translations
├── types/ # TypeScript definitions
└── public/ # Static assets
cp .env.example .env.production
cp wrangler.toml.example wrangler.toml
Edit .env.production with your production values
Add environment variables to wrangler.toml under [vars]
Deploy
pnpm cf:build
pnpm cf:deploy
docker build -f Dockerfile -t ai-image-saas:latest .
docker run -p 3000:3000 ai-image-saas:latest
| Variable | Description | Example |
|---|---|---|
AUTH_SECRET | NextAuth secret key | Generate with openssl rand -base64 32 |
AUTH_GOOGLE_ID | Google OAuth Client ID | xxx.apps.googleusercontent.com |
AUTH_GOOGLE_SECRET | Google OAuth Client Secret | GOCSPX-xxx |
SUPABASE_URL | Supabase project URL | https://xxx.supabase.co |
SUPABASE_ANON_KEY | Supabase anonymous key | eyJxxx... |
SUPABASE_SERVICE_ROLE_KEY | Supabase service role key (server-side only) | eyJxxx... |
STORAGE_ENDPOINT | Cloudflare R2 endpoint | https://xxx.r2.cloudflarestorage.com |
STORAGE_REGION | R2 region (use "auto") | auto |
STORAGE_ACCESS_KEY | R2 access key ID | Your R2 access key |
STORAGE_SECRET_KEY | R2 secret access key | Your R2 secret |
STORAGE_BUCKET | R2 bucket name | your-bucket-name |
| Variable | Description | Default |
|---|---|---|
EVOLINK_API_KEY | Evolink API key for nano-banana | - |
EVOLINK_API_URL | Evolink API base URL | https://api.evolink.ai |
STORAGE_DOMAIN | Custom R2 domain (optional) | - |
NEXT_PUBLIC_WEB_URL | Your website URL | http://localhost:3006 |
NEXT_PUBLIC_PROJECT_NAME | Project display name | Pixmind AI Agent |
NEXT_PUBLIC_GOOGLE_ANALYTICS_ID | Google Analytics tracking ID | - |
NEXT_PUBLIC_CLARITY_ID | Microsoft Clarity tracking ID | - |
STRIPE_PUBLIC_KEY | Stripe publishable key | - |
STRIPE_PRIVATE_KEY | Stripe secret key | - |
STRIPE_WEBHOOK_SECRET | Stripe webhook signing secret | whsec_xxx |
app/api/ai/your-provider/lib/axios-config.tsSee CLAUDE.md for detailed implementation guidance.
Add new languages:
i18n/locale.tsi18n/messages/{locale}.jsoni18n/pages/landing/{locale}.jsonContributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the terms specified in the LICENSE file.
Built with Next.js 15 and modern web technologies. Powered by Pixmind.
中文文档 | English
Visit Pixmind Official Site - The complete AI platform for image generation, video creation, and more.
A production-ready Next.js 15 SaaS template for building AI-powered image generation applications. Ship your AI startup in hours, not weeks.

This is the open-source version of the Pixmind AI Agent template, perfect for developers who want to build their own AI SaaS application.
Looking for more?
git clone https://github.com/yourusername/ai-image-saas.git
cd ai-image-saas
pnpm install
cp .env.example .env.local
Edit .env.local with your credentials:
# Required: NextAuth
AUTH_SECRET="your-secret-here"
AUTH_GOOGLE_ID="your-google-client-id"
AUTH_GOOGLE_SECRET="your-google-client-secret"
# Required: Supabase
SUPABASE_URL="your-supabase-url"
SUPABASE_ANON_KEY="your-supabase-anon-key"
SUPABASE_SERVICE_ROLE_KEY="your-service-role-key"
# Required: Cloudflare R2 Storage (for AI-generated images/videos)
STORAGE_ENDPOINT="https://your-account-id.r2.cloudflarestorage.com"
STORAGE_REGION="auto"
STORAGE_ACCESS_KEY="your-r2-access-key-id"
STORAGE_SECRET_KEY="your-r2-secret-access-key"
STORAGE_BUCKET="your-bucket-name"
STORAGE_DOMAIN="" # Optional: custom domain
# Optional: AI Providers
EVOLINK_API_KEY="your-evolink-api-key"
EVOLINK_API_URL="https://api.evolink.ai"
📖 New to R2? See our R2 Quick Start Guide for detailed setup instructions.
pnpm dev
Open http://localhost:3006 to see your app.
Update theme colors in app/theme.css:
app/theme.cssUpdate project name:
NEXT_PUBLIC_PROJECT_NAME in .env.locali18n/messages/en.json and i18n/messages/zh.jsonEdit landing page translations in:
i18n/pages/landing/en.json - English contenti18n/pages/landing/zh.json - Chinese contentAdd your AI provider credentials in .env.local:
# Evolink (nano-banana model)
EVOLINK_API_KEY="sk-your-key"
EVOLINK_API_URL="https://api.evolink.ai"
# Add more providers as needed
Google OAuth:
http://localhost:3006/api/auth/callback/googlehttps://yourdomain.com/api/auth/callback/google.env.localpnpm dev # Start development server (port 3006)
pnpm build # Build for production
pnpm start # Start production server
pnpm lint # Run ESLint
pnpm analyze # Analyze bundle size
├── app/
│ ├── [locale]/ # Localized routes
│ │ ├── (default)/ # Main app pages
│ │ ├── (admin)/ # Admin dashboard
│ │ └── (console)/ # User console
│ └── api/ # API routes
│ └── ai/ # AI generation endpoints
├── components/
│ ├── ui/ # Shadcn UI components
│ ├── blocks/ # Reusable page sections
│ └── auth/ # Authentication components
├── lib/ # Utility libraries
├── i18n/ # Internationalization
│ ├── messages/ # Global translations
│ └── pages/ # Page-specific translations
├── types/ # TypeScript definitions
└── public/ # Static assets
cp .env.example .env.production
cp wrangler.toml.example wrangler.toml
Edit .env.production with your production values
Add environment variables to wrangler.toml under [vars]
Deploy
pnpm cf:build
pnpm cf:deploy
docker build -f Dockerfile -t ai-image-saas:latest .
docker run -p 3000:3000 ai-image-saas:latest
| Variable | Description | Example |
|---|---|---|
AUTH_SECRET | NextAuth secret key | Generate with openssl rand -base64 32 |
AUTH_GOOGLE_ID | Google OAuth Client ID | xxx.apps.googleusercontent.com |
AUTH_GOOGLE_SECRET | Google OAuth Client Secret | GOCSPX-xxx |
SUPABASE_URL | Supabase project URL | https://xxx.supabase.co |
SUPABASE_ANON_KEY | Supabase anonymous key | eyJxxx... |
SUPABASE_SERVICE_ROLE_KEY | Supabase service role key (server-side only) | eyJxxx... |
STORAGE_ENDPOINT | Cloudflare R2 endpoint | https://xxx.r2.cloudflarestorage.com |
STORAGE_REGION | R2 region (use "auto") | auto |
STORAGE_ACCESS_KEY | R2 access key ID | Your R2 access key |
STORAGE_SECRET_KEY | R2 secret access key | Your R2 secret |
STORAGE_BUCKET | R2 bucket name | your-bucket-name |
| Variable | Description | Default |
|---|---|---|
EVOLINK_API_KEY | Evolink API key for nano-banana | - |
EVOLINK_API_URL | Evolink API base URL | https://api.evolink.ai |
STORAGE_DOMAIN | Custom R2 domain (optional) | - |
NEXT_PUBLIC_WEB_URL | Your website URL | http://localhost:3006 |
NEXT_PUBLIC_PROJECT_NAME | Project display name | Pixmind AI Agent |
NEXT_PUBLIC_GOOGLE_ANALYTICS_ID | Google Analytics tracking ID | - |
NEXT_PUBLIC_CLARITY_ID | Microsoft Clarity tracking ID | - |
STRIPE_PUBLIC_KEY | Stripe publishable key | - |
STRIPE_PRIVATE_KEY | Stripe secret key | - |
STRIPE_WEBHOOK_SECRET | Stripe webhook signing secret | whsec_xxx |
app/api/ai/your-provider/lib/axios-config.tsSee CLAUDE.md for detailed implementation guidance.
Add new languages:
i18n/locale.tsi18n/messages/{locale}.jsoni18n/pages/landing/{locale}.jsonContributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the terms specified in the LICENSE file.
Built with Next.js 15 and modern web technologies. Powered by Pixmind.