This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
Currently, two official plugins are available:
- @vitejs/plugin-react uses Oxc
- @vitejs/plugin-react-swc uses SWC
The React Compiler is enabled on this template. See this documentation for more information.
Note: This will impact Vite dev & build performances.
Admin APIs are protected by a token middleware. Route name alone is not security.
- Copy
.env.exampleto.env - Set values for
ADMIN_API_TOKEN,ADMIN_USERNAME, andADMIN_PASSWORD - Start backend:
node server.js - Start frontend:
npm run dev - Open admin UI at
/admin.html - Login with
ADMIN_USERNAMEandADMIN_PASSWORD
Without a valid token, /admin/* APIs return 401 Unauthorized.
You can insert multiple users in one request.
POST /admin/users/bulk
Payload example:
{
"users": [
{ "email": "a@example.com", "name": "A", "level": 1 },
{ "email": "b@example.com", "name": "B", "level": 2 }
]
}POST /admin/users/seed
This imports users from data/defaultUsers.json.
If you are developing a production application, we recommend using TypeScript with type-aware lint rules enabled. Check out the TS template for information on how to integrate TypeScript and typescript-eslint in your project.