-
Notifications
You must be signed in to change notification settings - Fork 0
Admin Page Architecture
Admin page gives the admin an overview of all their game simulations and allows them to create/run/modify game simulations. This document walks through how this page is implemented:
- Client-> API: Admin Page Request
- API-> server: request: Get: ~/gameInstancesByAdmin(adminId) \n (Game Instances)
- server-> DB: Select * from GameInstances \n where createdByAdminId = adminId
- DB-> server: gameInstance records for adminId
- server-> API: Return Admin's game instances
- API-> Client: Return Admin Page
Client-> API: Get: ~\getAllGames \nOR Get: ~\getSimulationById
note left of Server: server represents the \ncontrollers and models
API-> Server: requests list of games \n or an existng simulation
Server-> DB: get all games\nOR get a simulation
DB-> Server: Game OR simulation Record
Server-> API: list of Game objects\nOR a simulation object
API-> Client: games JSON\nOR specific simulation JSON
Client-> API: Post: ~/createNewSimulation \n(Hit Add button on new simulation pop-up page)
API-> Server: instantiate new GameSimulation
Server-> DB: Add New Record in GameSimulations
DB-> Server: Success/Failure message
Server-> API: Success/Failure message
API-> Client: Success/Failure message