ADR-0007: React with Vite for the product apps
- Status: Accepted
- Date: 2026-11-12
Context and problem statement
Section titled “Context and problem statement”The office system is used behind a sign-in, all day, on dense screens: lists with filters, a drag and drop pipeline board, long forms, an inbox. The driver app must be installable on a phone. Neither needs to be indexed by search engines.
Which front-end stack do the product apps use?
Decision drivers
Section titled “Decision drivers”- Fast interaction after the first load.
- Static output that a content delivery network can serve, with the API as the only application server.
- One stack shared by the office system and the driver app.
- Appearance that can be replaced without touching the screens, see ADR-0010.
Considered options
Section titled “Considered options”- React and TypeScript, built with Vite as single page applications.
- A React framework with server rendering. Common market alternative, listed for comparison.
Decision outcome
Section titled “Decision outcome”Chosen option: 1.
apps/web is the office system and apps/driver is the driver app, a separate React app (see ADR-0026). Both use React Router in data mode, TanStack Query for server data and cache, i18next for texts, Tailwind utilities generated from the design tokens and the components of packages/ui. The code they share without appearance (request client, i18n base, router link) is packages/app-kit. Both call the API only through the generated client, see ADR-0005.
Server rendering was not needed: every screen of these apps is behind a session. The pages that do need it are in the public sites, see ADR-0008.
Consequences
Section titled “Consequences”- Good, because the apps are static files and the API is the only server that holds business logic.
- Good, because the office system and the driver app share libraries, components and the contract client.
- Bad, because nothing is rendered on the server: the first load downloads the application before it shows data.
- Bad, because the repository has two rendering models, React single page apps for the product and Astro for the public sites.
More information
Section titled “More information”apps/webandapps/driver: the two apps.packages/app-kit: the shared base without appearance.- Concept pages: Design system, API contract, Internationalization.
- Building blocks shows where each app runs.