/tech-stack:tech-stackfrom tech-stack
Provides a canonical, opinionated technology stack for new projects — defaults for frameworks, databases, auth, hosting, and dependencies. Activates on stack decisions, scaffolding, and dependency selection.
Ships in tech-stack. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
This is the stack. Every new project starts here. The choices below are not a menu — they are the defaults, already decided, so you spend your time designing and building instead of re-litigating tooling. Deviate only when a project has a concrete reason the defaults can't serve, and when you deviate, say why.
The user this skill serves builds web app UIs and dashboards, interactive prototypes, and design systems — frequently touching sensitive data, often shipping the whole thing end-to-end. So two values sit underneath every pick: own your data (self-host the things that touch users; no third-party data processors holding identity or files) and reuse one mental model (React + TypeScript everywhere it can reach, so web, mobile, and email are the same skillset).
Six principles. Every choice below flows from one of them.
Query, Zod, and TypeScript instincts carry across all of them. Don't fragment the skillset.| Concern | Choice | Notes |
|---|---|---|
| Package manager | bun | Never npm. Ever. Including lookups (bun pm, not npm view). |
| Language | TypeScript | Everywhere on the JS side. No plain JS. |
| Web framework | TanStack Start | Full-stack: SSR + server functions on Vite. |
| Routing / data / tables / forms | TanStack Router / Query / Table / Form | One coherent suite. |
| Client/UI state | React state + URL params, then Zustand | Server state stays in Query, never copied into a store. |
| Validation | Zod | Every boundary. drizzle-orm/zod derives schemas from tables. |
| Styling | Tailwind v4 | CSS-first config, Vite plugin. |
| Components | shadcn/ui | Radix primitives you copy in and own. Accessible by default. |
| Toasts / notifications | Sonner | shadcn default; the visible-confirmation surface. |
| Motion | Motion (ex-Framer Motion) | Springs, gestures, layout animation. |
| Icons | Nucleo | The owned, licensed set. Not Lucide. |
| Fonts | Self-hosted | Served from your origin. No Google Fonts CDN. |
| Charts | Recharts | shadcn-native default; swappable per project. |
| Dates / numbers | Native Intl | No formatting library by default. |
| Lint + format | Biome | One fast Rust tool. Replaces ESLint + Prettier. |
| Design-system workbench | Storybook | Isolated component dev + docs. |
| Database | Railway Postgres | Self-hosted on your Railway. |
| ORM | Drizzle | TS-native, SQL-like, light. Zod via drizzle-orm/zod. |
| Auth | Better Auth | Self-hosted in your Postgres. Discord OAuth first. |
| Secrets / env | Railway vars + Zod-validated env | Nothing sensitive in the repo. |
| Dedicated backend (only if needed) | Rust: actix-web + tokio + SeaORM | Rust-native serving, no nginx. |
| Mobile | Expo / React Native | Shares React/TS/TanStack/Zod with web. |
| Desktop | Out of scope | Unless a project specifically demands it. |
| Hosting | Railway | Always. GitHub source → auto-deploy. |
| Tiny throwaway only | Cloudflare Workers | Never production. |
| Object storage | Railway Object Storage | Never R2/S3 directly. |
| AI / LLM | OpenRouter + orkey | Single key, capped keys minted per use. |
| Transactional email | Cloudflare Email | Routing (inbound); Email Service for outbound (beta). |
| Testing | Vitest + Playwright | Unit + e2e/a11y. Dial to project maturity. |
| Analytics | None by default | Add per project only. |
Before adding anything, walk the ladder. Stop at the first rung that satisfies the requirement.
The instinct is always down the ladder, toward less. Adding a backend, a database, or a new dependency is a decision you justify, not a default you assume.
Every web project is TanStack Start: SSR plus server functions on Vite, with type-safe routing. This posture matters for the sensitive-data case — server functions run on the server, so secrets and raw records are read and handled there and never reach the client bundle. The browser receives rendered output.
Use the full TanStack suite as one system:
Scaffold Start (SSR) — not the router-only SPA. Confirm the exact CLI against current TanStack docs; the starter moved off the old create-tsrouter-app package onto the consolidated @tanstack/cli:
bunx @tanstack/cli create my-app # TanStack Start, SSR by default
cd my-app && bun install
# add --router-only ONLY if you deliberately want a client-only SPA (no server functions)
Zod is the validation layer at every boundary: environment, forms, server-function inputs/outputs, and parsed external data. With Drizzle's drizzle-orm/zod integration, the database schema generates the Zod schemas, so the table definition is the single source of truth that flows into your forms and API types. Never let unvalidated data cross a boundary.
@tailwindcss/vite plugin and a CSS @theme block, not a sprawling tailwind.config.js.bunx shadcn@latest init
bunx shadcn@latest add button dialog dropdown-menu sonner
Define semantic CSS variables in the @theme/:root and .dark blocks (the shadcn convention) — components reference the variables, never raw colors. Toggle by setting a class on <html>, and persist the choice in a cookie read during SSR so there's no flash of the wrong theme on load. This is foundational; set it up before building screens, because everything inherits it.
Motion (formerly Framer Motion) for animation — springs, gestures, layout animations, drag. This is the tool for deliberate interaction: gesture commits gated behind real thresholds, a tactile tick at the commit line, visible confirmation of what just happened. (See Interaction design below — this matters here.) Reserve CSS transitions for trivial hovers/fades; reach for Motion the moment an interaction has state or gesture.
The calls every project hits on the first afternoon — all chosen to stay light:
shadcn add sonner). This is the visible-confirmation surface the interaction rules depend on: every async action gets a success or failure toast.Intl.DateTimeFormat / Intl.NumberFormat. No formatting library by default; reach for date-fns only when real date math (not just display) shows up.errorComponent and pendingComponent for loader/server-function failures. Show the user a generic message — never surface a raw error or secret. Pair with Query's error states for mutations.bunx @biomejs/biome init
For the design-system workload, Storybook is the workbench: isolated component development, visual documentation, and the a11y + interaction-test addons. It's heavier than the alternatives, and that weight buys the completeness a real, shared design system needs. Build components in Storybook, document their variants and states there, and consume them from apps.
The default tier — used directly from TanStack Start server functions, no separate backend.
Postgres, self-hosted on Railway. You own the data and the box; no third-party data processor sits between you and your users' records. Connect the GitHub repo as the service source so pushes auto-deploy.
Drizzle. TS-native, SQL-like, and light — no heavy runtime or codegen step. On Drizzle 1.0+, Zod schema generation is built into core: import createInsertSchema/createSelectSchema from drizzle-orm/zod (the standalone drizzle-zod package is deprecated). Either way, the table is the one source of truth that feeds validation and types. drizzle-kit handles migrations.
Better Auth, self-hosted. Sessions and users live in your Postgres, not a third party's servers — the right call whenever data is sensitive. Discord OAuth is the first-class provider (Google is a hassle to set up; avoid it unless a project specifically requires it). Add email/password or magic links as needed.
Default to no dedicated backend; server functions cover most needs. When a project genuinely requires a standalone service — heavy compute, long-running work, a shared API for multiple clients, or where raw performance and memory safety are the point — build it in Rust:
This is the deliberate, opinionated backend tier. It is a step you take on purpose, not a reflex. (The TS tier uses Drizzle; the Rust tier uses SeaORM — they don't mix within one service.)
Expo (React Native) for native-feeling mobile. It reuses the entire web mental model — React, TypeScript, TanStack Query, Zod — so mobile is the same skillset, not a second one. One team, one set of patterns, across web and phone.
Don't pin a desktop stack. Desktop is out of scope unless a specific project demands it; revisit the choice then rather than carrying an unused decision.
Everything ships to Railway. Connect the GitHub repo as the service source (auto-deploy on push) rather than uploading local images. SSR apps, the Rust backend, Postgres, and object storage all live there — one platform, your control, your data.
A really tiny throwaway site (a one-off demo, a quick static experiment) may deploy to Cloudflare Workers. This is a throwaway path only. Nothing production ever runs on Cloudflare Workers. If a "tiny" site grows real users or real data, it moves to Railway. No exceptions.
Files, uploads, and assets go to Railway Object Storage. Never R2 or S3 directly. Keeps storage on the same owned platform as everything else. Uploads flow through a server function that validates type/size with Zod and streams to storage, returning only an opaque key or rendered URL — the client never holds credentials. Use presigned direct-to-storage uploads only for large, non-sensitive assets.
orkey — the Rust CLI that mints spend-capped OpenRouter keys. Hand a coding agent or a project a key with a low ceiling (e.g. orkey mint for a $5 cap) instead of the real management key. If it leaks or loops on an expensive model, the cap eats the damage; orkey burn <hash> kills it when done.Install orkey to PATH and configure it as the way LLM keys get minted:
git clone https://github.com/noahdunnagan/orkey && cd orkey
cargo install --path .
# create a management key at openrouter.ai/settings/management-keys
mkdir -p ~/.config/orkey && cat > ~/.config/orkey/key
chmod 600 ~/.config/orkey/key
That cat > line waits silently for input — paste the management key, press Enter, then Ctrl-D to save. Nothing is echoed. (Setting OPENROUTER_MANAGEMENT_KEY works as a fallback, but the file keeps the key out of shell history.)
KEY=$(orkey mint) # capped key on stdout, hash on stderr
orkey ls # hash name $used/$cap
orkey burn <hash> # delete when done
Auth flows, magic links, and notifications go through Cloudflare Email. Two complementary pieces:
Caveats to plan around:
send_email Email Workers binding only reaches addresses already verified in your account — so it can't email a new user a magic link.This path is fine even though Cloudflare Workers is throwaway-only for hosting — email is a discrete service, not the app's home. Templates can be authored in React (the same skillset), then sent via the Worker.
Vitest + Playwright. Vitest for unit and logic tests (Vite-native, so it fits the toolchain with no extra config); Playwright for end-to-end flows and accessibility smoke tests in a real browser. Scale to project maturity: a throwaway prototype skips tests; a production app with sensitive data gets the full pair, with e2e coverage on every auth and data-mutation path.
Analytics: none by default. Add per project only when a real question needs answering — cleanest privacy posture, and the right default given sensitive data.
These projects frequently touch sensitive data, so this is not optional polish — it's the baseline. Make the right call by default:
The owned design sensibility, encoded so built interactions match it. Motion is the tool; these are the rules:
The canonical order for spinning up a standard web project. (Confirm CLI invocations against current docs — scaffolders move.)
bunx @tanstack/cli create. cd in, bun install.bunx @biomejs/biome init. Strict TS.@tailwindcss/vite plugin, set up the @theme block; define light/dark CSS variables and the <html>-class toggle (cookie-persisted, SSR-read).bunx shadcn@latest init, then add the primitives you need (include sonner for toasts).drizzle-orm/zod). If no: mocks, move on.errorComponent/pendingComponent.A dedicated Rust backend (actix-web + tokio + SeaORM), Expo mobile, Storybook, AI via OpenRouter + orkey, and Cloudflare Email get added only when the project actually reaches for them.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub noahdunnagan/cafe --plugin tech-stackOther plugins' skills for the same job