react-router removed withRouter in v6, and the shim that replaced it kept nineteen components tied to injected router props. They now read the state directly, matching how bsi-ni.brain.riken.jp is written. - convert the remaining class components to function components - call useLocation, useNavigate and useParams in place of the props - drop src/common/lib/withRouter.tsx
Visiome Platform
Static front-end for the archived Visiome Platform site, built with Vite, React and TypeScript.
Requirements
- Node.js 20.19+ / 22.12+ (Vite 8)
- npm
Setup
npm install
Site data
The pages are rendered from JSON dumped out of the original XooNIps/XOOPS
installation by the PHP scripts in etc/. Two locations are used:
static-contents/— served from the site root (database/items.json,manual_ja/*.json,primface/*.json,rss.xml, downloadable files). The dev server serves this directory, andnpm run buildcopies it intodist/.src/*/assets/*.json— bundled into the application (index tree, rankings, recent contents, credits, pico configuration).
Both are generated content and are not tracked in git.
Scripts
| Command | Description |
|---|---|
npm run dev |
Start the dev server on http://localhost:3000 |
npm run build |
Type-check and build into dist/ |
npm run preview |
Serve the production build locally |
npm run lint |
Lint with Biome |
npm run format |
Format with Biome |
npm run check |
Lint, format and organize imports, applying the safe fixes |
@types/node is pinned to the major that matches the Node runtime in use (24);
.ncurc.json keeps npm-check-updates from bumping it past that.
There is currently no test suite.
Deployment
Upload the contents of dist/ to the document root. The bundled .htaccess
rewrites the legacy XOOPS download URLs and sends every unmatched path to
index.html so client-side routing works on a full page load. On a server
without Apache, configure the equivalent SPA fallback.
Google Analytics
GOOGLE_ANALYTICS_TRACKING_ID in src/config.ts is empty, which disables
tracking. Set a GA4 measurement ID (G-XXXXXXXXXX) to enable it; the old
Universal Analytics property was shut down in 2023.