Spirit11 is an interactive web application that lets users create their fantasy cricket teams, manage players, and track points based on real-time player performance. Users can compete with others, track their team's position on the leaderboard, and get assistance from an AI-powered chatbot to make informed decisions.
Before running the project, ensure that you have the following installed:
- Node.js (v14.x or higher)
- MongoDB (local or cloud setup)
- Git (for cloning the repository)
Follow these steps to get your project up and running:
git clone https://github.com/dimuthuh28/Hacktml_p2
cd Hacktml_p2
Run the following command in both the client and server directories to install required dependencies.
cd backend
npm install
cd frontend
npm install
The project uses MongoDB for the database. You can use either a local MongoDB instance or a cloud-based MongoDB like MongoDB Atlas.
- Create a
.env
file in the root directory of the server and configure the MongoDB connection string:MONGO_URI=mongodb://your_mongo_connection_string_here PORT=5000
Once you have set up the database, run the following commands in their respective directories:
cd backend
npm run dev
cd frontend
npm start
Now, you can access the project by navigating to http://localhost:3000/
in your web browser.
- User Authentication: Users can sign up and log in using email/password. No third-party authentication (e.g., Google or Facebook login) is integrated.
- Player Budget: Users select players for their fantasy teams using a fixed budget.
- Team Size: Each fantasy team has 11 players.
- Player Performance Data: The project uses static player performance data for testing. In a real-world scenario, this would be dynamically fetched from external APIs.
- Leaderboard: Points are calculated based on overall performance, and the leaderboard is updated accordingly.