Skip to content
Open
163 changes: 163 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,4 +100,167 @@ http://127.0.0.1:8000/swagger/

You’ll see an interactive **Swagger UI** listing all available API endpoints (e.g., `/api/fleet/vehicles/`).

```
Logistics
├─ .pytest_cache
│ ├─ CACHEDIR.TAG
│ ├─ README.md
│ └─ v
│ └─ cache
│ ├─ lastfailed
│ ├─ nodeids
│ └─ stepwise
├─ assignment
│ ├─ admin.py
│ ├─ apps.py
│ ├─ migrations
│ │ ├─ 0001_initial.py
│ │ └─ __init__.py
│ ├─ models.py
│ ├─ serializers.py
│ ├─ tests.py
│ ├─ urls.py
│ ├─ views.py
│ └─ __init__.py
├─ docker-compose.yml
├─ fleet
│ ├─ admin.py
│ ├─ apps.py
│ ├─ migrations
│ │ ├─ 0001_initial.py
│ │ ├─ 0002_vehicle_created_at_vehicle_current_latitude_and_more.py
│ │ ├─ 0003_remove_fuelrecord_vehicle_and_more.py
│ │ └─ __init__.py
│ ├─ models
│ │ ├─ core.py
│ │ ├─ extended_models.py
│ │ └─ __init__.py
│ ├─ serializers
│ │ ├─ fuel.py
│ │ ├─ maintenance.py
│ │ ├─ trip.py
│ │ ├─ vehicle.py
│ │ └─ __init__.py
│ ├─ tests
│ │ ├─ test_fuel.py
│ │ ├─ test_fuel_api.py
│ │ ├─ test_maintenance.py
│ │ ├─ test_maintenance_api.py
│ │ ├─ test_trip.py
│ │ ├─ test_trip_api.py
│ │ ├─ test_vehicle.py
│ │ ├─ test_vehicle_api.py
│ │ └─ __init__.py
│ ├─ urls.py
│ ├─ views
│ │ ├─ fuel.py
│ │ ├─ maintenance.py
│ │ ├─ trip.py
│ │ ├─ vehicle.py
│ │ └─ __init__.py
│ └─ __init__.py
├─ LICENSE
├─ logistics_core
│ ├─ asgi.py
│ ├─ settings.py
│ ├─ urls.py
│ ├─ wsgi.py
│ └─ __init__.py
├─ manage.py
├─ monitoring
│ ├─ admin.py
│ ├─ apps.py
│ ├─ migrations
│ │ └─ __init__.py
│ ├─ models.py
│ ├─ tests.py
│ ├─ views.py
│ └─ __init__.py
├─ order_simulator.py
├─ README.md
├─ requirements.txt
├─ route_optimizer
│ ├─ admin.py
│ ├─ api
│ │ ├─ serializers.py
│ │ ├─ urls.py
│ │ ├─ views.py
│ │ └─ __init__.py
│ ├─ apps.py
│ ├─ core
│ │ ├─ constants.py
│ │ ├─ dijkstra.py
│ │ ├─ distance_matrix.py
│ │ ├─ ortools_optimizer.py
│ │ ├─ types_1.py
│ │ └─ __init__.py
│ ├─ migrations
│ │ ├─ 0001_initial.py
│ │ └─ __init__.py
│ ├─ models.py
│ ├─ README.md
│ ├─ services
│ │ ├─ depot_service.py
│ │ ├─ external_data_service.py
│ │ ├─ optimization_service.py
│ │ ├─ path_annotation_service.py
│ │ ├─ rerouting_service.py
│ │ ├─ route_stats_service.py
│ │ ├─ traffic_service.py
│ │ └─ __init__.py
│ ├─ settings.py
│ ├─ tests
│ │ ├─ api
│ │ │ ├─ test_serializers.py
│ │ │ └─ test_views.py
│ │ ├─ conftest.py
│ │ ├─ core
│ │ │ ├─ test_dijkstra.py
│ │ │ ├─ test_distance_matrix.py
│ │ │ ├─ test_ortools_optimizer.py
│ │ │ ├─ test_types.py
│ │ │ └─ __init__.py
│ │ ├─ services
│ │ │ ├─ test_depot_service.py
│ │ │ ├─ test_external_data_service.py
│ │ │ ├─ test_optimization_service.py
│ │ │ ├─ test_path_annotation_service.py
│ │ │ ├─ test_rerouting_service.py
│ │ │ ├─ test_route_stats_service.py
│ │ │ ├─ test_traffic_service.py
│ │ │ └─ __init__.py
│ │ ├─ test_models.py
│ │ ├─ test_settings.py
│ │ ├─ utils
│ │ │ ├─ test_env_loader.py
│ │ │ └─ test_helpers.py
│ │ └─ __init__.py
│ ├─ utils
│ │ ├─ env_loader.py
│ │ ├─ helpers.py
│ │ └─ __init__.py
│ ├─ views.py
│ └─ __init__.py
└─ shipments
├─ admin.py
├─ apps.py
├─ consumers
│ └─ order_events.py
├─ management
│ └─ commands
│ └─ consume_orders.py
├─ migrations
│ ├─ 0001_initial.py
│ └─ __init__.py
├─ models.py
├─ serializers.py
├─ tests
│ ├─ test_api.py
│ ├─ test_consumer.py
│ ├─ test_integration_kafka.py
│ └─ __init__.py
├─ urls.py
├─ views.py
└─ __init__.py

```
34 changes: 34 additions & 0 deletions env_var.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Django Core Settings
DJANGO_SECRET_KEY=your_super_secret_and_unique_django_key_here # CHANGE THIS!
DJANGO_DEBUG=True # Set to False for production
DJANGO_ALLOWED_HOSTS=localhost,127.0.0.1,yourdomain.com # Comma-separated, no spaces around commas

# Database (Example for PostgreSQL, adjust if using something else or SQLite for dev)
# DB_ENGINE=django.db.backends.postgresql
# DB_NAME=your_db_name
# DB_USER=your_db_user
# DB_PASSWORD=your_db_password
# DB_HOST=localhost
# DB_PORT=5432

# Kafka
KAFKA_BROKER_URL=localhost:9092

# Google Maps API
GOOGLE_MAPS_API_KEY=AIzaSyCudTstN1mk8sT6BVbjH_yK1sE8r8-p6Es
GOOGLE_MAPS_API_URL=https://maps.googleapis.com/maps/api/distancematrix/json
USE_API_BY_DEFAULT=False # Or True, depending on your default preference

# API Request Settings
MAX_RETRIES=3
BACKOFF_FACTOR=2.0
RETRY_DELAY_SECONDS=1.0
CACHE_EXPIRY_DAYS=30

# Cache Settings
DJANGO_CACHE_BACKEND=django.core.cache.backends.locmem.LocMemCache # e.g., django.core.cache.backends.redis.RedisCache
DJANGO_CACHE_LOCATION=unique-snowflake # e.g., redis://localhost:6379/1 for Redis
OPTIMIZATION_RESULT_CACHE_TIMEOUT=3600

# Other App specific variables
ENABLE_FLEET_EXTENDED_MODELS=False
1 change: 1 addition & 0 deletions fleet/serializers/vehicle.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ class VehicleSerializer(serializers.ModelSerializer):
is_available = serializers.BooleanField(read_only=True)

class Meta:
ref_name = 'FleetVehicle'
model = Vehicle
fields = [
'id', 'vehicle_id', 'name', 'capacity', 'status', 'fuel_type',
Expand Down
Loading