p-society / gc-server

Stay updated in real-time and engage with the thrill of the game like never before.[WIP]
Apache License 2.0
3 stars 6 forks source link

[FEAT] : Core feature API for PSA, Admin and Players. #33

Open majorbruteforce opened 5 months ago

majorbruteforce commented 5 months ago

APIs to be implemented:

Player:

PSA Upgrades player to admin:

Have separate collections for Admin/Player and PSA PSA can have same mail which was used to register as player.

After a successful upgrade:

  1. Send mail to Admin to notify the upgrade and the reason
  2. Send app notification to user about the same

Admin is responsible for moderating a match and all required API endpoints for that will be described in a separate thread.

PSA creates a Match and assigns an Admin to it:

The PSA creates a match with the following details:

  1. Squads/Teams/Branches Facing off
  2. Admin moderating it
  3. Venue
  4. Type
  5. Sport
  6. Time and Date
  7. Stage of match

PSA creates squads for the tournament:

A squad is an independent participant of the tournament (e.g. CSE-2 , IT-1 etc) and is a super set of teams that will play matches.
PSA will select a set of players from all verified players who have registered to the platform for a squad.

Include details:

  1. Squad name (Branch name + /1/2)
  2. Squad members
  3. Other required details

Entity Relationships:

Event, Team, Player, Match, Stats and Squad are separate entities.

Creating Teams

After PSA assigns a match to an Admin, the admin is responsible to create the team that plays in that match. Match is a collection that has admin id, squad 1 and 2 id, team 1 and 2 id.

Admin can create teams from 'squad-player' collection

Events

A match generates events Events has team players + event data + sport + user id+ match id + tbd A single player will have a single stat collection, stat document for the user will be updated after each event Events will be trailed to the client in real-time + stored in db + tbd Events will be the core

To be further discussed: Events implementation, Statistics Calculation, Substitutions.

zakhaev26 commented 5 months ago

@majorbruteforce please update the above flow as discussed so that we can start working on the first ERD draft and proceed accordingly Also,if possible,start making Trello tickets in the board

majorbruteforce commented 5 months ago

There are still things to be described further. @zakhaev26 change the endpoints as required and delete the ones that feel redundant.

zakhaev26 commented 5 months ago

cool, will be updating it in a couple of days along with ERD draft

zakhaev26 commented 5 months ago

Brief Flow

CC: @majorbruteforce @punitkr03

majorbruteforce commented 5 months ago

@zakhaev26 How are we planning to create the trello tickets?

zakhaev26 commented 5 months ago

@zakhaev26 How are we planning to create the trello tickets?

lets plan it out some other day.we don't have much of a participation yet,so we have time. trello isn't required for managing 2-3 contributors

majorbruteforce commented 5 months ago

trello isn't required for managing 2-3 contributors

Good point

zakhaev26 commented 4 months ago

Created prototype sample models, do check and tell if somethings missing Link : Model README.md CC: @majorbruteforce @soumil-kumar17 @punitkr03