How shijake/ece1724_project works
This repository is a stock-watch project with an Express REST backend and a React frontend. The backend exposes authenticated per-user watch management, price-history JSON/CSV responses, and generated API documentation. Its visible watch workflow validates requests, accesses PostgreSQL through Prisma, and serializes watch results. The checked-in React app is still the Vite starter counter, not a stock-watch client. No sampled source shows price polling, alert delivery, or frontend-to-API calls, so those links and capabilities are not inferred.
Main entry points: app.ts Express app · routes.ts Watch routes · openapi.ts API documentation · db.ts Prisma client
Components 11
API runtime
- Express app
express/src/app.ts - User guard
express/src/auth.ts - Error handling
express/src/errors.ts - API documentation
express/src/openapi.ts
Watch domain
- Watch routes
express/src/watches/routes.ts - Watch validation
express/src/watches/schemas.ts - Watch response
express/src/watches/serialize.ts
Persistence
- Prisma client
express/src/db.ts - PostgreSQL
express/prisma/schema.prisma
Other components
- API caller
- Starter frontend
react/my-app/src/App.tsx
Connections 11
- API caller → Express app: sends requests
express/src/app.ts - Express app → User guard: guards watches
express/src/app.ts - Express app → Watch routes: mounts routes
express/src/app.ts - Express app → API documentation: builds docs
express/src/app.ts - Express app → Error handling: handles failures
express/src/app.ts - Watch routes → Watch validation: validates input
express/src/watches/routes.ts - Watch routes → Prisma client: queries data
express/src/watches/routes.ts - Watch routes → Watch response: formats watches
express/src/watches/routes.ts - Watch routes → Error handling: throws errors
express/src/watches/routes.ts - API documentation → Watch validation: reuses schemas
express/src/openapi.ts - Prisma client → PostgreSQL: persists records