|
| 1 | +<div align="center"> |
| 2 | + |
| 3 | +<img src="apps/chat/app/icon.svg" alt="ChatJS" width="64" height="64"> |
| 4 | + |
| 5 | +# ChatJS |
| 6 | + |
| 7 | +Stop rebuilding the same AI chat infrastructure. ChatJS gives you a production-ready foundation with authentication, 120+ models, streaming, and tools so you can focus on what makes your app unique. |
| 8 | + |
| 9 | +[**Documentation**](https://chatjs.dev/docs) · [**Live Demo**](https://chatjs.dev) |
| 10 | + |
| 11 | + |
| 12 | + |
| 13 | +</div> |
| 14 | + |
| 15 | +<br /> |
| 16 | + |
| 17 | +## CLI |
| 18 | + |
| 19 | +Create a new ChatJS app: |
| 20 | + |
| 21 | +```bash |
| 22 | +npx @chat-js/cli@latest create my-app |
| 23 | +``` |
| 24 | + |
| 25 | +The CLI walks you through gateway, features, and auth choices, generates `chat.config.ts`, and lists the env vars required by your selections. |
| 26 | + |
| 27 | +## Features |
| 28 | + |
| 29 | +- **120+ Models**: Claude, GPT, Gemini, Grok via one API |
| 30 | +- **Auth**: GitHub, Google, anonymous. Ready to go. |
| 31 | +- **Attachments**: Images, PDFs, docs. Drag and drop. |
| 32 | +- **Resumable Streams**: Continue generation after page refresh |
| 33 | +- **Branching**: Fork conversations, explore alternatives |
| 34 | +- **Sharing**: Share conversations with public links |
| 35 | +- **Web Search**: Real-time web search integration |
| 36 | +- **Image Generation**: AI-powered image creation |
| 37 | +- **Code Execution**: Run code snippets in sandbox |
| 38 | +- **MCP**: Model Context Protocol support |
| 39 | + |
| 40 | +## Stack |
| 41 | + |
| 42 | +- [Next.js](https://nextjs.org) - App Router, React Server Components |
| 43 | +- [TypeScript](https://www.typescriptlang.org) - Full type safety |
| 44 | +- [AI SDK](https://ai-sdk.dev/) - The AI Toolkit for TypeScript |
| 45 | +- [AI Gateway](https://vercel.com/ai-gateway) - Unified access to 120+ AI models |
| 46 | +- [Better Auth](https://www.better-auth.com) - Authentication & authorization |
| 47 | +- [Drizzle ORM](https://orm.drizzle.team) - Type-safe database queries |
| 48 | +- [PostgreSQL](https://www.postgresql.org) - Primary database |
| 49 | +- [Redis](https://redis.io) - Caching & resumable streams |
| 50 | +- [Vercel Blob](https://vercel.com/storage/blob) - Blob storage |
| 51 | +- [Shadcn/UI](https://ui.shadcn.com) - Beautiful, accessible components |
| 52 | +- [Tailwind CSS](https://tailwindcss.com) - Styling |
| 53 | +- [tRPC](https://trpc.io) - End-to-end type-safe APIs |
| 54 | +- [Zod](https://zod.dev) - Schema validation |
| 55 | +- [Zustand](https://docs.pmnd.rs/zustand) - State management |
| 56 | +- [Motion](https://motion.dev) - Animations |
| 57 | +- [t3-env](https://env.t3.gg) - Environment variables |
| 58 | +- [Pino](https://getpino.io) - Structured Logging |
| 59 | +- [Langfuse](https://langfuse.com) - LLM observability & analytics |
| 60 | +- [Vercel Analytics](https://vercel.com/analytics) - Web analytics |
| 61 | +- [Biome](https://biomejs.dev) - Code linting and formatting |
| 62 | +- [Ultracite](https://ultracite.ai) - Biome preset for humans and AI |
| 63 | +- [Streamdown](https://streamdown.ai/) - Markdown for AI streaming |
| 64 | +- [AI Elements](https://ai-sdk.dev/elements/overview) - AI-native Components |
| 65 | +- [AI SDK Tools](https://ai-sdk-tools.dev/) - Developer tools for AI SDK |
| 66 | + |
| 67 | +## Monorepo Layout |
| 68 | + |
| 69 | +- `apps/chat`: Next.js chat app |
| 70 | +- `apps/docs`: Mintlify docs |
| 71 | +- `packages/cli`: interactive scaffold CLI |
| 72 | + |
| 73 | +## Development |
| 74 | + |
| 75 | +- `bun dev:chat`: run chat app |
| 76 | +- `bun dev:docs`: run docs |
| 77 | +- `bun lint`: run workspace lint |
| 78 | +- `bun test:types`: run chat app typecheck |
| 79 | + |
| 80 | +## Documentation |
| 81 | + |
| 82 | +Visit [chatjs.dev/docs](https://chatjs.dev/docs) to view docs. |
| 83 | + |
| 84 | +## License |
| 85 | + |
| 86 | +Apache-2.0 |
| 87 | + |
| 88 | +<br /> |
| 89 | +<a href="https://vercel.com/oss"> |
| 90 | + <img alt="Vercel OSS Program" src="https://vercel.com/oss/program-badge.svg" /> |
| 91 | +</a> |
| 92 | +<br /> |
0 commit comments