When an admin navigates to the route - /admin, they should be able to view analytics about members including:
- Member attendance
- Trades and orders from all members
- Total amount of members
- Role of each member
Accepted Criteria:
- Visiting /admin shows - member count, total trade count, other metrics if time permits
- "Manage Members" button navigates to /admin/members which displays a table with columns - Name, Role, Email, Total Trades, and "View Activity" button
- Clicking the "View Activity Button" navigates to /admin/members/[accountId], which displays the member profile displayed in the row in the table along with total balance, active cash, all trades, and all orders
- API loads asynchronously and handles errors gracefully with proper status codes (404 network error)
- Robust end-to-end tests must be done to make sure that data consistency is held throughout the matching engine, broadcasting service, and the database. Run a simulation of set orders, and check to see if the account activity queries match the activity
Technical Details:
The first step to completing this will be to complete the necessary API routes such as:
- GET - /api/accounts/[accountId]/trades
- GET - /api/accounts/[accountId]/positions
- GET - /api/accounts/
- GET - /api/accounts/[accountId]
- GET - /api/trades
- GET - /api/orders
Once the API routes are defined, there needs to be a way to access the SQLite database from both the matching websocket server and the FastAPI server without the database locking. One idea is to run both servers as asynchronous processes in the same file, but still figuring that out.
Once these backend details are figured out, this will provide good context to feed Cursor, which can handle implementing the React UI for fetching this data.
When an admin navigates to the route - /admin, they should be able to view analytics about members including:
Accepted Criteria:
Technical Details:
The first step to completing this will be to complete the necessary API routes such as:
Once the API routes are defined, there needs to be a way to access the SQLite database from both the matching websocket server and the FastAPI server without the database locking. One idea is to run both servers as asynchronous processes in the same file, but still figuring that out.
Once these backend details are figured out, this will provide good context to feed Cursor, which can handle implementing the React UI for fetching this data.