Transform your story ideas into professional cinematic storyboards with AI-generated black and white sketches.
This is a full-stack Next.js application that uses Google's Gemini AI to generate complete storyboards from user prompts. The application creates 3-5 scene narratives with corresponding cinematic sketches in a charcoal/sketch style.
- AI-Powered Story Generation: Uses Gemini 2.0 Flash for intelligent story structure creation
- Cinematic Image Generation: Creates professional black & white sketches with Gemini 2.0 Flash Preview
- BYOK (Bring Your Own Key): Users can provide their own Gemini API keys for unlimited usage
- Queue Management: Smart processing queue for shared API key users
- Cost Tracking: Transparent cost calculation (~$0.12-0.20 per storyboard)
- Mobile Responsive: Fully optimized for mobile devices
- Dark/Light Theme: Complete theme switching support
- Real-time Updates: Live status updates during generation
- Next.js 15 with React 19
- Tailwind CSS v4 for styling
- Radix UI + shadcn/ui for components
- Clerk for authentication
- Lucide React for icons
- Convex for real-time database and serverless functions
- Google Gemini AI for text and image generation
- Convex File Storage for image management
- Cron Jobs for automated queue processing
- Node.js 18+ or Bun
- Convex Account - Sign up at convex.dev
- Clerk Account - Sign up at clerk.com
- Google AI Studio API Key - Get one here
- Clone the repository:
git clone <your-repo-url>
cd storyboard- Install dependencies:
bun install
# or
npm install- Set up environment variables:
# Create .env.local
NEXT_PUBLIC_CONVEX_URL=your_convex_url
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=your_clerk_publishable_key
CLERK_SECRET_KEY=your_clerk_secret_key
GEMINI_API_KEY=your_gemini_api_key- Set up Convex:
npx convex dev-
Configure Clerk:
- Add your domain to Clerk dashboard
- Configure sign-in/sign-up settings
-
Run the development server:
bun dev
# or
npm run devOpen http://localhost:3000 to see the application.
├── src/
│ ├── app/ # Next.js app directory
│ │ ├── api/ # API routes
│ │ ├── dashboard/ # Dashboard page
│ │ └── page.tsx # Home page
│ └── components/ # React components
│ ├── ui/ # shadcn/ui components
│ ├── AppLayout.tsx # Main layout
│ ├── StoryCreator.tsx # Story creation form
│ └── StoryboardViewer.tsx # Storyboard display
├── convex/ # Convex backend
│ ├── schema.ts # Database schema
│ ├── storyboards.ts # Storyboard functions
│ ├── storyboardProcessor.ts # AI processing
│ ├── storyboardWorkflow.ts # Story generation
│ └── crons.ts # Scheduled jobs
└── public/ # Static assets
- Sign in using Clerk authentication
- Enter your story prompt (minimum 20 characters)
- Click "Create Storyboard" to generate story structure
- Wait for image generation (1-3 minutes for 3-5 scenes)
- View your completed storyboard with generated images
- Go to Settings in the sidebar
- Add your Gemini API key from Google AI Studio
- Enable BYOK to use your own quota
- Enjoy unlimited generations with your own API key
- Text Generation: ~$0.025 per storyboard
- Image Generation: ~$0.039 per scene (3-5 scenes typical)
- Total Cost: $0.12-0.20 per complete storyboard
With BYOK, users pay Google directly and avoid shared quota limitations.
The application uses Convex with the following main tables:
users- User profiles and BYOK settingsstoryboards- Story metadata and statusscenes- Individual scenes with imagesstoryboardQueue- Processing queue management
- Story Generation: Gemini creates structured story with scenes
- Queue Management: Stories added to processing queue
- Image Generation: Each scene gets a cinematic sketch
- Rate Limiting: 10 RPM for shared key, unlimited for BYOK
StoryCreator- Handles story input and validationStoryboardViewer- Displays generated scenes and imagesAppLayout- Responsive layout with sidebar navigationBYOKSettings- API key management interface
- Connect your GitHub repository to Vercel
- Add environment variables in Vercel dashboard
- Deploy automatically on push to main branch
NEXT_PUBLIC_CONVEX_URL=your_production_convex_url
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=your_clerk_publishable_key
CLERK_SECRET_KEY=your_clerk_secret_key
GEMINI_API_KEY=your_gemini_api_key- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
This project is private and proprietary.
For issues or questions, please create an issue in the GitHub repository.