MCPcopy Index your code
hub / github.com/FranciscoMoretti/chat-js

github.com/FranciscoMoretti/chat-js @v0.3.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release v0.3.0 ↗ · + Follow
1,434 symbols 3,963 edges 472 files 34 documented · 2%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

ChatJS

ChatJS

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.

Website · Live Demo · Documentation

DemosOnly

CLI

Create a new ChatJS app:

npx @chat-js/cli@latest create my-app

The CLI walks you through gateway, features, and auth choices, generates chat.config.ts, and lists the env vars required by your selections.

Features

  • 120+ Models: Claude, GPT, Gemini, Grok via one API
  • Auth: GitHub, Google, anonymous. Ready to go.
  • Attachments: Images, PDFs, docs. Drag and drop.
  • Resumable Streams: Continue generation after page refresh
  • Branching: Fork conversations, explore alternatives
  • Sharing: Share conversations with public links
  • Web Search: Real-time web search integration
  • Image Generation: AI-powered image creation
  • Code Execution: Run code snippets in sandbox
  • MCP: Model Context Protocol support
  • Desktop App: Package as a native macOS, Windows, or Linux app with Electron

Stack

Monorepo Layout

Development

  • bun dev:chat: run chat app
  • bun dev:docs: run docs
  • bun lint: run workspace lint
  • bun test:types: run chat app typecheck

License

Apache-2.0

Vercel OSS Program

Extension points exported contracts — how you extend this code

GatewayProvider (Interface)
(no doc) [4 implementers]
apps/chat/lib/ai/gateways/gateway-provider.ts
Window (Interface)
(no doc)
apps/electron/src/preload.d.ts
Tech (Interface)
(no doc)
apps/site/components/tech-stack.tsx
RecursiveCharacterTextSplitterParams (Interface)
(no doc) [1 implementers]
apps/chat/lib/ai/text-splitter.ts
Feature (Interface)
(no doc)
apps/site/components/features.tsx
ElectronAuthErrorContext (Interface)
(no doc)
apps/chat/electron.d.ts
Window (Interface)
(no doc)
apps/chat/electron.d.ts
DeleteChatDialogProps (Interface)
(no doc)
apps/chat/components/delete-chat-dialog.tsx

Core symbols most depended-on inside this repo

cn
called by 336
apps/chat/lib/utils.ts
get
called by 49
apps/chat/lib/utils/rate-limit.ts
useSession
called by 33
apps/chat/providers/session-provider.tsx
createModuleLogger
called by 30
apps/chat/lib/logger.ts
generateUUID
called by 29
apps/chat/lib/utils.ts
truncateMessages
called by 19
apps/chat/lib/ai/token-utils.ts
useChatId
called by 18
apps/chat/providers/chat-id-provider.tsx
addLLMCost
called by 18
apps/chat/lib/credits/cost-accumulator.ts

Shape

Function 1,175
Interface 140
Method 92
Class 27

Languages

TypeScript100%

Modules by API surface

apps/chat/components/ai-elements/prompt-input.tsx56 symbols
apps/chat/lib/db/queries.ts50 symbols
apps/chat/components/ui/sidebar.tsx25 symbols
apps/chat/lib/ai/mcp/mcp-oauth-provider.ts22 symbols
apps/chat/lib/utils/message-mapping.ts18 symbols
apps/chat/lib/ai/text-splitter.ts18 symbols
apps/chat/hooks/chat-sync-hooks.ts18 symbols
apps/electron/src/main.ts17 symbols
apps/chat/lib/ai/mcp/mcp-client.ts17 symbols
apps/chat/components/ai-elements/message.tsx17 symbols
apps/chat/lib/db/mcp-queries.ts15 symbols
apps/chat/components/ui/dropdown-menu.tsx15 symbols

Datastores touched

playwrightDatabase · 1 repos

For agents

$ claude mcp add chat-js \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page