This project contains the WeatherTrack Pro application in two versions:
- old-code: Original version with performance issues
- new-code: Optimized version with fixes and improvements
WeatherTrack Pro is a weather analysis application that provides comprehensive historical data for various geographic locations. Following the expansion of the data repository, significant performance issues appeared, including:
- Slowdown in data retrieval
- Inefficient analysis tools
- Negative impact on user experience
- Identify and resolve performance issues
- Optimize data retrieval and processing
- Improve overall user experience
- API.md - Complete API endpoints documentation
- OPTIMIZATIONS.md - Detailed list of optimizations performed
- Docker and Docker Compose
- Node.js 20.10.0
- npm
- PowerShell (Windows)
.\launch.ps1.\launch.ps1 old.\launch.ps1 new.\launch.ps1 stop # Stop all services
.\launch.ps1 restart # Restart all services
.\launch.ps1 logs # Display logs
.\launch.ps1 clean # Stop and remove volumes
.\launch.ps1 help # Display help.\benchmark.ps1This script compares the performance of both versions with different amounts of data in the database.
Benchmark features:
- Interactive choice of data sizes to test
- Progress bar for data generation
- Confirmation between each test
- Test of all endpoints (GET data, avg, max, min)
- Generation of a professional HTML report
- Automatic opening of the report in the browser
- old-code API: http://localhost:3000
- new-code API: http://localhost:3001
- old-code DB: localhost:5432
- new-code DB: localhost:5433
HTTP test files are available in the /http folder to quickly test the API endpoints.
.\launch.ps1 stopTo also remove data volumes:
.\launch.ps1 clean