How eccureuil/api-formations-odc works
This is a small Express API for browsing a catalog of training formations. A client sends a request to the server, which mounts the formations routes; handlers return either the full catalog or one formation by ID as JSON. The catalog is a static in-memory array, not a persistent store. The model defines its TypeScript shape. No README was provided, so the map reflects the sampled source files only.
Main entry points: formationsController.ts Formation handlers · server.ts HTTP server · app.ts Express app · formations.ts Formation routes
Components 7
HTTP runtime
- HTTP server
src/server.ts - Express app
src/app.ts - Formation routes
src/routes/formations.ts
Formation catalog
- Formation handlers
src/controllers/formationsController.ts - Formation data
src/data/formations.ts - Formation type
src/models/Formation.ts
Other components
- API client
Connections 7
- API client → HTTP server: HTTP request
- HTTP server → Express app: serves app
- Express app → Formation routes: mounts routes
- Formation routes → Formation handlers: dispatches
- Formation handlers → Formation data: reads catalog
- Formation data → Formation type: typed as
- Formation handlers → API client: JSON response