This project is the backend meant to provide stats for the ball Players here at Source Allies!
The tech used in this project is Node, Express, GraphQL, Postgres, Jest, Sequelize, TypeGQL, Firebase Auth.
You will need NodeJS and PostgreSQL.
yarn install # Install needed packages
yarn init:env # Create a template for the .env file
yarn init:db-config # Create a template for the database config file
yarn seq db:create # Create the necessary database for development (ensure postgres is running first)
yarn start:dev # Start the application in dev mode with live-reloadAll types will have the following properties:
- id:
Long - createdAt:
Long(epoch ms) - updatedAt:
Long(epoch ms) - deletedAt:
Long?(epoch ms)
- firstName:
String(255 chars) - lastName:
String(255 chars) - name:
Virtual String(255 chars) - buildingId:
Long→ Building.id - elos:
Elo[]← Elo.userId - favoriteUsers:
User[]← FavoriteUser.favoriteUserId
- userId:
Long→ User.id, - favoritedUserId:
Long→ User.id
- finalRanking:
Int? - value:
Int(1000 deafult) - matchCount:
Int - userId:
Long→ User.id - seasonId:
Long→ Season.id
- startDate:
Long(epoch ms) - endDate:
Long(epoch ms) - number:
Int - elos:
Elo[]← Elo.seasonId - matches:
Match[]← Match.seasonId
- name:
String(255 chars) - address:
String(255 chars) - queueId:
Long→ BuildingQueue.id - users:
User[]← User.buildingId - tables:
Table[]← Table.buildingId
- number:
Int? - description:
String?(255 chars) - inUse:
boolean - isActive:
boolean?(from sensor) - buildingId:
Long→ Building.id - homeColorId:
Long→ Color.id - awayColorId:
Long→ Color.id
- startedAt:
Long?(epoch ms) - finishedAt:
Long?(epoch ms) - homeScore:
Int? - awayScore:
Int? - statusId:
Long→ MatchStatus.id - typeId:
Long→ MatchType.id - seasonId:
Long→ Season.id - tableId:
Long→ Table.id - players:
MatchPlayer[]← MatchPlater.matchId
- isHome:
Boolean - isAway:
Virtual Boolean - userId:
Long→ User.id - matchId:
Long→ Match.id
- display:
'Not Started'|'In Progress'|'Finished'(255 chars) - matches:
Match[]← Match.statusId
- value:
'One v One'|'Doubles'(255 chars) - matches:
Match[]← Match.typeId - queueGroups:
QueueGroup[]← queueGroup.matchTypePrefId
- hex:
Int(hex to int) - name:
String(255 chars) - homeTables:
Table[]← Table.homeColorId - awayTables:
Table[]← Table.awayColorId
- buildingId:
Long→ Building.id - groups:
QueueGroup[]← QueueGroup.queueId
- joinedAt:
Long(epoch ms) - matchTypePrefId:
Long→ MatchType.id - queueId:
Long→ BuildingQueue.id - players:
QueuePlayer[]← QueuePlayer.groupId
- userId:
Long→ User.id - groupId:
Long→ QueueGroup.id