A real-time bus tracking system powered by Java Spring Boot and ReactJS, offering precise arrival predictions and delay forecasts through GPS integration and advanced analytics.
- Backend: Java Spring Boot with MongoDB for scalable data management
- Frontend: ReactJS with interactive mapping capabilities
- Analytics: SURE (Seemingly Unrelated Regression Equation) model for predictions
- Purpose: Academic project for COMP 8157: Advanced Database Topics (University of Windsor)
- Supervisor: Dr. Abdulrauf Gidado
- 🚌 Real-time bus location tracking
- ⏱️ Accurate arrival time predictions
- 🗺️ Interactive route visualization
- 📊 Transit authority analytics dashboard
- 🌦️ Weather and traffic-aware predictions
- Java Spring Boot
- MongoDB
- Real-time GPS data processing
- SURE predictive model
- ReactJS
- Interactive mapping
- Real-time updates
- Responsive design
graph TB
GPS[GPS Data Sources] --> BE[Backend Services]
Weather[Weather API] --> BE
Traffic[Traffic API] --> BE
BE --> DB[(MongoDB)]
BE --> Cache[Redis Cache]
BE --> FE[Frontend App]
User[User] --> FE
Admin[Admin] --> FE
- GPS Integration: Real-time location data from bus GPS devices
- External APIs: Weather and traffic data integration
- Processing Layer: SURE model for predictions
- Caching Layer: Redis for high-performance data access
- Storage Layer: MongoDB for persistent data storage
- Client Layer: ReactJS frontend with real-time updates
-
Data Collectors
- GPS data ingestion
- Weather API integration
- Traffic API integration
-
Core Services
- Prediction Engine
- Route Optimization
- Real-time Updates
-
Data Storage
- MongoDB for historical data
- Redis for real-time caching
- Event streaming for updates
-
Client Applications
- Web interface
- Admin dashboard
- API endpoints
- Docker
- Java JDK 21+ (for local development)
- Node.js 14+ (for local development)
# Start all services
docker-compose up -d
# Check logs
docker-compose logs -f
# Stop all services
docker-compose downBackend:
cd backend
mvn spring-boot:runFrontend:
cd frontend
npm install
npm run dev- Frontend: http://localhost:5173
- Backend API: http://localhost:8080
Our REST API is documented using OpenAPI/Swagger specifications:
- Development: http://localhost:8080/swagger-ui.html
- Production: https://api.busradar.com/swagger-ui.html
Key endpoints:
/api/v1/buses- Real-time bus locations/api/v1/predictions- Arrival predictions/api/v1/routes- Route information
# Run backend tests
cd backend
mvn test
# Run frontend tests
cd frontend
npm testCode coverage reports are available in:
- Backend:
backend/target/site/jacoco/index.html - Frontend:
frontend/coverage/lcov-report/index.html
Common issues and solutions:
-
Database Connection Issues
docker-compose restart mongodb
-
Redis Cache Problems
docker-compose restart redis
-
Frontend Hot Reload Not Working
npm run clean:cache npm run dev
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
Please read CONTRIBUTING.md for details on our code of conduct and development process.
This project is licensed under the MIT License - see the LICENSE file for details.
- Dr. Abdulrauf Gidado for project supervision
- University of Windsor for academic support
- OpenStreetMap for mapping data
- Weather API providers for real-time weather data