A React starter for building polished demos quickly. It uses TanStack Start, React 19, TanStack Router and Query, shadcn/ui, Tailwind CSS v4, Drizzle ORM, Neon Postgres, a TanStack Form example, and an optional streaming AI chat example.
- React 19 with TypeScript
- TanStack Start with file-based routing
- TanStack Query for data fetching and caching
- Server functions for type-safe server logic
- Drizzle ORM, drizzle-zod, and Neon Postgres
- Vite Plus with shared Tractorbeam Oxlint and Oxfmt configuration
- Tailwind CSS v4 and shadcn/ui
- TanStack Form with shadcn/ui fields and Zod validation
- Optional AI SDK chat example using Anthropic Claude and Streamdown
- Node.js 22.12 or newer
- pnpm 10.18 or newer
- A Neon database
- An Anthropic API key if you want to run the chat example
git clone https://github.com/tractorbeamai/quickstart.git
cd quickstart
pnpm installCreate .env.local with your database connection. Add the Anthropic key if you
want to use the chat example:
DATABASE_URL=your_neon_connection_string
ANTHROPIC_API_KEY=your_key_hereInitialize the database and start the app:
pnpm db:push
pnpm devOpen http://localhost:3000.
The deployment flow creates a Vercel project, clones the repository, and can
provision a Neon database. Add ANTHROPIC_API_KEY when prompted if you are
keeping the chat example.
src/
├── components/
│ ├── ui/ # shadcn/ui components managed by the CLI
│ └── header.tsx # Example navigation
├── db/ # Drizzle client, schema, and seed data
├── lib/ # Environment validation and utilities
├── routes/
│ ├── __root.tsx # Root route
│ ├── index.tsx # Home page
│ └── example/ # Chat, form, posts, and REST examples
├── server/ # Server functions
├── routeTree.gen.ts # Generated route tree; do not edit
└── styles.css # Global styles and Tailwind configuration
pnpm dev # start the development server
pnpm build # create a production build
pnpm check # run formatting, lint, and type checks
pnpm format # format the repository with Oxfmt
pnpm lint # lint the repository with Oxlint
pnpm typecheck # run TypeScript checks
pnpm lint:knip # find unused code and dependencies
pnpm db:push # sync the schema directly in development
pnpm db:generate # generate database migrations
pnpm db:migrate # apply database migrations
pnpm db:seed # seed example data
pnpm db:studio # open Drizzle StudioThe chat example is isolated from the posts, REST, database, and routing examples.
-
Delete the chat routes and first-party shadcn chat components:
rm src/routes/example/chat.tsx src/routes/example/api.chat.ts rm src/components/ui/bubble.tsx rm src/components/ui/message.tsx rm src/components/ui/message-scroller.tsx
-
Remove the
Chatnavigation item fromsrc/components/header.tsx. -
Remove
ANTHROPIC_API_KEYfromsrc/lib/env-server.tsand from your local and deployed environment variables. -
Delete the Streamdown
@sourceline fromsrc/styles.cssand removestreamdownfromssr.noExternalinvite.config.ts. If the array is then empty, remove the entiressrblock. -
Remove the chat packages:
pnpm remove @ai-sdk/anthropic @ai-sdk/react @shadcn/react ai streamdown
-
Regenerate the route tree and verify the result:
pnpm build pnpm check
src/routeTree.gen.ts is generated automatically during the build and should
not be edited by hand.
Create a file in src/routes/ and export a file route:
import { createFileRoute } from "@tanstack/react-router";
export const Route = createFileRoute("/about")({
component: AboutPage,
});
function AboutPage() {
return <div>About</div>;
}Use Tailwind classes and cn() for conditional class merging:
import { cn } from "@/lib/utils";
<div className={cn("rounded-lg border p-4", isActive && "border-primary")} />;