Interactive frontend for analyzing and optimizing ship hull shapes. Includes 3D hull upload/preview, hydrostatics, resistance, power, weight, comfort, structural views, plus an optimization workspace ready to talk to a Python backend (deep learning and surrogate models).
src/components/– UI views (analysis tabs, optimization workspace, sidebar, etc.)services/– API hooks/services (e.g.,optimizationService.tsmock)types/– shared TypeScript types for hull stats and optimizationutils/– helpers (e.g.,loadHullMesh.tsfor Three.js loading)main.tsx,App.tsx,index.css– app entry and layout shell
public/– static assets (if added)vite.config.ts– Vite configpackage.json,package-lock.json– dependencies and lockfilebuild/– production build output (do not edit by hand)
npm install
npm run dev # start Vite dev serverOpen the printed localhost URL to use the app. Upload a hull mesh, explore analysis tabs, or switch to the Optimization workspace.
npm run build # outputs to /buildServe the static build/ directory with any static file server.
- Frontend calls are isolated in
src/services/optimizationService.ts. Swap the mock implementation with real endpoints when your Python backend is ready. - Expose your API URL via an env var (e.g.,
VITE_API_URL=http://localhost:8000) and use it in the service layer.
- Keep
package-lock.jsoncommitted for reproducible installs. - Ignore
node_modules/and build artifacts in git.