Morpheus is a beginner-friendly paper-trading lab. It pairs a React 19 + Vite client with a Fastify 5 API and WebSocket feed so users can explore watchlists, compare backtests, inspect ranked ideas, and practice simulated trades without placing real orders.
- Client: React 19, Vite 8, Material UI 7, Zustand, TanStack Query
- Server: Fastify 5, WebSocket tick server, TypeScript 5.7.x
- Tooling: Vitest, ESLint, Prettier, Lighthouse CI, custom performance gates
- Node.js 24.14.1 or newer
- npm 10 or newer
From the repository root:
npm ciStart both the API and the client together from the repository root:
npm run devLocal endpoints:
- Client: http://localhost:5173
- API: http://localhost:3000
Run each workspace separately if needed:
npm run dev -w server
npm run dev -w clientBuild both workspaces:
npm run buildRun the built server:
npm run start -w serverPreview the built client:
npm run preview -w clientRun the full test suite:
npm testRun linting:
npm run lintRun strict TypeScript checks:
npm run type-checkRun the full performance gate:
npm run perfUseful targeted perf commands:
npm run perf:api
npm run perf:market
npm run perf:ws
npm run perf:bundle
npm run perf:web
npm run perf:web:report
npm run perf:inp- The server listens on
PORT, defaulting to3000. - The client reads
VITE_API_BASE_URL, defaulting tohttp://localhost:3000. - Market data is sourced through the server. If upstream warm-up fails, the app can fall back to cached or synthetic data paths instead of blocking startup.
morpheus/
|- client/ React app and UI state
|- server/ Fastify API, services, and WebSocket feed
|- scripts/ Performance automation and budget checks
`- docs/ Architecture and system guidance
The living architecture document is in docs/architecture.md.