Brobet is a app for bet with your friends with virtuals but secured tokens.
Enter your Firebase credentials :
- Firebase Web
constants/credentials/client.js
- Firebase Admin SDK
constants/credentials/server.js
Brobet is build with Yarn. (But you can use npm)
- Linting ->
yarn run test
- Fix Linting ->
yarn run fix
- Run dev server ->
yarn run dev
- Build the app ->
yarn run build
- Run the builded app ->
yarn run start
- Prepare the build for hosting ->
yarn run export
- Build the app for production and host it with Now. ->
yarn run deploy
- Next.js (React + Next router system)
- React JS
- Styled Component
- yup (object validation for form & server payload)
- Firebase (Auth & Firestore)
- Firebase Web (client)
- Firebase Admin SDK (server)
This project use the Standard JS syntax.
- Auth
- Login & logout
- Signup
- Tokens (virtual money)
- Transaction system
- Logging all transactions in history
- Can't create tokens, only transfers from main (bank) or users wallets
- Can't create a transactions if the money is not available
- The transactions are run with firebase transaction mode wich allow us to don't make set if the data has changed
- Transaction system
- Wallets
- When registering a new user theses taks are done :
- Creating the user in firebase auth
- Creating the user in firebase store with auth UID
- Creating a transaction with status "initialDeposit" for giving the starter tokens for the user
- When registering a new user theses taks are done :
The tokens transactions are only managed on the server side and can be done by a authentified users (auth token is validated on server side).
For now only the admins can make transactions request to the server. (Admins lists are stored on the firestore)
The users can only read their wallets amount. The users can read & edit their profile informations.