Create professional marketing videos and product imagery in seconds using AI. Simply upload sample and product images, and CoreClip.ai generates high-quality ad content optimized for social media, commercials, and personal branding.
- AI Image Generation: Combine product and model images to create professional product shots
- AI Video Generation: Transform static images into engaging short-form videos
- Credit-Based System: Flexible pricing with credit consumption (5 credits for images, 10 for videos)
- Community Gallery: Share and discover AI-generated content
- User Dashboard: Manage your generations with download and publish options
- Instant Generation: Results ready in seconds to minutes
- React 19 with TypeScript
- Vite for fast development
- Tailwind CSS for styling
- Clerk for authentication
- Framer Motion for animations
- React Router for navigation
- Express.js server
- MongoDB with Mongoose (migrated from Postgres/Prisma)
- Google GenAI for image/video generation
- Cloudinary for asset storage
- Clerk webhook integration
- MongoDB Atlas (recommended for production)
- MongoDB local (for development)
- Node.js 18+
- MongoDB (local or Atlas)
- Clerk account
- Cloudinary account
- Google Cloud GenAI API key
-
Clone the repository
git clone <repository-url> cd core-clip
-
Backend Setup
cd server npm install cp .env.example .env # Edit .env with your credentials npm run server
Server runs at
http://localhost:5000 -
Frontend Setup
cd ../client npm install cp .env.example .env # Edit .env with your credentials npm run client
Frontend runs at
http://localhost:5173
core-clip/
βββ client/ # React frontend
β βββ src/
β β βββ pages/ # Route views (Home, Generator, Result, etc.)
β β βββ components/ # Reusable UI components
β β βββ configs/ # Axios API configuration
β β βββ types/ # TypeScript interfaces
β β βββ assets/ # Images and static assets
β βββ vite.config.ts
β βββ package.json
β
βββ server/ # Express backend
β βββ controllers/ # API route handlers
β βββ models/ # Mongoose schemas (User, Project)
β βββ routes/ # Express routes
β βββ configs/ # Configuration (MongoDB, AI, multer)
β βββ middlewares/ # Auth middleware
β βββ types/ # TypeScript definitions
β βββ server.ts # Server entry point
β βββ package.json
β
βββ DEPLOYMENT.md # Deployment guide
βββ MIGRATION.md # Prisma to MongoDB migration guide
βββ PROJECT_CONTEXT.md # Comprehensive project documentation- DEPLOYMENT.md - Production deployment guide
- MIGRATION.md - Database migration details
- PROJECT_CONTEXT.md - Complete technical documentation
VITE_CLERK_PUBLISHABLE_KEY=your_clerk_key
VITE_BASEURL=http://localhost:5000MONGODB_URI=mongodb+srv://username:password@cluster/coreclip
CLERK_PUBLISHABLE_KEY=your_clerk_key
CLERK_SECRET_KEY=your_clerk_secret
CLERK_WEBHOOK_SIGNING_SECRET=your_webhook_secret
CLOUDINARY_URL=cloudinary://key:secret@cloud
GOOGLE_CLOUD_API_KEY=your_genai_api_keySee .env.example in each directory for complete details.
- Fixed
aspectRatiofield name typo in Generator form submission - Fixed
/api/projects/videoendpoint path (was/api/project/video) - Fixed
req.body()invocation error in video controller - Fixed
/api/project/publishedroute authentication (now public) - Complete migration from PostgreSQL + Prisma to MongoDB + Mongoose
id: Clerk user ID (unique index)email: User email (indexed)name: User full nameimage: Profile image URLcredits: User balance (min: 0, default: 20)createdAt,updatedAt: Timestamps
userId: Owner ID (indexed)name,productName,productDescriptionuserPrompt: Custom generation promptaspectRatio: "9:16" or "16:9" (enum)uploadedImages: Source image URLsgeneratedImage: Generated image URLgeneratedVideo: Generated video URLisGenerating: Processing state (indexed)isPublished: Community visibility (indexed)error: Generation error messagecreatedAt,updatedAt: Timestamps
All endpoints require Clerk authentication (except public endpoints).
GET /api/user/credits- Get user credit balanceGET /api/user/projects- Get all user projectsGET /api/user/projects/:projectId- Get single projectGET /api/user/publish/:projectId- Toggle project visibility
POST /api/project/create- Create and generate image (5 credits)POST /api/project/video- Generate video (10 credits)GET /api/project/published- Get published projects (public)DELETE /api/project/:projectId- Delete project
See PROJECT_CONTEXT.md for full details.
- User uploads images β Product and model images
- Backend validates β Checks credits and files
- Google GenAI generates β Creates composite product image
- Cloudinary stores β Image uploaded and URL saved
- Database updates β Project marked complete
- User optionally generates video β Same flow for video
- Image Generation: 5 credits
- Video Generation: 10 credits
- Starting Credits: 20 free credits per user
- Upgrade Plans:
- Pro: +80 credits
- Premium: +240 credits
See DEPLOYMENT.md for:
- MongoDB setup instructions
- Clerk webhook configuration
- Vercel + Railway deployment
- Docker containerization
- Clerk handles user authentication
- Protected API routes via auth middleware
- MongoDB connection with SSL/TLS
- Environment variables for sensitive data
- CORS configured for authorized origins
- Create a feature branch
- Make your changes
- Test locally
- Submit a pull request
ISC
- Verify connection string in
.env - Check IP whitelist in MongoDB Atlas
- Test with:
mongodb://localhost:27017/coreclip(local dev)
- Verify webhook secret in
.env - Check Clerk dashboard for webhook logs
- Ensure webhook endpoint is accessible
- Video generation takes 2-5 minutes
- Verify Google Cloud API quota
- Check network connectivity
- Backend:
lsof -i :5000thenkill <PID> - Frontend:
lsof -i :5173thenkill <PID>
For issues or questions:
- Check PROJECT_CONTEXT.md for detailed docs
- Review error messages in server/browser console
- Check MongoDB/Clerk/Cloudinary dashboards
- Open an issue on GitHub
CoreClip.ai - Transform product images into viral video content with AI.