The CRA toolchain was several major versions behind and no longer maintained, so the whole build, lint and runtime stack is replaced. - replace react-scripts with Vite 8 and TypeScript 7 - upgrade to React 19 and react-router 8 - swap unmaintained libraries: react-html-parser, axios, react-ga, react-image-lightbox, react-helmet, moment, react-spinner-material - replace ESLint with Biome for linting and formatting - switch the package manager from yarn to npm - serve static-contents/ with sirv in dev and copy it into the bundle - keep a withRouter shim so the class components can stay as they are for now
1.9 KiB
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.