Internal Tool (React Admin)
Vite + react-admin back-office: list/edit/show screens generated from a REST API in minutes.
8 steps
Shown with defaults: npm, pip, Node LTS, Python 3.12 and the template's default add-ons.
1. Install and select Node.js with nvm
runtimenvm lets you install several Node.js versions side by side and switch per project. `nvm use` activates it for this shell.
bashnvm install --ltsnvm use --lts- Expected result
- `node -v` prints the selected version.
- Verify
- node -v && npm -v
- OS notes
- macOS/Linux/WSL: install nvm with `curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.8/install.sh | bash`, then reopen the terminal. Windows: use nvm-windows (github.com/coreybutler/nvm-windows) from an elevated terminal, or fnm.
2. Scaffold a Vite + React app
templatecreate-vite copies the React template. --no-interactive skips prompts; the extra '--' is required by npm to forward flags.
bashnpm create vite@latest nvx-backoffice -- --template react-ts --no-interactive- Expected result
- A ./nvx-backoffice folder with index.html, src/ and package.json.
- Verify
- ls nvx-backoffice/src
- OS notes
- create-vite 9 needs Node.js 20.19+ or 22.12+.
3. Enter the project folder
templateThe scaffolder created ./nvx-backoffice. Move into it before installing anything else.
bashcd nvx-backoffice- Expected result
- You are inside ./nvx-backoffice
- Verify
- ls package.json
4. Install dependencies
templateDownload every package listed in package.json into node_modules.
bashnpm install- Expected result
- node_modules/ exists and a lockfile is created.
- Verify
- ls node_modules
5. Install react-admin and a data provider
templatera-data-json-server talks to any json-server-style REST API.
bashnpm install react-admin ra-data-json-server- Expected result
- react-admin in dependencies.
- Verify
- npm ls react-admin
6. Write the admin app
templateGuessers inspect the API response and generate screens; replace them with custom components later.
Files written by this step: src/App.tsx, src/index.css
src/App.tsximport { Admin, EditGuesser, ListGuesser, Resource, ShowGuesser } from "react-admin"; import jsonServerProvider from "ra-data-json-server"; // Demo REST backend. Point this at your own API (or swap the data provider). const dataProvider = jsonServerProvider("https://jsonplaceholder.typicode.com"); export default function App() { return ( <Admin dataProvider={dataProvider} title="nvx-backoffice"> <Resource name="users" list={ListGuesser} edit={EditGuesser} show={ShowGuesser} recordRepresentation="name" /> <Resource name="posts" list={ListGuesser} edit={EditGuesser} show={ShowGuesser} /> <Resource name="todos" list={ListGuesser} /> </Admin> ); }src/index.cssbody { margin: 0; }- Expected result
- src/App renders <Admin>.
7. Start the admin
templaterun manually · dev serverOpen the URL and browse Users, Posts and Todos.
bashnpm run dev- Expected result
- http://localhost:5173 shows the react-admin layout.
- Verify
- curl -I http://localhost:5173
8. Build for production
templateStatic output in dist/ — host it behind your company SSO.
bashnpm run build- Expected result
- dist/ is created.
- Verify
- ls dist