This is a simple React application that allows users to log in with Google OAuth and view sports data from a designated API. It includes components for authentication, user sessions, and fetching sports data based on user interactions.
- Google OAuth Login: Users can log in with their Google accounts using OAuth.
- Authentication: The application securely manages user sessions and authentication tokens.
- Sports Data Display: Users can view sports data fetched from an API, organized by different sports categories.
Before you begin, ensure you have met the following requirements:
- Node.js installed on your local machine
- A Google Developer account with OAuth credentials set up
- Access to the designated sports API with the necessary API key
-
Clone the repository to your local machine:
git clone https://github.com/NexusSportHub/front
-
Navigate to the project directory
-
Install dependencies:
npm install
- Set up your environment variables:
- Create a
.env
file in the root directory. - Define the following variables:
VITE_API_KEY
: Your API key for accessing the sports data API.VITE_API_HOST
: The host URL of the sports data API.VITE_SPORT
: Comma-separated list of sports categories available in the API.VITE_WEBCLIENT_PORT
: Port number of your web client.VITE_CLIENT_ID
: Your Google OAuth client ID.
- Create a
- Start the development server:
npm run dev
- Open your browser and navigate to
http://localhost:5173
.
Contributions are welcome! Feel free to fork the repository and submit pull requests for any enhancements or bug fixes.
This project is licensed under the MIT License.