{"id":19805340,"url":"https://github.com/nolly-studio/ai-chatbot-supabase","last_synced_at":"2025-04-12T18:47:56.839Z","repository":{"id":262302433,"uuid":"886815763","full_name":"nolly-studio/ai-chatbot-supabase","owner":"nolly-studio","description":"A full-featured, hackable Next.js x Supabase AI chatbot. Fork of the original built by Vercel ","archived":false,"fork":false,"pushed_at":"2024-11-20T06:46:41.000Z","size":496,"stargazers_count":255,"open_issues_count":1,"forks_count":42,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-04-03T23:08:55.901Z","etag":null,"topics":["ai","nextjs","nextjs15","react","shadcn-ui","supabase","tailwind","vercel-ai-sdk"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nolly-studio.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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-11-11T16:50:46.000Z","updated_at":"2025-04-03T16:39:04.000Z","dependencies_parsed_at":"2024-11-11T18:27:56.727Z","dependency_job_id":"23434373-389d-44a8-a76d-0fd312790b2a","html_url":"https://github.com/nolly-studio/ai-chatbot-supabase","commit_stats":{"total_commits":7,"total_committers":2,"mean_commits":3.5,"dds":0.2857142857142857,"last_synced_commit":"2ab386bc2c374caa7501bf48fbb23edcaa94e19c"},"previous_names":["nolly-studio/ai-chatbot-supabase"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nolly-studio%2Fai-chatbot-supabase","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nolly-studio%2Fai-chatbot-supabase/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nolly-studio%2Fai-chatbot-supabase/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nolly-studio%2Fai-chatbot-supabase/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nolly-studio","download_url":"https://codeload.github.com/nolly-studio/ai-chatbot-supabase/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248617853,"owners_count":21134197,"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":["ai","nextjs","nextjs15","react","shadcn-ui","supabase","tailwind","vercel-ai-sdk"],"created_at":"2024-11-12T09:03:28.596Z","updated_at":"2025-04-12T18:47:56.817Z","avatar_url":"https://github.com/nolly-studio.png","language":"TypeScript","funding_links":[],"categories":["AI"],"sub_categories":[],"readme":"\u003ca href=\"https://chat.vercel.ai/\"\u003e\n  \u003cimg alt=\"Next.js 14 and App Router-ready AI chatbot.\" src=\"app/(chat)/opengraph-image.png\"\u003e\n  \u003ch1 align=\"center\"\u003eNext.js AI Chatbot x Supabase\u003c/h1\u003e\n\u003c/a\u003e\n\n\u003cp align=\"center\"\u003e\n  An Open-Source AI Chatbot Template Built With Next.js and the AI SDK by Vercel.\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"#features\"\u003e\u003cstrong\u003eFeatures\u003c/strong\u003e\u003c/a\u003e ·\n  \u003ca href=\"#model-providers\"\u003e\u003cstrong\u003eModel Providers\u003c/strong\u003e\u003c/a\u003e ·\n  \u003ca href=\"#deploy-your-own\"\u003e\u003cstrong\u003eDeploy Your Own\u003c/strong\u003e\u003c/a\u003e ·\n  \u003ca href=\"#running-locally\"\u003e\u003cstrong\u003eRunning locally\u003c/strong\u003e\u003c/a\u003e\n\u003c/p\u003e\n\u003cbr/\u003e\n\n## Features\n\n- [Next.js](https://nextjs.org) App Router\n  - Advanced routing for seamless navigation and performance\n  - React Server Components (RSCs) and Server Actions for server-side rendering and increased performance\n  - Built-in optimizations for images, fonts, and static assets\n- [AI SDK](https://sdk.vercel.ai/docs)\n  - Unified API for generating text, structured objects, and tool calls with LLMs\n  - Hooks for building dynamic chat and generative user interfaces\n  - Supports OpenAI (default), Anthropic, Cohere, and other model providers\n  - Built-in streaming support for real-time AI responses\n- [shadcn/ui](https://ui.shadcn.com)\n  - Styling with [Tailwind CSS](https://tailwindcss.com)\n  - Component primitives from [Radix UI](https://radix-ui.com) for accessibility and flexibility\n  - Customizable themes and dark mode support\n- [Supabase](https://supabase.com) Integration\n  - [Supabase Postgres DB](https://supabase.com/docs/guides/database) for robust chat history and user data storage\n  - [Supabase File Storage](https://supabase.com/docs/guides/storage) for efficient file management and uploads\n  - [Supabase Auth](https://supabase.com/docs/guides/auth) with multiple authentication providers and row-level security\n  - Real-time subscriptions for live updates\n\n## Model Providers\n\nThis template ships with OpenAI `gpt-4o` as the default. However, with the [AI SDK](https://sdk.vercel.ai/docs), you can switch LLM providers to [OpenAI](https://openai.com), [Anthropic](https://anthropic.com), [Cohere](https://cohere.com/), and [many more](https://sdk.vercel.ai/providers/ai-sdk-providers) with just a few lines of code.\n\n\u003cdiv id=\"youtube-onboarding-video\"\u003e\n\n\u003cdiv align=\"left\"\u003e\n  \u003ch2\u003eYouTube Onboarding Video\u003c/h2\u003e\n   \u003ch4\u003eThis video walks you through how to set up the ai chatbot with supabase from scratch. We will:\u003c/h4\u003e\n  \u003cul style=\"text-align: left; display: inline-block;\"\u003e\n    \u003cli\u003eSetup a new Supabase project using the CLI\u003c/li\u003e\n    \u003cli\u003eLink it to our app\u003c/li\u003e\n    \u003cli\u003eSetup environment variables\u003c/li\u003e\n    \u003cli\u003eRun the DB migrations to configure the schema\u003c/li\u003e\n  \u003c/ul\u003e\n  \u003ca href=\"https://youtu.be/YMEyNXP59Ss\"\u003e\n    \u003cimg src=\"https://github.com/nolly-studio/ai-chatbot-supabase/blob/main/readme-video-thumbnail.png\" width=\"85%\" alt=\"YouTube Onboarding Video\" /\u003e\n  \u003c/a\u003e\n\u003c/div\u003e\n\n\u003c/div\u003e\n\n\n## Getting Started\n\n### Quick Start Video Guide\n\nWatch our comprehensive onboarding video to quickly set up your development environment and understand the project structure: [Watch Tutorial](#)\n\n### Prerequisites\n\nBefore you begin, ensure you have the following installed:\n\n- Node.js 18+\n- pnpm (`npm install -g pnpm`)\n- Git\n- A code editor (we recommend VS Code)\n\n### Supabase Setup\n\n1. **Install the Supabase CLI**\n   Choose the installation method for your operating system:\n\n   - Mac:\n     ```bash\n     brew install supabase/tap/supabase\n     ```\n   - Windows (PowerShell):\n     ```powershell\n     scoop bucket add supabase https://github.com/supabase/scoop-bucket.git\n     scoop install supabase\n     ```\n   - Linux:\n     ```bash\n     brew install supabase/tap/supabase\n     ```\n   - NPM/Bun:\n     ```bash\n     npx supabase \u003ccommand\u003e\n     ```\n\n2. **Create a Supabase Project**\n\n   ```bash\n   # Create a new project\n   npx supabase projects create -i \"ai-chatbot-supabase\"\n\n   # Note: Save the project ID and database password shown after creation\n   ```\n\n   \u003e Your Organization ID can be found in the Supabase Dashboard URL after selecting an organization\n\n3. **Link Your Project**\n\n   ```bash\n   # Initialize Supabase configuration\n   npx supabase init\n\n   # Link to your remote project\n   npx supabase link --project-ref your-project-id\n   ```\n\n   You'll need your project ID and database password from step 2.\n\n4. **Configure Environment Variables**\n   Create a `.env.local` file with the following variables:\n\n   ```bash\n   NEXT_PUBLIC_SUPABASE_URL=\u003capi-url\u003e\n   NEXT_PUBLIC_SUPABASE_ANON_KEY=\u003canon-key\u003e\n   ```\n\n   \u003e Find these values in your Supabase project dashboard under Project Settings \u003e API\n\n5. **Initialize Database Schema**\n\n   ```bash\n   # Apply all migrations\n   supabase db push\n\n   # Verify the schema\n   supabase db reset --dry-run\n   ```\n\n### Local Development\n\n1. **Clone and Install**\n\n   ```bash\n   git clone https://github.com/your-username/ai-chatbot-supabase.git\n   cd ai-chatbot-supabase\n   pnpm install\n   ```\n\n2. **Start Development Server**\n\n   ```bash\n   pnpm dev\n   ```\n\n   The application will be available at [http://localhost:3000](http://localhost:3000)\n\n3. **Development Commands**\n   ```bash\n   pnpm build          # Build for production\n   pnpm start          # Start production server\n   pnpm lint          # Run ESLint\n   pnpm type-check    # Run TypeScript checks\n   ```\n\n### Troubleshooting\n\nCommon issues and solutions:\n\n- **Supabase Connection Issues**\n\n  - Verify your environment variables are correctly set\n  - Check if the database is active in Supabase dashboard\n\n- **Build Errors**\n  - Clear `.next` folder: `rm -rf .next`\n  - Clean install dependencies: `pnpm clean-install`\n\nFor more help, open an issue.\n\n## Deploy with Vercel\n\n### Prerequisites\n\n- A [Vercel account](https://vercel.com/signup)\n- A [Supabase account](https://supabase.com/dashboard/sign-in)\n- An [OpenAI API key](https://platform.openai.com/api-keys)\n\n### Deployment Steps\n\n1. **Fork the Repository**\n\n   ```bash\n   https://github.com/your-username/ai-chatbot-supabase\n   ```\n\n2. **Configure Vercel Project**\n\n   - Go to [Vercel Dashboard](https://vercel.com/dashboard)\n   - Click \"New Project\"\n   - Import your forked repository\n   - Select \"Next.js\" as the framework\n\n3. **Set Environment Variables**\n   In your Vercel project settings, add the following environment variables:\n\n```bash\n# Required\nNEXT_PUBLIC_SUPABASE_URL=           # From Supabase project settings\nNEXT_PUBLIC_SUPABASE_ANON_KEY=      # From Supabase project settings\nOPENAI_API_KEY=                     # Your OpenAI API key\n```\n\n4. **Configure Build Settings**\n   In your Vercel project settings:\n\n   - Build Command: `pnpm build`\n   - Output Directory: `.next`\n   - Install Command: `pnpm install`\n\n5. **Deploy**\n   - Click \"Deploy\"\n   - Vercel will automatically build and deploy your application\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnolly-studio%2Fai-chatbot-supabase","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnolly-studio%2Fai-chatbot-supabase","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnolly-studio%2Fai-chatbot-supabase/lists"}