{"id":30020096,"url":"https://github.com/akdevv/better-chat","last_synced_at":"2025-10-30T18:44:48.452Z","repository":{"id":302425209,"uuid":"1012066765","full_name":"akdevv/better-chat","owner":"akdevv","description":"Better-Chat is a Next.js 15 app that lets you chat with multiple AIs like OpenAI, Gemini, and Claude in one place.","archived":false,"fork":false,"pushed_at":"2025-07-23T08:34:32.000Z","size":3649,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-08-06T01:39:30.780Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://better-chat-v1.vercel.app","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/akdevv.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,"zenodo":null}},"created_at":"2025-07-01T18:56:32.000Z","updated_at":"2025-07-23T09:56:10.000Z","dependencies_parsed_at":"2025-07-02T10:42:26.361Z","dependency_job_id":"865b9960-ea61-452b-82d1-6ac1ea2857c8","html_url":"https://github.com/akdevv/better-chat","commit_stats":null,"previous_names":["akdevv/better-chat"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/akdevv/better-chat","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akdevv%2Fbetter-chat","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akdevv%2Fbetter-chat/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akdevv%2Fbetter-chat/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akdevv%2Fbetter-chat/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/akdevv","download_url":"https://codeload.github.com/akdevv/better-chat/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akdevv%2Fbetter-chat/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":281862786,"owners_count":26574703,"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","status":"online","status_checked_at":"2025-10-30T02:00:06.501Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2025-08-06T01:39:24.611Z","updated_at":"2025-10-30T18:44:48.422Z","avatar_url":"https://github.com/akdevv.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Better Chat\n\nA modern, feature-rich AI chat application built with Next.js 15 that supports multiple AI providers including OpenAI, Anthropic Claude, Google Gemini, and Groq. The application provides a seamless chatting experience with file uploads, user management, and a beautiful, responsive interface.\n\n![Better Chat](https://img.shields.io/badge/Next.js-15-black?logo=next.js\u0026logoColor=white)\n![TypeScript](https://img.shields.io/badge/TypeScript-007ACC?logo=typescript\u0026logoColor=white)\n![Tailwind CSS](https://img.shields.io/badge/Tailwind_CSS-38B2AC?logo=tailwind-css\u0026logoColor=white)\n![Prisma](https://img.shields.io/badge/Prisma-2D3748?logo=prisma\u0026logoColor=white)\n\n## ✨ Features\n\n### 🤖 Multi-Provider AI Support\n\n-   **OpenAI**: GPT-4o, GPT-4o Mini\n-   **Anthropic**: Claude Opus 4, Claude Sonnet 4\n-   **Google**: Gemini 2.5 Pro, Gemini 2.5 Flash\n-   **Groq**: DeepSeek R1, Llama 4 (Free models)\n\n### 💬 Advanced Chat Features\n\n-   Real-time streaming responses\n-   File upload support (images, PDFs, text files, code)\n-   Vision-capable models for image analysis\n-   Thinking models support\n-   Chat history and management\n-   Star/favorite chats\n-   Auto-generated chat titles\n\n### 🔐 User Management\n\n-   NextAuth.js authentication\n-   User registration and login\n-   Secure API key management with encryption\n-   Profile and usage statistics\n-   Settings management\n\n### 🎨 Modern UI/UX\n\n-   Responsive design for all devices\n-   Dark/light mode support\n-   Beautiful animations and transitions\n-   Mobile-friendly sidebar\n-   Drag-and-drop file uploads\n-   Syntax highlighting for code blocks\n-   Markdown rendering with LaTeX support\n\n## 🚀 Tech Stack\n\n-   **Framework**: Next.js 15 with App Router\n-   **Language**: TypeScript\n-   **Styling**: Tailwind CSS v4\n-   **Database**: PostgreSQL with Prisma ORM\n-   **Authentication**: NextAuth.js v5\n-   **UI Components**: Radix UI primitives\n-   **File Uploads**: UploadThing\n-   **AI SDKs**: OpenAI, Anthropic, Google AI, Groq\n-   **Deployment**: Vercel-ready\n\n## 📁 Project Structure\n\n```\nbetter-chat/\n├── app/                          # Next.js 15 app directory\n│   ├── (main)/                   # Main authenticated routes\n│   │   ├── chat/                 # Chat interface\n│   │   └── settings/             # User settings\n│   ├── api/                      # API routes\n│   │   ├── auth/                 # Authentication endpoints\n│   │   ├── chats/                # Chat management\n│   │   ├── keys/                 # API key management\n│   │   └── files/                # File upload handling\n│   ├── auth/                     # Authentication pages\n│   └── globals.css               # Global styles\n├── components/                   # React components\n│   ├── chat/                     # Chat-related components\n│   ├── sidebar/                  # Navigation sidebar\n│   ├── settings/                 # Settings components\n│   ├── ui/                       # Reusable UI components\n│   └── shared/                   # Shared components\n├── contexts/                     # React contexts\n├── hooks/                        # Custom React hooks\n├── lib/                          # Utility libraries\n│   ├── ai/                       # AI provider integrations\n│   ├── services/                 # Business logic services\n│   ├── types/                    # TypeScript type definitions\n│   └── utils.ts                  # Utility functions\n├── prisma/                       # Database schema and migrations\n├── public/                       # Static assets\n├── middleware.ts                 # Next.js middleware\n└── package.json                  # Dependencies and scripts\n```\n\n## 🛠️ Getting Started\n\n### Prerequisites\n\n-   Node.js 18+ or Bun\n-   PostgreSQL database\n-   AI provider API keys (optional for free Groq models)\n\n### Installation\n\n1. **Clone the repository**\n\n    ```bash\n    git clone https://github.com/your-username/better-chat.git\n    cd better-chat\n    ```\n\n2. **Install dependencies**\n\n    ```bash\n    npm install\n    # or\n    bun install\n    ```\n\n3. **Set up environment variables**\n\n    ```bash\n    cp .env.example .env.local\n    ```\n\n4. **Configure your environment variables** (see [Environment Variables](#environment-variables))\n\n5. **Set up the database**\n\n    ```bash\n    npx prisma generate\n    npx prisma db push\n    ```\n\n6. **Run the development server**\n\n    ```bash\n    npm run dev\n    # or\n    bun dev\n    ```\n\n7. **Open your browser**\n   Navigate to [http://localhost:3000](http://localhost:3000)\n\n## 🔧 Environment Variables\n\nCreate a `.env.local` file in the root directory with the following variables:\n\n```env\n# Database\nDATABASE_URL=\"postgresql://username:password@localhost:5432/better_chat\"\nDIRECT_URL=\"postgresql://username:password@localhost:5432/better_chat\"\n\n# NextAuth.js\nNEXTAUTH_SECRET=\"your-nextauth-secret-key-here\"\nNEXTAUTH_URL=\"http://localhost:3000\"\n\n# AI Provider API Keys (optional - Groq models are free)\nOPENAI_API_KEY=\"your-openai-api-key\"\nANTHROPIC_API_KEY=\"your-anthropic-api-key\"\nGOOGLE_AI_API_KEY=\"your-google-ai-api-key\"\nGROQ_API_KEY=\"your-groq-api-key\"\n\n# File Upload (UploadThing)\nUPLOADTHING_SECRET=\"your-uploadthing-secret\"\nUPLOADTHING_APP_ID=\"your-uploadthing-app-id\"\n\n# Encryption Key for API Keys\nENCRYPTION_KEY=\"your-32-character-encryption-key\"\n```\n\n### Getting API Keys\n\n-   **OpenAI**: [OpenAI Platform](https://platform.openai.com/api-keys)\n-   **Anthropic**: [Anthropic Console](https://console.anthropic.com/)\n-   **Google AI**: [Google AI Studio](https://aistudio.google.com/app/apikey)\n-   **Groq**: [Groq Console](https://console.groq.com/keys)\n-   **UploadThing**: [UploadThing Dashboard](https://uploadthing.com/dashboard)\n\n## 📜 Available Scripts\n\n```bash\n# Development\nnpm run dev          # Start development server with Turbopack\nbun dev             # Start development server with Bun\n\n# Production\nnpm run build       # Build for production\nnpm run start       # Start production server\n\n# Database\nnpx prisma generate # Generate Prisma client\nnpx prisma db push  # Push schema changes to database\nnpx prisma studio   # Open Prisma Studio\n\n# Linting\nnpm run lint        # Run ESLint\n```\n\n## 🎯 Features in Detail\n\n### AI Model Support\n\n-   **Free Models**: DeepSeek R1 and Llama 4 via Groq (no API key required)\n-   **Premium Models**: Access to latest OpenAI, Anthropic, and Google models\n-   **Vision Support**: Upload and analyze images with vision-capable models\n-   **Thinking Models**: Support for reasoning-capable models\n\n### File Handling\n\n-   **Supported Formats**: Images (PNG, JPG, WebP), PDFs, text files, code files\n-   **Drag \u0026 Drop**: Intuitive file upload interface\n-   **File Preview**: Preview uploaded files before sending\n-   **Context Integration**: Files are automatically included in chat context\n\n### User Experience\n\n-   **Responsive Design**: Works seamlessly on desktop, tablet, and mobile\n-   **Dark/Light Mode**: Automatic theme switching support\n-   **Real-time Streaming**: See AI responses as they're generated\n-   **Chat Management**: Organize, rename, star, and delete chats\n-   **Usage Statistics**: Track your API usage and costs\n\n## 🚀 Deployment\n\n### Vercel (Recommended)\n\n1. Push your code to a Git repository\n2. Import your project to [Vercel](https://vercel.com)\n3. Add your environment variables in the Vercel dashboard\n4. Deploy automatically\n\n### Other Platforms\n\nThe application can be deployed to any platform that supports Next.js:\n\n-   Netlify\n-   Railway\n-   AWS Amplify\n-   DigitalOcean App Platform\n\n## 🤝 Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request.\n\n1. Fork the project\n2. Create your feature branch (`git checkout -b feature/AmazingFeature`)\n3. Commit your changes (`git commit -m 'Add some AmazingFeature'`)\n4. Push to the branch (`git push origin feature/AmazingFeature`)\n5. Open a Pull Request\n\n## 📄 License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n## 🙏 Acknowledgments\n\n-   [Next.js](https://nextjs.org/) - The React framework for production\n-   [Tailwind CSS](https://tailwindcss.com/) - A utility-first CSS framework\n-   [Radix UI](https://www.radix-ui.com/) - Low-level UI primitives\n-   [Prisma](https://www.prisma.io/) - Next-generation ORM\n-   [NextAuth.js](https://next-auth.js.org/) - Complete open source authentication solution\n\n## 📞 Support\n\nIf you have any questions or need help getting started, please open an issue on GitHub.\n\n---\n\n**Made with ❤️ using Next.js and modern web technologies**\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fakdevv%2Fbetter-chat","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fakdevv%2Fbetter-chat","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fakdevv%2Fbetter-chat/lists"}