BetBuddies is a competitive sports betting app where users compete against friends using fake money to see who’s the best sports bettor. This app simulates real-world sports betting scenarios while keeping it fun and risk-free. The goal is to create an engaging platform where friends can enjoy sports events and friendly competition without financial stakes.
React, Node.js, Firebase
Our app will only have 2 kinds of user, sports bettors and admins to oversee the individual groups that people will compete in. Admins can invite people to groups or kick them out, as well as set all the rules for that group such as start and end time, starting money, etc.
Name | GitHub ID |
---|---|
Daniel Hwang | dhwang154 |
Colin Baylis | colinbaylis |
Jonathan Zhang | jonathanzhang2027 |
Andy Jin | andyjin1 |
Thomas So | Tommygithubaccount123 |
Bryce Wang | brycewangg |
Ryan Vo | ryanvo504 |
-
Install Dependencies
- Git
- Check Installation:
- Run:
git --version
- Run:
- If Git is not installed:
- macOS (using Homebrew):
- Run:
brew install git
- Run:
- Ubuntu/Debian:
- Run:
sudo apt update && sudo apt install git -y
- Run:
- Windows:
- Download and install from: Git Downloads
- macOS (using Homebrew):
- Check Installation:
- Node.js and npm
- Option 1: Install via Package Manager
- Check Installation:
- Run:
node --version
- Run:
npm --version
- Run:
- If Node.js is not installed:
- macOS (using Homebrew):
- Run:
brew install node
- Run:
- Ubuntu/Debian:
- Run:
curl -fsSL https://deb.nodesource.com/setup_lts.x | sudo -E bash -
- Then:
sudo apt install -y nodejs
- Run:
- Windows:
- Download and install from: Node.js Downloads
- macOS (using Homebrew):
- Check Installation:
- Option 2: Install via nvm (Node Version Manager)
- Install nvm:
- macOS/Linux:
- Run:
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.5/install.sh | bash
- Then, restart your terminal or run:
source ~/.nvm/nvm.sh
- Run:
- Windows:
- Download and install nvm-windows from: nvm-windows Releases
- macOS/Linux:
- Install the Latest Node.js Version Using nvm:
- Run:
nvm install node
- Run:
- Use the Installed Node.js Version:
- Run:
nvm use node
- Run:
- Install nvm:
- Option 1: Install via Package Manager
- Git
-
Clone the Repository
- Run:
git clone https://github.com/ucsb-cs148-w25/pj13-sportsbetting.git
- Run:
-
Navigate to Project Directory
- Run:
cd pj13-sportsbetting
- Run:
-
Set Up Environment Variables
- Copy env templates:
cp .env-template backend/.env
cp .env-frontend-template betbuddies/.env
- Fill in the values in the
.env
file - ODDS_API_KEY
- PORT is for the backend server.
- For the frontend .env file, make sure that variable names are prefixed with
REACT_APP_
for exampleREACT_APP_BACKEND_SERVER_PORT=5001
- For the frontend .env file, use these environment variables for Firebase
- To use your own Firebase for local testing, navigate to the Firebase Console and add a new Web app to your project. Then, use the provided config variables for your Firebase setup. Also need to enable Authentication with Google and Email/Password on Firebase Console.
- Copy env templates:
-
Follow README in backend folder to set up Firebase
-
Navigate to the Frontend Directory
- Run:
cd betbuddies
- Run:
-
Install Frontend Dependencies
- Run:
npm install
- Run:
-
Start the Development Server
- Run:
npm start
- Run:
- Follow the instructions provided in the README located in the
backend/config
folder.
- Run backend/scripts/script.js, this file fetches and updates the bets into firebase
This sportsbetting web app provides a user-friendly interface to view, analyze, and place bets on various NBA games. Below is a walkthrough of the main features:
-
Homepage Overview
- Upon launching the app, you'll be greeted with a homepage listing current sports events.
- Each event card displays basic details such as teams, start time, and preliminary odds.
-
User Authentication
- Users can sign up and login to the app.
- Users can also login via Google Auth.
-
Placing a Bet
- Select your desired bet and input the stake amount.
- Once confirmed, your bet is processed and stored in the database.
-
Navigation & Filters
- Use the navigation menu to use the sportsbook, live betting, or the leaderboard.
- Filter options allow you to quickly narrow down what you are looking for.
- User Authentication
- Issue: All pages are accessible to unauthenticated users.
- Steps to Reproduce: Navigate to any page and monitor the odds for 5-10 seconds.
- Potential Location: In our component files, we do not check if the user is authenticated before allowing them to access the page.
- Fork the repository
- Create your feature branch:
- Run:
git checkout -b my-new-feature
- Run:
- Commit your changes:
- Run:
git commit -am 'Add some feature'
- Run:
- Push to your branch:
- Run:
git push origin my-new-feature
- Run:
- Submit a pull request