{"id":21930276,"url":"https://github.com/zeyu-chen/ai-saas-platform","last_synced_at":"2026-04-10T12:02:37.153Z","repository":{"id":238150233,"uuid":"795977350","full_name":"zeyu-chen/AI-SaaS-Platform","owner":"zeyu-chen","description":"A modern AI SaaS platform built with Next.js that provides multiple AI capabilities including conversation, image generation, music generation, video generation and code generation with premium subscription features.","archived":false,"fork":false,"pushed_at":"2024-11-08T13:46:30.000Z","size":1506,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-22T12:46:03.038Z","etag":null,"topics":["nextjs","openai-api","replicate-api","shadcn-ui","tailwind-css","typescript"],"latest_commit_sha":null,"homepage":"https://ai-platform-fullstack.vercel.app/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zeyu-chen.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-05-04T15:10:57.000Z","updated_at":"2024-11-12T17:20:07.000Z","dependencies_parsed_at":"2024-05-04T16:30:55.026Z","dependency_job_id":"0d49d844-2120-40a8-a481-2d88e6e11a23","html_url":"https://github.com/zeyu-chen/AI-SaaS-Platform","commit_stats":null,"previous_names":["zeyu-chen/ai-saas","zeyu-chen/ai-saas-platform"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zeyu-chen%2FAI-SaaS-Platform","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zeyu-chen%2FAI-SaaS-Platform/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zeyu-chen%2FAI-SaaS-Platform/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zeyu-chen%2FAI-SaaS-Platform/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zeyu-chen","download_url":"https://codeload.github.com/zeyu-chen/AI-SaaS-Platform/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244959451,"owners_count":20538626,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["nextjs","openai-api","replicate-api","shadcn-ui","tailwind-css","typescript"],"created_at":"2024-11-28T23:08:29.096Z","updated_at":"2025-12-30T23:48:52.328Z","avatar_url":"https://github.com/zeyu-chen.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# AI SaaS Platform\n\n[![Next.js](https://img.shields.io/badge/Next.js-14-000000?logo=next.js\u0026logoColor=white)](https://nextjs.org/)\n[![React](https://img.shields.io/badge/React-18-61DAFB?logo=react\u0026logoColor=black)](https://reactjs.org/)\n[![TypeScript](https://img.shields.io/badge/TypeScript-5-3178C6?logo=typescript\u0026logoColor=white)](https://www.typescriptlang.org/)\n[![Tailwind CSS](https://img.shields.io/badge/Tailwind_CSS-3-06B6D4?logo=tailwind-css\u0026logoColor=white)](https://tailwindcss.com/)\n[![MySQL](https://img.shields.io/badge/MySQL-8-4479A1?logo=mysql\u0026logoColor=white)](https://www.mysql.com/)\n[![Prisma](https://img.shields.io/badge/Prisma-5-2D3748?logo=prisma\u0026logoColor=white)](https://www.prisma.io/)\n[![OpenAI](https://img.shields.io/badge/OpenAI-4-412991?logo=openai\u0026logoColor=white)](https://openai.com/)\n[![Clerk](https://img.shields.io/badge/Clerk-5-6C47FF?logo=clerk\u0026logoColor=white)](https://clerk.dev/)\n[![Stripe](https://img.shields.io/badge/Stripe-15-008CDD?logo=stripe\u0026logoColor=white)](https://stripe.com/)\n\nA modern AI SaaS platform built with Next.js that provides multiple AI capabilities including conversation, image generation, music generation, video generation and code generation with premium subscription features.\n\n## Features\n\n🤖 Multiple AI Models - Powered by OpenAI and Replicate\n- Conversation AI\n- Image Generation\n- Music Generation  \n- Video Generation\n- Code Generation\n\n💳 Premium Subscription\n- Stripe integration for premium features\n- Free trial with limited API calls\n- Unlimited API calls for pro users\n\n🔐 Authentication \u0026 Authorization\n- Secure authentication with Clerk\n- Role-based access control\n- API rate limiting\n\n📱 Modern UI/UX\n- Clean and intuitive interface\n- Responsive design\n- Real-time loading states\n- Toast notifications\n\n## Tech Stack\n\n- **Framework**: Next.js 14\n- **Styling**: Tailwind CSS\n- **Database**: MySQL (PlanetScale)\n- **ORM**: Prisma\n- **Authentication**: Clerk\n- **Payment**: Stripe\n- **UI Components**: shadcn/ui\n- **Form Handling**: react-hook-form, zod\n- **State Management**: zustand\n- **AI Providers**: OpenAI, Replicate\n\n## Getting Started\n\n### Prerequisites\n\n- Node.js 18+\n- MySQL database\n- Clerk account\n- Stripe account\n- OpenAI API key\n- Replicate API key\n\n### Installation\n\n1. Clone the repository\n```bash\ngit clone git@github.com:Zeyu-Chen/AI-SaaS-Platform.git\ncd AI-SaaS-Platform\n```\n\n2. Install dependencies\n```bash\nnpm install\n# or\nyarn install\n```\n\n3. Set up environment variables\nCreate a .env file in the root directory and add the following variables:\n```bash\n# App\nNEXT_PUBLIC_APP_URL=http://localhost:3000\n\n# Database\nDATABASE_URL=\"mysql://user:password@host:3306/dbname\"\n\n# Clerk\nNEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=your_publishable_key\nCLERK_SECRET_KEY=your_secret_key\n\n# OpenAI\nOPENAI_API_KEY=your_openai_key\n\n# Replicate\nREPLICATE_API_TOKEN=your_replicate_token\n\n# Stripe\nSTRIPE_API_KEY=your_stripe_key\nSTRIPE_WEBHOOK_SECRET=your_webhook_secret\nNEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=your_publishable_key\n\n# Other\nNEXT_PUBLIC_APP_NAME=\"AI Platform\"\n```\n\n4. Set up the database\n```bash\nnpx prisma generate\nnpx prisma db push\n```\n\n5. Start the development server\n```bash\nnpm run dev\n# or\nyarn dev\n```\n\nThe app should now be running on http://localhost:3000\n\n## Development\n\nTo run the development server:\n\n```bash\nnpm run dev\n# or\nyarn dev\n```\n\nTo build for production:\n\n```bash\nnpm run build\n# or\nyarn build\n```\n\nTo run in production mode:\n\n```bash\nnpm start\n# or\nyarn start\n```\n\n## Database Schema\n\nThe application uses MySQL with Prisma ORM with the following main tables:\n\n- UserApiLimit - Track API usage for free users\n- UserSubscription - Manage premium subscriptions\n\n## API Routes\n\n- `/api/conversation` - OpenAI chat completion\n- `/api/image` - OpenAI image generation  \n- `/api/music` - Replicate music generation\n- `/api/video` - Replicate video generation\n- `/api/code` - OpenAI code generation\n- `/api/stripe` - Stripe payment handling\n- `/api/webhook` - Stripe webhooks","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzeyu-chen%2Fai-saas-platform","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzeyu-chen%2Fai-saas-platform","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzeyu-chen%2Fai-saas-platform/lists"}