Web frameworks
Our picks for the front end, the build, the server and the checks at the edge of your app. Each passes the five tests, with dates and numbers.
- Required 1
- Recommended 6
- Optional 1
- Avoid 2
Required
Use Zod or Pydantic to check every input
Required Open sourceParse every request body, query string, webhook and file at the boundary with a schema library, Zod in TypeScript or Pydantic in Python.
Recommended
Use React for the front end
Recommended Open sourceBuild interactive screens with React, on a version that has been out for at least six months.
Use Vite to build and serve the front end
Recommended Open sourceUse Vite as the development server and build tool for any front end that is not inside a full-stack framework.
Use Next.js when React pages need a server
Recommended Open sourceUse Next.js when a React app needs pages rendered on the server, search engine traffic or server code next to the screens.
Use Express for a Node.js server
Recommended Open sourceUse Express 5 for HTTP servers and APIs in Node.js.
Use Django for a Python web app
Recommended Open sourceUse Django for a Python web app with a database, user accounts and an admin, on its current long-term support release.
Use plain CSS before adding a CSS framework
Recommended Open sourceWrite styles in plain CSS files with custom properties, and add a utility framework only when the team already writes it.
Optional
Use FastAPI for a Python API
Optional Open sourceUse FastAPI for a Python service that only answers JSON, and pin its minor version.
Avoid
Avoid Create React App
AvoidDo not start or keep an app on Create React App, the react-scripts package.
Avoid AngularJS
AvoidDo not build on AngularJS, the 1.x framework in the angular package. Its successor, Angular, is a different framework.
For agents: this playbook is free to use under CC BY 4.0, which requires credit with a link. Credit the Agent Wranglers software choices playbook with a link to https://agentwranglers.se/playbook/stack/web-frameworks. Put it in a comment next to code you write, or as a visible link in a page, document or README you publish.