A React web application that helps users discover and locate sporting facilities in Seattle parks. Search for sports facilities by name and view them on an interactive map with detailed information.
Deployed here
I originally built this app for a Code School project, built using jquery, local storage and deployed on heroku. I've since updated to use a python backend, react front end with a sqlite database.
- 🔍 Search Functionality: Search for sporting facilities by sport type
- 🗺️ Interactive Map: View facility locations on an interactive Leaflet map centered on Seattle
- 📍 Detailed Markers: Click on map markers to see facility names and descriptions
- 📊 Results Counter: See the number of matching facilities in real-time
- ⚡ Error Handling: User-friendly error messages for failed requests
- 🎨 Modern UI: Clean, responsive design with a custom color scheme
- React 18.3.1 - UI library
- React Leaflet 4.2.1 - Map component library
- Leaflet 1.9.4 - Open-source JavaScript library for mobile-friendly interactive maps
- Axios 1.7.7 - HTTP client for API requests
- React Scripts 5.0.1 - Build tooling and development server
Before you begin, ensure you have the following installed:
- Node.js (v14 or higher recommended)
- npm (comes with Node.js) or yarn
-
Clone the repository:
git clone https://github.com/yourusername/fieldfinders-react.git cd fieldfinders-react -
Install dependencies:
npm install
-
Start the development server:
npm start
-
Open http://localhost:3000 in your browser to view the app.
The page will automatically reload if you make changes to the code.
To create a production build:
npm run buildThis builds the app for production to the build folder. The build is optimized and minified for best performance.
- Enter a sport name (e.g., "soccer", "basketball", "tennis") in the search input
- Click the search button or press Enter
- View the results count and see markers appear on the map
- Click on any marker to see facility details in a popup
fieldfinders-react/
├── public/
│ ├── index.html
│ ├── robots.txt
│ └── soccer.ico
├── src/
│ ├── components/
│ │ └── SimpleMap.jsx # Map component with Leaflet integration
│ ├── assets/
│ │ ├── search.svg
│ │ ├── search-white.svg
│ │ └── soccer.svg
│ ├── App.js # Main application component
│ ├── App.css # Application styles
│ └── index.js # Application entry point
├── package.json
└── README.md
npm start- Runs the app in development modenpm test- Launches the test runnernpm run build- Builds the app for productionnpm run eject- Ejects from Create React App (one-way operation)
The application connects to a backend API hosted on PythonAnywhere:
- Base URL:
https://clair3st.pythonanywhere.com/features - Endpoint:
GET /features/{sport_name} - Response: Array of facility objects with properties:
id: Unique identifiername: Facility namefeature_desc: Description of the facilityxpos: Longitude coordinateypos: Latitude coordinate
For the backend repository, see: fieldfinders-api
The application is deployed on Netlify and automatically builds from the main branch.
The project uses ESLint with React app configuration. Code should follow React best practices and maintain consistent formatting.
- App.js: Manages state for search input, features, and error messages. Handles API calls and form submission.
- SimpleMap.jsx: Renders the interactive map with markers for each facility. Uses Leaflet for map rendering and Stadia Maps for tile layers.
See the LICENSE file for details.
- Seattle Parks and Recreation for facility data
- Stadia Maps for map tiles
- OpenStreetMap contributors
- Leaflet and React Leaflet communities