A modern web application for recording and logging sporting events you attend. Browse events by date, mark them as attended, and maintain a personal log of your sporting experiences.
- Date-based Event Browsing: Navigate through different dates to find sporting events
- Event Logging: Mark events as attended and maintain a personal log
- Persistent Storage: Your attended events are saved locally and persist between sessions
- Responsive Design: Beautiful, modern UI that works on desktop and mobile
- Multiple Sports: Support for various sports including Football, Basketball, Baseball, and more
- API Integration Ready: Built to easily integrate with real sports APIs
- Node.js (version 16 or higher)
- npm or yarn
- Clone the repository:
git clone <repository-url>
cd pass-sport- Install dependencies:
npm install- Start the development server:
npm run dev- Open your browser and navigate to
http://localhost:5173
pass-sport/
├── src/
│ ├── App.jsx # Main application component
│ ├── App.css # Application styles
│ ├── services/
│ │ └── sportsApi.js # Sports API service layer
│ └── main.jsx # Application entry point
├── public/ # Static assets
├── package.json # Dependencies and scripts
└── README.md # This file
The application is designed to work with various sports APIs. Currently, it includes support for:
- ESPN API - Comprehensive sports data
- The Odds API - Sports betting and odds data
- API-Football - Football-specific data
- Mock Data - For demonstration purposes (default)
-
Get API Keys:
- ESPN API - Requires registration
- The Odds API - Free tier available
- API-Football - Free tier available
-
Update the API Service: Edit
src/services/sportsApi.jsand modify thefetchEventsfunction inApp.jsx:
// In App.jsx, change this line:
const eventsData = await fetchEventsByDate(date, 'mock')
// To use a real API:
const eventsData = await fetchEventsByDate(date, 'espn', 'your-api-key-here')-
Environment Variables (Recommended): Create a
.envfile in the root directory:VITE_ESPN_API_KEY=your-espn-api-key VITE_ODDS_API_KEY=your-odds-api-key VITE_FOOTBALL_API_KEY=your-football-api-keyThen update the service to use them:
const apiKey = import.meta.env.VITE_ESPN_API_KEY
- Add the API configuration to
API_CONFIGSinsportsApi.js - Create a fetch function for the new API
- Create a data transformation function
- Add the case to the switch statement in
fetchEventsByDate
The application uses CSS Grid and Flexbox for layout. Main styles are in src/App.css. The design is responsive and uses a modern gradient color scheme.
- Event Categories: Filter events by sport type
- Search Functionality: Search for specific teams or venues
- Export/Import: Export your event log to CSV/JSON
- Statistics: View attendance statistics and trends
- Social Features: Share your attended events
npm run dev- Start development servernpm run build- Build for productionnpm run preview- Preview production buildnpm run lint- Run ESLint
The project uses ESLint for code quality. Follow the existing code style and patterns when adding new features.
- Chrome (latest)
- Firefox (latest)
- Safari (latest)
- Edge (latest)
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- date-fns for date manipulation
- Axios for HTTP requests
- React for the UI framework
- Vite for the build tool
If you encounter any issues or have questions:
- Check the Issues page
- Create a new issue with detailed information
- Include browser version, error messages, and steps to reproduce