Skip to content

Development

Bryan Chen edited this page Apr 16, 2026 · 1 revision

Development Setup

Requirements

  • Node.js 18+
  • npm

Local Setup

git clone https://github.com/IlliniOpenEdu/PhysicsSims.git
cd PhysicsSims
npm install
npm run dev

Vite will print a local URL, typically http://localhost:5173.

Scripts

npm run dev      # start development server
npm run build    # type-check + production build
npm run preview  # preview production build
npm run lint     # run eslint
npm run deploy   # build and publish dist/ to GitHub Pages

Notes

  • This repository is configured for GitHub Pages project-site hosting.
  • vite.config.ts uses base: '/PhysicsSims/'.
  • Build output includes dist/404.html copied from dist/index.html so client-side routes work on refresh.

Contributor Architecture Notes

Primary app wiring points:

  • Route registration and app-level constants: src/App.tsx
  • Internal admin state and persistence keys: src/config/internalAdmin.ts
  • Collider defaults, bounds, detector map: src/lib/collider/constants.ts
  • Collider runtime update cadence: src/hooks/useColliderSimulation.ts

When changing behavior, locate the source constant first and update docs in Hardcoded Values and Keys.

Local Contributor Checklist

  1. Run npm run lint.
  2. Run npm run build.
  3. Test at least one sim in each track (mechanics, E&M, statics).
  4. If you changed routes or admin visibility, verify nav links and featured content still work.
  5. If you changed any hardcoded key/path/ID, update Hardcoded Values and Keys.

PhysicsSims Docs

Start Here

Contributor References

Quick Contributor Flow

  1. Read Development Setup
  2. Check Hardcoded Values and Keys
  3. Make changes and verify locally
  4. Update docs in Simulation Catalog or other affected pages
  5. Follow PR checklist in Contributing

Clone this wiki locally