Modern batch routing application built with Angular and Node.js, powered by OSRM for high-performance route calculations.
- Smart File Processing: Upload CSV/TSV files with automatic coordinate field detection
- Multi-Projection Support: 80+ coordinate systems supported (Lambert93, WGS84, UTM, etc.)
- Batch Route Calculation: Process thousands of routes efficiently using OSRM
- Real-time Progress: WebSocket-based live progress tracking
- GeoJSON Export: Download results with enriched route properties
- Production Ready: Automatic cleanup, logging, and error handling
- Frontend: Angular 20 + Angular Material
- Backend: Node.js + TypeScript + Express
- Routing Engine: OSRM (Open Source Routing Machine)
- Deployment: Docker Compose
- Clone the repository
git clone https://github.com/your-repo/osrm-batch-routing.git
cd osrm-batch-routing
- Configure environment
cp .env.example .env
# Edit .env file with your settings
- Start the application
docker-compose up -d
- Access the application
- Web interface: http://localhost:8888
- API: http://localhost:8888/api
# Install dependencies
npm run install:all
# Start development servers
npm run dev
# Frontend: http://localhost:4200
# Backend: http://localhost:3001
Key configuration options:
NODE_ENV
: Environment (production/development)PORT
: Application port (default: 80)OSRM_URL
: OSRM service URL (default: http://osrm:5000)MAX_FILE_SIZE
: Max upload size (default: 50MB)MAX_FILES_KEPT
: Files to keep (default: 50)FILE_CLEANUP_INTERVAL
: Cleanup interval in hours (default: 24)
version: '3.8'
services:
app:
build: .
ports:
- "8888:80"
environment:
- NODE_ENV=production
- OSRM_URL=http://osrm:5000
volumes:
- ./uploads:/app/uploads
- ./logs:/app/logs
- ./osrm-data:/app/osrm-data
depends_on:
- osrm
osrm:
image: osrm/osrm-backend
command: osrm-routed --algorithm mld /data/your-data.osrm
volumes:
- ./osrm-data:/data
ports:
- "5000:5000"
The application automatically handles OSRM data setup:
- Automatic Download: France OSM data is downloaded automatically on first startup if not present
- Automatic Processing: The container processes
.osm.pbf
files into OSRM routing data - Persistent Storage: Processed data is stored in the
osrm-data
volume
For custom geographic regions, place your .osm.pbf
file in the osrm-data
directory before starting:
# For custom region (optional)
mkdir -p osrm-data
wget https://download.geofabrik.de/europe/your-region.osm.pbf -O osrm-data/france-latest.osm.pbf
# Start the application - processing happens automatically
docker-compose up -d
# View application logs
docker-compose logs -f app
# Check container health
docker stats
# Access application metrics
curl http://localhost:8888/api/health
- Input validation for CSV/TSV files
- Configurable file size limits
- Automatic cleanup of temporary data
- Rate limiting and CORS protection
- Docker container isolation
MIT License - see LICENSE file for details.