A full-stack web application for monitoring and displaying Baja SAE racing competition results in real-time. The application scrapes data from the official Baja SAE results website and provides a clean, responsive interface for viewing team standings and event results.
- Real-time Data Updates: Automated scraping of racing results every 30 seconds
- Multi-Event Support: Tracks Endurance, Hill Climb, Suspension, Acceleration, and Maneuverability events
- Team-Specific Views: Dedicated dashboard for tracking your team's performance
- Live Leaderboards: Current standings for all monitored events
- Historical Data: Maintains complete race history in SQL Server database
- Responsive Design: Works seamlessly on desktop and mobile devices
- React application with modern hooks-based components
- Responsive design with CSS Grid and Flexbox
- Real-time polling for live updates
- Team-focused dashboard with performance metrics
- Flask REST API server
- Background scheduler for automated data collection
- SQL Server database for persistent storage
- Web scraping with BeautifulSoup4 and requests
- Python 3.8+
- Node.js 14+
- SQL Server database
- Azure App Service (for deployment)
git clone <repository-url>
cd rrap# Install Python dependencies
pip install -r requirements.txt
# Create environment file
cp .env.example .env
# Edit .env and add your DB_CONNECTION_STRING# Install Node.js dependencies
npm install
# Start development server
npm startCreate a .env file in the root directory:
DB_CONNECTION_STRING=Driver={ODBC Driver 17 for SQL Server};Server=your-server;Database=your-database;UID=your-username;PWD=your-password;# Start the backend API server
python backend.py
# In a separate terminal, start the React development server
npm startThe application will be available at:
- Frontend: http://localhost:3000
- Backend API: http://localhost:5001
- Azure subscription
- Azure App Service instance
- SQL Server database (Azure SQL Database recommended)
-
Build the React application:
npm run build
-
Configure environment variables in Azure App Service:
DB_CONNECTION_STRING: Your SQL Server connection stringSCRAPE_INTERVAL_SECONDS: Scraping interval (default: 30)
-
Deploy using Azure CLI or your preferred method:
az webapp up --name your-app-name --resource-group your-resource-group
startup.txt: Contains the gunicorn command for Azure App Servicerequirements.txt: Python dependencies.gitignore: Excludes sensitive files and build artifacts
GET /api/results/{event_type}/latestReturns the latest results for a specific event (endurance, hillclimb, suspension, acceleration, maneuverability).
GET /api/team/{car_number}/latestReturns the latest results across all events for a specific team.
GET /api/update-statusReturns the last update timestamp and recently updated events.
Update the race identifier in save.py:
race_identifier = 'Arizona25' # Update for your specific raceUpdate your team number in src/App.js:
const OUR_TEAM_NUMBER = 88; // Your team's numberConfigure which events to track in save.py:
monitored_event_types = ["Endurance", "hillclimb", "Suspension", "Acceleration", "Maneuverability"]rrap/
βββ src/ # React frontend source
β βββ App.js # Main application component
β βββ App.css # Application styles
β βββ index.js # React entry point
βββ public/ # Static assets
βββ backend.py # Flask API server
βββ save.py # Data scraping and database logic
βββ requirements.txt # Python dependencies
βββ package.json # Node.js dependencies
βββ startup.txt # Azure App Service startup command
βββ README.md # This file
- Add the event to
monitored_event_typesinsave.py - Create parsing function in
save.py - Add database table creation logic
- Update frontend components as needed
Each event type has its own table with the naming convention:
{EventType}{RaceIdentifier} (e.g., EnduranceArizona25)
Build fails with 'react-scripts not found':
npm install
npm run buildDatabase connection errors:
- Verify your connection string in the environment variables
- Ensure SQL Server allows remote connections
- Check firewall settings
Scraping fails:
- Verify the Baja SAE website structure hasn't changed
- Check network connectivity
- Review table ID mappings in
save.py
This project is licensed under the MIT License - see the LICENSE file for details.
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
- Built for Baja SAE racing teams
- Data sourced from the official Baja SAE results website
- Designed for real-time competition monitoring
For support or questions, please open an issue in the repository.
This section has moved here: https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size
This section has moved here: https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app
This section has moved here: https://facebook.github.io/create-react-app/docs/advanced-configuration
This section has moved here: https://facebook.github.io/create-react-app/docs/deployment
This section has moved here: https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify