The defaults I reach for when I start a new front-end project, written down so I stop deciding them from scratch. Shared in case they help you too.
tl;dr
Area
Choice
Framework
TanStack Start (React 19)
Build
Vite 8
Language
TypeScript 7, strict
Components
Base UI
Styling
Tailwind CSS v4, tailwind-variants
Animation
Motion
Local state
useState and useReducer
Shared state
The URL first, then Zustand
Server state
TanStack Query
Forms
TanStack Form
Validation
Zod
API types
GraphQL Code Generator, openapi-typescript
DevTools
TanStack Devtools
Logging
LogTape
Local URLs
portless
Package manager
pnpm
Lint and format
oxlint and oxfmt, through Ultracite
Type checking
tsrs
Unit tests
Vitest
Component tests
Storybook, through its Vitest addon
End-to-end tests
Playwright
API mocking
Mock Service Worker
Hosting
Vercel, without a strong preference
Analytics, flags, errors
PostHog, when a project needs them
Keyboard shortcuts
TanStack Hotkeys
That's the short version. Below is why each tool earned its spot.
Framework: TanStack Start
I've shipped a lot of Next.js and I still do. For a new project of my own I now start with TanStack Start, for two reasons.
The first is the router. Routes, params and search params are typed end to end, so a link to a page that doesn't exist is a compile error and not a bug report. Search params are validated and treated as state, which removes a whole category of "why did the filter reset when I refreshed" problems.1
The second is that Next.js leans towards Vercel. It runs elsewhere, but for a long time its best features assumed Vercel's platform, and I'd rather my framework didn't choose my host. To be fair, that's changing: since Next.js 16.2 there's a stable adapter API for building it for other platforms, and Vercel's own adapter is open source and uses the same API.
TanStack Start is a Vite app: one build tool, one config file, and plugins that behave the same in dev and in production. Add the developer experience the TanStack team puts into everything they make, and it was an easy call.
Components: Base UI
For behaviour I use Base UI. It comes from the team behind Radix, which was already a good library, and it goes further: dialogs, menus, popovers and the rest arrive with focus handling, keyboard support and ARIA done properly, and the docs are good enough that I rarely need anything else. It has no opinion about how anything looks, which is the point. I'd rather write the CSS than fight someone else's.
It also handles polymorphic components, without an as prop or asChild. Its components take a render prop to swap the element they render, and the useRender hook gives my own components the same prop:
text.tsx
import { mergeProps } from "@base-ui/react/merge-props";import { useRender } from "@base-ui/react/use-render";import { Link } from "@tanstack/react-router";const Text = ({ render, ...props }: useRender.ComponentProps<"p">) => useRender({ defaultTagName: "p", render, props: mergeProps<"p">({ className: "text-muted" }, props), });// A <strong> with the same styles<Text render={<strong />}>Important</Text>;// A router link: Text adds its class, Link keeps its typed to prop<Text render={<Link to="/blog" />}>Read the blog</Text>;
tsx16 lines
Styling: Tailwind v4 and tailwind-variants
Tailwind v4 moved the configuration into CSS: my tokens (colours, type sizes, spacing) are custom properties in one stylesheet, and the utilities are generated from them. A theme is then a different set of values for the same properties, so dark mode and high contrast are a few lines each.
I add one rule on top: no arbitrary values. If I need 13px text, it becomes a token with a name. shadcn/lint's no-arbitrary-values rule enforces it, and even names the token to use: write text-[13px] and it suggests text-ui, the same size on the scale. The design stays a system instead of drifting into a collection of one-offs.
For all the small variants a component has, I love tailwind-variants. A component declares its variants once and gets typed props for free:
The other strong candidate is Panda CSS, because of how much it leans on TypeScript: the styles are typed, so autocomplete works out of the box, with no editor extension to install. Tailwind is still the quicker way to get a project going.
Animation: Motion
For animation, I reach for Motion when CSS transitions aren't enough: layout transitions, springs and reduced-motion support out of the box.
State, data and forms
I think about state in levels, and pick the lowest one that works.
In the component. State that belongs to one component and nowhere else stays there, in useState or useReducer. Most state belongs here, and most of it never needs to move. Reaching for useEffect to keep it in sync is usually a sign that it should be derived instead.
In the URL. Filters, tabs, selected items: anything a user might want to share or come back to. Send someone the link and they get the same screen.
In a store. For the little that is truly global, client-only and not worth sharing, such as whether the command palette is open: Zustand.
Server state is its own thing: data that lives somewhere else and that I'm borrowing. For that I use TanStack Query, the natural partner to TanStack Start. It doesn't care how the data arrives (fetch, GraphQL, anything that returns a promise), and caching, retries, invalidation and optimistic updates come with it.
Forms get TanStack Form. Not much to add: the developer experience is great and the TypeScript integration is the best I've used.
Typings
TypeScript only knows what I tell it. Inside the app that's enough, but anything that arrives from outside (an API response, a form, a search param) is a guess until something checks it. So I type the edges.
Validation:Zod. One schema gives me both the runtime check and the type, so the two can't drift apart. TanStack Router validates search params with it, and TanStack Form validates fields with it.
GraphQL:GraphQL Code Generator. It reads the schema and my queries and writes a type for each operation, so asking for a field that doesn't exist is a compile error.
REST:openapi-typescript, when the API has an OpenAPI spec. It turns the spec into types, and openapi-fetch uses them to type every request: the path, the params and the response. It only generates types, so the one thing that ships is a small fetch wrapper.
DevTools
Good feedback while I build is one of the things I care about most. The sooner I can see what the app is doing, the sooner I find out what's wrong with it.
For that, TanStack Devtools is amazing. It's one panel for everything, and there are already plugins for plenty of libraries. The ones I use most are TanStack Query's, which shows every query, what's in its cache and when it refetches, and TanStack Form's, which shows each field's value, errors and state as I type. Both make building a feature a lot easier.
Logs are part of that feedback too. For logging I use LogTape: structured logs, no dependencies, and it runs everywhere I need it, from the browser to Node, Bun and the edge. Libraries can log through it without deciding where their logs end up; the app sets that up once. And with a plugin, those logs show up in the same devtools panel as everything else.2
Local URLs: portless
I usually have several projects running at once, and most of them want the same port. Next.js and TanStack Start both begin at 3000, so the second one to start either fails or moves to 3001. From then on the address depends on the order I started things in, and the tab I left open on localhost:3000 may be showing a different project.
The browser gets confused too. Cookies ignore the port, so every project on localhost shares them, and signing in to one can sign me out of another. localStorage does respect the port, which only helps until two projects take turns on the same one.
portless, from Vercel Labs, gives each project a name instead. It goes in front of the command I already run:
package.json
{ "scripts": { "dev": "portless run vite dev" }}
json5 lines
The project is now at https://my-app.localhost, every time. The name comes from package.json, and a small local proxy sends it to whichever free port the dev server was given. Each name has its own cookies and storage, and it's HTTPS from the start: the first run creates a local certificate and asks for my password to trust it.
It knows about Git worktrees too, which helps when an agent works on one branch while I'm on another. portless run adds the branch to the name, so fix-ui opens at https://fix-ui.my-app.localhost while the main checkout stays where it was. Agents don't have to guess the port either: I put the URL in AGENTS.md, and portless list shows everything that's running.3
It isn't at 1.0 yet, so I install it in each project and let the lockfile decide the version. To run the plain server instead, PORTLESS=0 pnpm dev skips the proxy.
Tooling: fast enough to forget about
The best tooling is the kind you never see and that never gets in your way.
Package manager:pnpm. It just works, and it's fast. I'd like to move to Bun at some point, for how much it does out of the box, but for now pnpm is the safe choice.
Linting and formatting:oxlint and oxfmt, both very fast, through Ultracite's preset so I don't maintain a rule list by hand. They run in a pre-commit hook (lefthook) and finish before I've noticed they started.4
Type checking:tsrs. It is the Oxc project's port of the TypeScript 7 checker to Rust, and it replaces tsc --noEmit without any other change. On this site a check took about 2 seconds on TypeScript 6, 0.4 on TypeScript 7 and 0.14 with tsrs, using less than half the memory of tsc. It's still a beta, so I pin it to an exact version and keep tsc installed for the editor and as a second opinion.
Ultracite's preset is strict, and I like it that way. Conventions get checked by a machine and are never argued about in review. And now that a lot of code is written with AI agents, strictness matters more: the more a machine checks, the more of an agent's code I can trust.
Testing: Vitest, Storybook and Playwright
One tool per layer, plus one for the network.
Vitest for unit tests: pure functions, data integrity, the odd hook. It shares the Vite config, so there's no second build setup to keep in sync.
Storybook for component tests. Its Vitest addon runs every story as a test in a real browser, so the stories I write to build a component also check it.
Playwright for end-to-end tests, in a desktop browser and a phone-sized one. I write them the way a user would describe the feature ("the filter survives a reload") and avoid testing implementation details.
Mock Service Worker for the network. It intercepts requests instead of replacing my code, so the same handlers answer the app in development, the stories in Storybook and the tests in Vitest and Playwright.
Hosting: Vercel
I don't have a strong opinion here. Vercel is what I use these days: it just works. I used Netlify before that, and Cloudflare is the one I'd try next (more on that below).
Analytics, flags and errors: PostHog
A personal site rarely needs analytics. When a project does, or needs feature flags or error tracking, I use PostHog. The developer experience is excellent.
Keyboard: TanStack Hotkeys
Keyboard shortcuts are one of my favourite micro-interactions. On this site, ⌘K opens the command palette, G and then a number jumps to a page, J and K move between posts, and ← → flip through a project's screenshots. None of them is essential, but they make a site feel looked after.
Writing them by hand is fiddlier than it looks: ⌘ on a Mac but Ctrl everywhere else, staying quiet while someone types in a text field, a time limit between the keys of a sequence, and removing the listener afterwards. TanStack Hotkeys handles all of it in one hook:
shortcuts.tsx
import { useFormatForDisplay, useHotkey } from "@tanstack/react-hotkeys";// ⌘K on a Mac, Ctrl+K everywhere elseuseHotkey("Mod+K", () => openPalette());// G, then H: each key within a second of the lastuseHotkey(["G", "H"], () => navigate({ to: "/" }));// "⌘ K" or "Ctrl+K", for the hint next to the buttonconst format = useFormatForDisplay();format("Mod+K");
tsx11 lines
The strings are typed, so a typo or "Shift+Mod+S" (Mod has to come first) is a compile error. It also has a plugin for the devtools panel that lists every shortcut on the page. It's still in beta and its API may change, so I pin it to an exact version.
What I'm watching
Everything from the TanStack team. Right now that means TanStack Charts, and what they're doing with AI.
Vercel's UI SDK. A headless library of interface behaviours from Vercel Labs, built with coding agents in mind. It's an early beta, but it looks really good, and my guess is that it could overtake Base UI.
e2e, from the TesterArmy team. An open-source end-to-end testing framework built around AI agents, for web, iOS and Android. A test can mix plain-English goals, which an agent works through, with exact locators and assertions, in the same file. It's not at 1.0 yet, but it could change how I write the end-to-end layer.
Cloudflare for hosting. A possible replacement for Vercel. Cloudflare has an official guide for TanStack Start on Workers, and a prerendered site like this one would move over easily.
shadcn/lint. A linter for Tailwind design systems from the shadcn/ui team, built with agents in mind. I decide what's allowed, such as which classes a component accepts, and when an agent breaks a rule, the error says why and suggests a fix based on my own components and theme. It's only at 0.2, but it already checks this site: the no-arbitrary-values rule from the styling section is one of its own.
What ties it together
Developer experience is paramount. Every tool here earns its place through it, in two ways. The first is a good API: the easier a tool is to understand and use, the less I think about the tool and the more about what I'm building. The second is speed. A fast tool keeps the feedback loop short, and a short loop is what keeps me moving: oxlint finishes before I notice it started, tsrs checks the whole site in a fraction of a second, and the devtools show me what changed as it happens.
And then there's TypeScript. A tool that leans on types gives an AI agent fewer ways to be wrong, and gives me more reason to trust what it wrote.
Speaking of AI agents, I suspect the next big test for a library is how good it is for them. Does it ship its own skills, so an agent knows how to use it properly? Can an agent check its own work against it, through types, lint rules or even formal verification? A few already try: e2e installs a skill for coding agents, and shadcn/lint was built for them from the start. Or maybe the future is one where we stop caring about libraries at all. Who knows.