The card game speed created using the MERN stack with authentication and multi-user chat functionality.
- MERN
- HTML
- CSS
- Javascript
- MongoDB
- Nodejs
The login system passwords are hashed with salt on the server end.
A functioning main chat room, allowing one user to create a room, and another to join a room.
The gameplay is as follows: Upon a second player joining a game, both players push a button to signal they are ready to start. Only when both players have signaled will the game supply a countdown timer of 5 seconds. After those five seconds, deal cards into appropriate piles and seen by appropriate players. The room's single deck of cards is managed by the server, and the server sends info about each pile to each player. If a player leaves, both players are sent back to the main lobby.
6 Weeks
For this project, we incorporated user authentication including input validation. We wanted to make sure password information stayed private and wasn't sent through the browser as raw data. Including a salt and hashing with sha-256 helped us accomplish this.
Another challenge with this project was multi-user chat interface. We used sockets to send and receive data between all users. Sockets were used to transfer game data to users as well.
For this assignment, I helped by implementing the following functionality-
- All React Routing and Component creation
- User Authentication and modifications to include global username storage using react hooks. Set up form validation and managed the database storage for all users.
- Styling for all components/pages. Using CSS and images provided to me, created a theme/style for the login page, registration page, the lobby, and the game screens. Laid out room creation, adding buttons for joining rooms and exiting.
- Set up the global storage to send all user and game state data to connected users.
