An AI-powered video storytelling platform built with Next.js, TypeScript, Tailwind CSS, and Supabase.
- 🎬 AI-powered story generation
- 🎥 Automated video assembly
- 🎨 Modern responsive UI with shadcn/ui
- 🔒 User authentication with Supabase
- 📊 PostgreSQL database integration
- 🚀 Server-side and client-side rendering with Next.js App Router
- Frontend: Next.js 14 with App Router, TypeScript, Tailwind CSS
- UI Components: shadcn/ui with Radix UI primitives
- Backend: Next.js API Routes
- Database: PostgreSQL with Supabase
- Authentication: Supabase Auth
- Styling: Tailwind CSS with CSS Variables
- Icons: Lucide React
- Node.js 18+
- npm or yarn
- Supabase account
- OpenAI API key (for AI features)
- ElevenLabs API key (for voice generation)
-
Clone the repository:
git clone https://github.com/harystyleseze/storycraft-ai cd storycraft-ai -
Install dependencies:
npm install
-
Set up environment variables:
cp .env.local.example .env.local
Fill in your environment variables in
.env.local:- Supabase URL and keys
- OpenAI API key
- ElevenLabs API key
- Database connection string
-
Set up the database:
# Run the schema.sql file in your Supabase SQL editor # Or use your preferred PostgreSQL client
-
Run the development server:
npm run dev
-
Open http://localhost:3000 in your browser.
src/
├── app/ # Next.js App Router
│ ├── api/ # API routes
│ │ ├── auth/ # Authentication endpoints
│ │ ├── projects/ # Project management endpoints
│ │ └── video-assembly/ # Video generation endpoints
│ ├── globals.css # Global styles with Tailwind
│ ├── layout.tsx # Root layout
│ └── page.tsx # Home page
├── components/
│ └── ui/ # shadcn/ui components
├── lib/
│ ├── supabase.ts # Supabase client and types
│ ├── utils.ts # Utility functions
│ └── video-assembly.ts # Video generation service
└── utils/ # Additional utilities
GET /api/projects- Get user projectsPOST /api/projects- Create new projectGET /api/projects/[id]- Get specific projectPUT /api/projects/[id]- Update projectDELETE /api/projects/[id]- Delete project
POST /api/video-assembly- Start video generation process
POST /api/auth- Handle signup/signin
The application uses PostgreSQL with the following main tables:
projects- Store user projects and storiesvideo_segments- Store individual video segments- Row Level Security (RLS) enabled for data protection
# Supabase
NEXT_PUBLIC_SUPABASE_URL=your_supabase_project_url
NEXT_PUBLIC_SUPABASE_ANON_KEY=your_supabase_anon_key
SUPABASE_SERVICE_ROLE_KEY=your_supabase_service_role_key
# Database
DATABASE_URL=your_postgresql_connection_string
# AI Services
OPENAI_API_KEY=your_openai_api_key
ELEVENLABS_API_KEY=your_elevenlabs_api_key
# Next.js
NEXTAUTH_SECRET=your_nextauth_secret
NEXTAUTH_URL=http://localhost:3000npm run dev- Start development servernpm run build- Build for productionnpm run start- Start production servernpm run lint- Run ESLintnpm run typecheck- Run TypeScript type checking
This project uses shadcn/ui. To add new components:
npx shadcn-ui@latest add button
npx shadcn-ui@latest add card
# etc.The application can be deployed on Vercel, Netlify, or any platform supporting Next.js.
- Set up your production database on Supabase
- Configure environment variables on your hosting platform
- Deploy the application
- Fork the repository
- Create a feature branch
- Make your changes
- Run tests and linting
- Submit a pull request
This project is licensed under the MIT License.