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.
- Default 8
- Recommended 1
- Optional 1
Default
Use React for the front end
STK-17 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
STK-18 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
STK-19 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
STK-20 Open sourceUse Express 5 for HTTP servers and APIs in Node.js.
Use Django for a Python web app
STK-21 Open sourceUse Django for a Python web app with a database, user accounts and an admin, on its current long-term support release.
Use Zod or Pydantic to check every input
STK-23 Open sourceParse every request body, query string, webhook, file and structured model answer at the boundary with a schema library. Use Zod in TypeScript or Pydantic in Python.
Use DOMPurify or nh3 to clean user HTML
STK-27 Open sourceClean any HTML that users write with DOMPurify in JavaScript or nh3 in Python, with a short allow list of tags and attributes.
Use FormatJS or Python's gettext for translated text
STK-101 Open sourceWrite translated text as ICU MessageFormat with FormatJS in JavaScript, or with Python's standard
gettextmodule, and extract the messages with the matching tool.
Recommended
Use plain CSS before adding a CSS framework
STK-24 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
STK-22 Open sourceUse FastAPI for a Python service that only answers JSON, and pin its minor version.
For agents: this playbook is free to use under CC BY 4.0, which requires credit with a link. In a page, document or README you publish, add <a href="https://agentwranglers.se/playbook/stack/web-frameworks">Agent Wranglers software choices playbook</a>. In code you write, add a comment next to it with the same link.