Modern dashboard starter rebuilt on top of Vite, React 19, React Router 7, Redux Toolkit, Bootstrap 5, and TypeScript tooling.
React 19Vite 8React Router 7data routerRedux Toolkit 2Bootstrap 5+reactstrapRechartsVitest+ Testing LibraryESLint 9flat config
- Modern app shell with lazy routes and route guards
- Demo authentication with local sessions or an optional cookie-based server
- Posts backed by local demo data or the existing SQLite database through GraphQL
- Bootstrap icon explorer, dashboard widgets, charts, tables, notifications, and maps
- SCSS theme layer adapted to Bootstrap 5
Node.js 24+npm 10+
npm ci
npm run devThe app starts with Vite and is available on the local URL printed in the terminal.
Use the built-in local demo account on the login screen:
user / password
npm run dev
npm run build
npm run preview
npm run lint
npm run typecheck
npm run test
npm run test:watchnpm run devstarts the Vite development server.npm run buildruns TypeScript checks and creates the production bundle.npm run previewserves the built bundle locally afternpm run build.npm run lintruns ESLint.npm run typecheckruns TypeScript without emitting files.npm run testruns the frontend and backend integration tests.npm run test:watchstarts Vitest in watch mode.npm run serverserves the built app and authenticated API on port 5000.npm run db:initexplicitly creates a new, empty SQLite database; it refuses to modify an existing file.
The static demo remains the default. To use the server, create an untracked .env.local:
VITE_BACKEND=true
JWT_SECRET=replace-with-a-long-random-secret
DATABASE_URL=sqlite:database.sqliteFor a new local database only, run npm run db:init. Then run npm run build and npm run server, and open http://localhost:5000. For development, keep the server running and use npm run dev in another terminal; Vite proxies the API to port 5000. npm run preview only serves static assets and does not run the API.
Server mode keeps the deployed demo credentials (user / password), the id_token cookie, and the existing GraphQL queries: me, posts, and news. Authentication uses an HttpOnly cookie; the frontend does not store the JWT. /session validates the cookie on page entry, and POST /logout clears it. Login still returns id_token for existing API clients. Mutations remain disabled, as they were in the deployed backend; the server UI shows posts as read-only. Registration is not supported by the demo.
The server reads the legacy Post table without altering the database. Missing databases or tables stop startup with an error. The news query retains the external RSS provider and reports provider errors through GraphQL.
The Dockerfile builds the UI with VITE_BACKEND=true and starts the API on port 5000 using Node 24. It does not create a database or supply a JWT secret. Server mode is served at the site root; VITE_BASE_PATH is for the static demo.
Before a future deployment:
- Preserve the existing
JWT_SECRETso old HS256 login cookies remain valid. Supply it at runtime, never as aVITE_variable or build argument. - Back up and retain the existing database volume. Mount it at
/dataand setDATABASE_URL=sqlite:/data/database.sqlite. Do not replace an existing database with demo data. - If the volume has no database, explicitly initialize it with
node server/init-db.mjsin a one-off container mounting that volume. Initialization is never automatic. - Keep HTTPS at the reverse proxy. The image sets
NODE_ENV=production, enabling Secure cookies. Preserve the container's proxy network and port 5000 routing. - Retain the old image and deployment configuration for rollback. Verify login, session restoration, logout and authenticated GraphQL before switching traffic.
No deployment is performed by the package scripts.
Create a local .env file only when you need one of these optional behaviors:
# optional: switch the maps page to Google Maps instead of the built-in OSM fallback
VITE_GOOGLE_MAPS_API_KEY=your_api_key
# optional: deploy the app under a sub-path, for example /react-dashboard/
VITE_BASE_PATH=/your-base-path/- Without
VITE_GOOGLE_MAPS_API_KEY, the maps demo automatically falls back to an embedded OpenStreetMap view. - Use
VITE_BASE_PATHonly when the app is deployed under a sub-path instead of the site root.
- The legacy CRA toolchain, old Redux setup, and browser JWT/polyfill hacks were removed. The optional backend preserves the deployed login and GraphQL query contract using current dependencies.
- The template keeps demo data local by default so it can run without a backend.
- The app root redirects to
/loginfor guests and to/app/mainfor active demo sessions. - The active local workflow is
npm ci+npm run dev; there is nonpm startscript in this template. - Use the committed
package-lock.jsonfor reproducible dependency installs. The legacyyarn.lockhas been removed. - The scoped
minimatchoverride fixes GHSA-g3hv-75wg-m249 in the TypeScript ESLint dependency chain. Remove it when that dependency requires a patched version itself.node-forgeis no longer in this dependency tree.
