The Pidwin Fullstack Assessment. Screenshot and video included below.
Additions/changes:
- backend/src/api/user-wager.js / Backend coinflip logic
- backend/src/api/user-data.js / Fetches last 10 wagers to display on frontend
- backend/src/models/wagers.js / Wagers DB model
- frontend/.../Home.js / Frontend code
Improvements that could be made:
- Tried to add coinflip animation but couldn't get it to work properly
- Ideally when the Bonus hits, it would be a more clear/exciting indicator
- Table could be organized better
- Backend coinflip logic could be less fragile
- Animation so that the game is more engaging
CleanShot.2024-03-05.at.17.05.09.mp4
Enter each folder:
- backend
- frontend
and run the following command
npm install
Create a .env file and populate the fields.
Now in the backend folder. Run the start command
npm run start
The backend is now up and running.
The frontend is your standard create-react-app, the default ReadME is provided under frontend/readme.md for reference.