Light-Spar is a web application built with React that allows users to filter and view profiles of fighters based on their location and weight class.
- View a list of fighter profiles
- Filter profiles by location and weight class
- Autocomplete location input with Google Places API
- Reset filters to show all profiles
Ensure you have the following installed on your system:
- Node.js
- npm or yarn
- PostgreSQL
-
Clone the repository:
git clone https://github.com/yourusername/Light-Spar.git
-
Navigate to the project directory:
cd Light-Spar
-
Install the dependencies:
With npm:
npm install
- Navigate to the server directory:
cd server
- Create a PostgreSQL database for the application.
Copy the .env.example
file to a new file named .env
and fill in your database details.
- Run the database migrations:
With npm:
npm run knex migrate:latest
- Seed the database:
With npm:
npm run knex seed:run
- Navigate back to the root directory:
cd ..
- Start the application:
With npm:
npm start
- Navigate to the Users List page to view all profiles.
- Enter a location in the location input field. As you type, you'll see a dropdown of locations from the Google Places API. Select a location from the dropdown to filter profiles by this location.
- Enter a weight class in the weight class input field to filter profiles by this weight class.
- Click the "Reset" button to clear the filters and show all profiles.
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.