This repository contains a basic React/Vite setup that can host many small applications. Only a single template app lives in apps/portfolio-state-machine/ but the tooling supports adding more apps under apps/<app-name>.
npm startlaunches a development server on port3000. UseAPP=<app-name>to serve a different app if more are added.npm testruns the Vitest test suite (tests live under each app'ssrcfolder).npm run buildexecutesscripts/build-all.jswhich builds every app underapps/and outputs them todocs/apps/<app-name>.
- Each app lives in
apps/<app-name>with its ownsrcdirectory andindex.html. Shared utilities are undersrc/common. - Screenshots for the index page are stored in
pics/. The numeric#column inapp-index.csvmatches a screenshot namedpics/<number>.png. Missing images fall back topics/blank.png. - Include
<a href="../../index.html">Back to app index</a>somewhere in each app'sindex.htmlso users can return easily.
- Use the shared
common.cssstylesheet in all static apps to ensure a unified look. It imports the Inter font and defines base margins, heading styles and button classes. - Link to
common.csswith a relative path, e.g.<link rel="stylesheet" href="../../common.css">. - Include
<meta name="viewport" content="width=device-width, initial-scale=1">and design with flexible layouts so pages remain responsive on mobile. - Keep asset paths relative (avoid leading
/) so the site works when published to GitHub Pages. In React apps passbasename={import.meta.env.BASE_URL}toBrowserRouter. - Embed small datasets inline so each app can be opened directly without a server.
- Keep the existing file and folder structure intact, even when content is reduced to placeholders.
- For app
index.htmlfiles, preserve the back link to../../index.htmland include the sharedcommon.cssstylesheet. - Keep placeholder content intentionally brief: a single heading and one short sentence is enough.
- For the website routes in
apps/website/src/pages, use short placeholder sections that name the page and nothing more. - When simplifying React apps, keep a minimal
App.jsx, a smallApp.css, and ensure tests assert the placeholder heading.