Skip to content
Source
Sign inSign up
TanStack/ai

examples/ts-remix-chat

README.md

ts-remix-chat

A minimal Remix application starter with a home page.

Starter Shape

  • app/actions/controller.tsx owns the top-level route actions.
  • app/actions/home-page.tsx and app/actions/document.tsx render the route-owned starter UI.
  • app/actions/public/ contains the browser runtime entry and interactive prompt button.
  • app/routes.ts defines the shared route contract used by server and browser modules for type-safe hrefs.
  • app/router.ts wires routes to handlers and installs the standard Remix UI renderer used by actions.
  • app/assets.ts owns the server-side asset pipeline used by the asset route and render middleware.
  • Root public/ contains static files served unchanged from the app root.

Growing The App

  • Put top-level route actions in app/actions/controller.tsx.
  • Add app/actions/<route-key>/controller.tsx when a nested route map needs its own actions or middleware.
  • Add directories like app/data/ or test/ when the app actually needs them.
  • Move shared UI into app/ui/ once more than one route needs it.

Commands

npm i
npm run dev
npm run hmr
npm run start
npm test
npm run typecheck