Skip to content

Badbird5907/redux-chat

Folders and files

NameName
Last commit message
Last commit date

Latest commit

99d91ea · · May 8, 2026

History

138 Commits
Apr 29, 2026
Dec 23, 2025
May 8, 2026
Dec 23, 2025
May 2, 2026
Apr 25, 2026
Apr 29, 2026
Dec 23, 2025
May 1, 2026
May 1, 2026
Apr 25, 2026
May 1, 2026
Dec 23, 2025
Dec 27, 2025
Apr 29, 2026
May 2, 2026
May 1, 2026
May 2, 2026

Repository files navigation

Redux Chat

Redux Chat is yet another AI chat app, except this one is built to be actually good.

I built Redux Chat because I was tired of waiting for other chat apps to add the features I wanted. I liked Perplexity's better search, Claude's projects and learning style, and T3 Chat's broad model selection, but I kept bouncing between different apps depending on the task. Redux Chat is my attempt at one chat app to rule them all.

Features

  • Wide model selection from top labs, including OpenAI, Anthropic, Google, Moonshot, and more
  • A fast, responsive web app that stays usable during long chats
  • Customizable system prompts
  • Custom MCP servers over HTTP transport
  • Projects with RAG (Retrieval Augmented Generation)
  • Universal file support for Office documents, PDFs, and other attachments
  • Python sandbox tools for analysis workflows

Document support across models

Redux Chat tries its best to let models support as many file types as possible. Not every model accepts the same attachment types, so when the chosen model supports a file natively it is sent as-is; otherwise it is converted to PDF, and if the model doesn’t accept PDF either, text extracted from that PDF is sent instead.

Those conversions run through Gotenberg, which calls the LibreOffice CLI so DOCX, PPTX, spreadsheets, and similar formats can be normalized reliably.

Optimizations

  • Signed IDs let the client know upcoming thread and message IDs before the write reaches Convex. The server signs allocatable IDs in signed-id.ts, and the client keeps a small pool ready with signed-id-allocator.ts. That means sending a message can immediately route to the right thread and render optimistic UI instead of waiting for the backend to create a row and return its ID, saving roughly 130-200ms per send.
    • We sign the IDs (using HMAC-SHA256) because we don't want to trust the client to generate the IDs themselves. By signing them, we can be sure that the IDs were generated by the server and not tampered with.
  • Thread loading is paginated and the thread list is virtualized, so large thread histories don't lag the page. The UI only renders the visible window of rows while data loads in smaller chunks, which keeps memory usage, layout work, and React render time low even as the account accumulates many threads.
  • Files converted into PDFs, and PDFs converted into text are done on the fly, and cached in Redis. This means that the first time you send a file, it will be converted and cached, and subsequent sends will use the cached version. (and will be much faster!)
  • Expensive chat UI pieces use useMemo and memo where they meaningfully reduce repeated work. This keeps streaming, message updates, and sidebar state changes from forcing heavy components to recompute or rerender unnecessarily.
  • Routes are preloaded on hover, so client-side navigation starts fetching the next route's bundle before the click happens. By the time you click, the code and data needed for the next screen are often already downloaded.

Tech Stack

Local Development

Install dependencies:

pnpm install

Create a local environment file:

cp .env.example .env

Start local infrastructure, including Redis, Mailpit, and MinIO:

docker compose up -d

Run the app and workspace dev tasks:

pnpm dev

The TanStack Start app runs on port 3712 when started directly.

Useful Commands

# Run all dev tasks through Turbo
pnpm dev



# Build the workspace
pnpm build



# Typecheck the workspace
pnpm typecheck



# Lint and format
pnpm lint
pnpm format



# Fix lint and formatting issues
pnpm lint:fix
pnpm format:fix



# Run only the TanStack Start app
pnpm -F @redux/tanstack-start dev



# Run Convex locally
pnpm -F @redux/backend dev



# Generate Better Auth Convex schema
pnpm auth:generate



# Refresh generated model metadata
pnpm models:generatee