A full-stack AI-powered creative platform designed to assist users with various generative AI tasks, including AI chat, book outline generation, murder mystery plotting, and game story creation. The platform features user authentication, trial credit management, and subscription options.
- AI Chat: Interact with an AI assistant with a chat-like interface.
- Book Outline Generator: Generate detailed outlines for your book projects.
- Murder Mystery Generator: Create immersive whodunits with plot details.
- Game Story & Characters Generator: Build narratives and characters for games.
- Saved Content: Save and review your generated AI content.
- Trial Management: Users receive a limited number of free trial credits before requiring a subscription.
- Subscription System: Premium access for unlimited generations.
- Gmail-Only Sign-up: Restrict user registrations to valid Gmail accounts (client-side validation).
- User Authentication: Secure sign-up, sign-in, and session management powered by Supabase.
- Frontend: Next.js (React), ReactMarkdown for content rendering.
- Backend: Next.js API Routes (Edge Runtime).
- Styling: Inline styles (for rapid prototyping and component-level styling).
- Authentication & Database: Supabase (Auth, PostgreSQL database).
- AI Integration: AI SDK (
ai,@ai-sdk/openai). - Stripe: For subscription management (API routes for checkout sessions and webhooks).
Follow these instructions to set up and run the project locally.
- Node.js (v18 or higher)
- npm or yarn
- A Supabase project (with PostgreSQL database enabled)
- An OpenAI API Key
- (Optional) A Stripe account for subscription testing
git clone https://github.com/sunder-kumar/ai-creative-platform.git
cd ai-creative-platformnpm install
# or yarn install
# or pnpm installCreate a .env.local file in the root of your project and add the following environment variables:
NEXT_PUBLIC_SUPABASE_URL=YOUR_SUPABASE_PROJECT_URL
NEXT_PUBLIC_SUPABASE_ANON_KEY=YOUR_SUPABASE_ANON_KEY
OPENAI_API_KEY=YOUR_OPENAI_API_KEY
STRIPE_SECRET_KEY=YOUR_STRIPE_SECRET_KEY
NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=YOUR_STRIPE_PUBLISHABLE_KEY
STRIPE_WEBHOOK_SECRET=YOUR_STRIPE_WEBHOOK_SECRET
- Supabase: You can find your
NEXT_PUBLIC_SUPABASE_URLandNEXT_PUBLIC_SUPABASE_ANON_KEYin your Supabase project settings under "API". - OpenAI: Obtain your
OPENAI_API_KEYfrom the OpenAI platform. - Stripe: Obtain your
STRIPE_SECRET_KEY,NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY, andSTRIPE_WEBHOOK_SECRETfrom your Stripe dashboard.
You'll need to set up your Supabase database schema. A basic schema is provided in supabase/schema.sql. You can apply this schema using the Supabase SQL Editor.
Important Supabase Configuration:
- Email Confirmations: For robust user verification (recommended for trial management), navigate to your Supabase Project Dashboard -> Authentication -> Settings, and ensure "Enable Email Confirmations" is turned ON.
- Auth Redirect URLs: Add
http://localhost:3000/auth/callbackto your Supabase Auth Redirect URLs for local development.
npm run dev
# or yarn dev
# or pnpm devOpen http://localhost:3000 with your browser to see the result.
- Sign Up/Sign In: Create an account (only Gmail accounts are accepted).
- Dashboard: Navigate through various AI tools.
- AI Chat: Start a conversation with the AI assistant.
- Generators: Use the Book Outline, Murder Mystery, and Game Story generators.
- Saved Content: View and manage your saved generations.
- Subscription: Access the subscribe page for unlimited usage.
Contributions are welcome! Please fork the repository and submit a pull request for any features, bug fixes, or improvements.
This project is open-source and available under the MIT License.
You can try it Live!.