The NBA Fantasy App is a full-stack web application designed for basketball enthusiasts to view team rosters and player statistics. Users can explore NBA teams by conference, view players' details by team, and enjoy a seamless and interactive experience.
- Team Listing: Displays all NBA teams grouped by conference (East and West).
- Player Search: View players from a specific team for the 2024 season.
- Dynamic Routing: Navigate to specific team rosters via dynamically generated routes.
- API Integration: Fetch real-time player data using the NBA API.
- Frontend: EJS, CSS (global and modular styling)
- Backend: Node.js, Express.js
- Data Handling: Axios, File System (fs)
- Environment Configuration: dotenv
-
Clone the repository:
git clone https://github.com/yourusername/nba-fantasy-app.git -
Navigate to the project directory:
cd nba-fantasy-app -
Install dependencies:
npm install -
Create a
.env.localfile and add your API keys:NBA_HOST=your-rapidapi-host NBA_KEY=your-rapidapi-key
-
Start the server:
nodemon index.js -
Open your browser and go to
http://localhost:3000.
- View Teams: Visit the
/teamsroute to see a list of all NBA teams grouped by conference. - View Players: Click on any team to view its roster for the 2024 season.
- Dynamic URLs: Each team has a unique route in the format
/teams/:id/playersto display its players.
This project uses the NBA API to fetch real-time player data. Ensure you have the correct NBA_HOST and NBA_KEY set in your .env.local file.
nodemon index.js: Starts the application.
- Add player statistics for individual games.
- Include team performance analytics.
- Implement user authentication for personalized features (e.g., saving favorite teams/players).
- Add a search bar for finding players by name.
This project is licensed under the MIT License.
Developed by Alex Abraham. Feel free to contribute to the project or reach out for collaboration!