/stonks

STONKS

Primary LanguageTypeScript

Stonks Backend Server

Adding to GraphQL

  1. Add the schema changes to src/graphql/schema/*-schema.ts files
  2. Ensure the server is running
  3. Run npm run generate
  4. Import QueryResolvers from src/types/graphql-types.ts, reference the correct resolver with bracket notation, e.g. QueryResolvers['me']
  5. Attach to src/graphql/resolvers/root-resolver.ts

Bugs

  • "undefined" as a key in the users
  • layout not scrolling on home page (ionic-related)

TODOs

Bugs

  • Figure out why subscribing to games that have ended
  • timer skipping numbers
  • fix the MovingNumber component
  • fix domain bug in stonk line graph
  • fix leaderboard sort order
  • force code to be uppercase
  • Try to reproduce MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 buy listeners added to [Socket]. Use emitter.setMaxListeners() to increase limit

Features

  • graphic of green "+1" floats away every time you click buy, same with red "-1" for sell
  • Limit user to just one game at a time
  • Show other games the user is in
  • better error handling/redirect when oauth fails
  • fake company summaries for each stonk before the game has started
  • error display
  • don't allow the same color to be selected as another user
  • color change of flipping numbers
  • ended game view
    • entire-game view
    • current round view
  • animation for loading screen
  • limit nickname length
  • show which user is the owner on game page
  • a way to return to home screen from join
  • limit chat messages
  • countdown to start
  • user avatar
  • graph of player's equity
  • outside price movement
  • graphs of stonks
  • make the buy and sell buttons disabled during after-hours trading
  • JoinGame page
    • text area for nickname, text area for code
    • submit button
    • fetch call for joining a game
    • on success, go to Game page.
  • Game page
    • new fetch call for retrieving game information
    • show users, info about game
    • open socket connection
  • Handle socket.io connections on server
    • create a socket store
  • Don't require login to join
  • redis-based session storage

Tasks

  • Terms of Service
  • [ ]