The website at sourcify.dev. It is a React app that Vite builds.
Use the Node.js version in .nvmrc. The tools need Node.js 22.13 or newer.
The app reads its settings from environment variables that start with VITE_. In the code, they are in import.meta.env.
Vite puts the values into the JavaScript bundle at build time. Do not put secrets in them: every visitor can read them.
npm run devreads.env.development. This file points to the staging backend.npm run buildreads.envand.env.production. The deploy workflow copies.env.build.stagingor.env.build.mainto.envbefore the build.
npm install
npm run dev
The server runs at http://localhost:3000.
npm run build
The build first checks the TypeScript types. Then it writes the static files to build/. Any static web server can serve this directory. The server must answer unknown paths with index.html, because the app handles the routes in the browser.
To serve the build on your computer, run npm run preview.
npm run lintchecks the code with ESLint.npm testruns the unit tests with Vitest.npm run test:e2eruns the smoke tests with Playwright against the build inbuild/. Runnpm run buildfirst. The first time, install the browser withnpx playwright install chromium.
The CI workflow runs all of these on every pull request.