How arthurg-tech/homebroker works
Home Broker is a small order-entry application: users enter asset, side, quantity and price in the React form, which validates and submits a new order to the ASP.NET API. The API validates the request, applies the full order value subject to a per-asset exposure limit, and returns the current exposure or an error for display. Exposure is held in process memory, not a persistent order store. The map follows the shown calls and documented HTTP contract; optional OpenAPI and development CORS are included, while unsampled implementation details are not inferred.
Main entry points: OrderEndpoints.cs Order endpoint · orderApi.ts API client · ExposureService.cs Exposure service · App.tsx Order form
Components 12
Order entry UI
- Order form
frontend/OrderGenerator/src/App.tsx - Form validation
frontend/OrderGenerator/src/orderValidation.ts - API client
frontend/OrderGenerator/src/orderApi.ts
Order processing
- Order endpoint
backend/OrderAccumulator/Endpoints/OrderEndpoints.cs - Request validation
backend/OrderAccumulator/Validation/OrderRequestValidator.cs - Exposure service
backend/OrderAccumulator/Services/ExposureService.cs - In-memory exposure
backend/OrderAccumulator/Services/ExposureService.cs - API host
backend/OrderAccumulator/Program.cs
Order contracts
- Order request
backend/OrderAccumulator/Contracts/OrderRequest.cs - Order response
backend/OrderAccumulator/Contracts/OrderResponse.cs
Other components
- Trader
- Browser
Connections 16
- Trader → Order form: enters order
frontend/OrderGenerator/src/App.tsx - Order form → Form validation: validates form
frontend/OrderGenerator/src/App.tsx - Order form → API client: submits order
frontend/OrderGenerator/src/App.tsx - API client → Order endpoint: POST order
frontend/OrderGenerator/src/orderApi.ts - API client → Order request: serializes
frontend/OrderGenerator/src/orderApi.ts - API client → Order response: checks response
frontend/OrderGenerator/src/orderApi.ts - API host → Order endpoint: maps endpoint
backend/OrderAccumulator/Program.cs - Order endpoint → Request validation: classifies errors
backend/OrderAccumulator/Endpoints/OrderEndpoints.cs - Order endpoint → Exposure service: processes order
backend/OrderAccumulator/Endpoints/OrderEndpoints.cs - Exposure service → Request validation: validates request
backend/OrderAccumulator/Services/ExposureService.cs - Exposure service → In-memory exposure: updates exposure
backend/OrderAccumulator/Services/ExposureService.cs - Exposure service → Order response: creates result
backend/OrderAccumulator/Services/ExposureService.cs - Order endpoint → Order request: deserializes
backend/OrderAccumulator/Endpoints/OrderEndpoints.cs - Order endpoint → Order response: returns JSON
backend/OrderAccumulator/Endpoints/OrderEndpoints.cs - Order endpoint → Browser: allows dev CORS
- Browser → Order form: renders UI