# Server Configuration HOST=0.0.0.0 PORT=3000 # Database Configuration DATABASE_URL=postgres://easyroute_user:easyroute_pass@localhost:5432/easyroute TEST_DATABASE_URL=postgres://easyroute_user:easyroute_pass@localhost:5432/easyroute_test # Redis Configuration REDIS_URL=redis://localhost:6379 # External APIs MAPBOX_API_KEY=your_mapbox_api_key_here # Mapbox Proxy (src/bin/proxy.rs) # PROXY_API_KEYS=client-key-1,client-key-2 # comma-separated client keys # PROXY_RATE_LIMIT=20 # requests/min per key (default: 20) # PROXY_PORT=4000 # proxy listen port (default: 4000) # On-device client: uncomment to route Mapbox calls through the proxy # MAPBOX_BASE_URL=http://localhost:4000/v1/directions # MAPBOX_API_KEY=client-key-1 # use a client key, not the real Mapbox key # Logging RUST_LOG=info,easyroute=debug # Cache TTL (seconds) ROUTE_CACHE_TTL=86400 # 24 hours POI_REGION_CACHE_TTL=604800 # 7 days # Route Generation SNAP_RADIUS_M=100.0 # Distance in meters to snap POIs to route path # Route Generation Algorithm Parameters # These parameters control how the route generator selects POIs and creates loops. # Adjust these to fine-tune route quality and success rate. # POI Search Radius (multiplier of target distance) # For a 5km route with multiplier 1.0, searches within 5km radius # Higher values find more distant POIs for longer routes ROUTE_POI_SEARCH_RADIUS_MULTIPLIER=1.0 # Waypoint Distance (multiplier of target distance) # For loop geometry, POIs should be ~60% of target distance from start # Higher values create larger loops with more distance ROUTE_WAYPOINT_DISTANCE_MULTIPLIER=0.6 # Maximum POI Distance (multiplier of target distance) # POIs beyond this distance from start are filtered out # 0.85 allows POIs up to 85% of target distance (e.g., 4.25km for 5km route) ROUTE_MAX_POI_DISTANCE_MULTIPLIER=0.85 # Minimum POI Distance (km) # POIs must be at least this far from the start point # Prevents selecting POIs too close to origin ROUTE_MIN_POI_DISTANCE_KM=0.3 # Tolerance Levels (as fractions, e.g., 0.3 = ±30%) # Relaxed tolerance applied on first retry ROUTE_TOLERANCE_LEVEL_RELAXED=0.3 # Very relaxed tolerance applied on subsequent retries ROUTE_TOLERANCE_LEVEL_VERY_RELAXED=0.5 # Default Distance Tolerance (as percentage, e.g., 0.2 = ±20%) # Applied to user's requested distance if not specified ROUTE_DEFAULT_DISTANCE_TOLERANCE_PCT=0.2 # Maximum Retries # Number of times to retry route generation with relaxed constraints ROUTE_MAX_GENERATION_RETRIES=5 # Waypoint Counts # Number of waypoints to use for short routes (<4km) ROUTE_WAYPOINTS_COUNT_SHORT=2 # Number of waypoints to use for long routes (>=4km or many POIs) # More waypoints create more complex loops with longer distances ROUTE_WAYPOINTS_COUNT_LONG=4 # Route Classification Thresholds # Distance (km) above which routes are considered "long" # Routes >=4km use more waypoints for better distance accuracy ROUTE_LONG_ROUTE_THRESHOLD_KM=4.0 # POI count threshold for using more waypoints # If 3+ POIs available, use long route configuration ROUTE_POI_COUNT_THRESHOLD_LONG=3