AI-powered Deutsche Bahn travel assistant with real-time data, intelligent routing, and delay predictions.
git clone https://github.com/larsboes/optimized-bahn-msghackathon && cd optimized-bahn-msghackathon
cp src/backend/.env.example src/backend/.env # Add your API keys
docker compose upsrc/
├── backend/ # FastAPI + LangGraph (Python)
│ ├── domain/ # Business entities
│ ├── use_cases/ # Application logic
│ ├── interfaces/ # Abstract repositories
│ ├── infrastructure/ # Concrete implementations
│ ├── service/ # Legacy service layer
│ └── agent/ # AI agent with tools
├── frontend/ # Vue 3 + Vuetify
└── data-loader/ # GTFS/NeTEx ingestion service
| Component | Technology |
|---|---|
| Backend | FastAPI, LangGraph, Pydantic |
| Frontend | Vue 3, Vuetify, Pinia |
| AI/LLM | Google Gemini, LangGraph ReAct |
| Database | SQLite (GTFS data), PostgreSQL (planned) |
| Data | Deutsche Bahn Timetables API, GTFS, NeTEx |
| DevOps | Docker Compose, uv |
This project started as a hackathon MVP and is being modernized for production use.
- Docker Compose setup (backend, frontend, data-loader, PostgreSQL, Redis)
- Data loader service with extensible loader architecture
- Clean Architecture folder structure (domain, use_cases, interfaces, infrastructure)
- Real-time integration with DB Timetables API
- LangGraph AI agent with tool calling
- Vue 3 frontend with chat interface
- GTFS data ingestion pipeline
- Network graph for pathfinding suggestions
- Migrate from SQLite to PostgreSQL + PostGIS
- Redis session management (currently in-memory)
- Full station search in AI agent (currently ~10 hardcoded stations)
- Global error handling and structured logging
- Refactor Docs: Reorganize and expand documentation for clarity
- Backend Refactoring: Clean up legacy code and improve type safety
- Frontend Refactoring: Consolidate components and improve performance
- React + Bun Migration: Migrate from Vue 3 + npm to React + Bun
- Advanced Routing: CSA (Connection Scan Algorithm) or Raptor for multi-hop connections
- Historical Delays: ML predictions using piebro/deutsche-bahn-data
- Platform-aware Transfers: Use NeTEx data for realistic transfer times
- HashiCorp Vault: Enterprise secrets management
- AI Agent Station Limit: Tool can only look up ~10 hardcoded stations (see
src/backend/agent/tools.py) - Routing: No automatic multi-hop routing (A→B→C→D); requires explicit "via" station
- Simulated Data: Wagon loads and some delays are randomized, not from real API
- Session Storage: In-memory only, doesn't persist across restarts
For comprehensive documentation on architecture, setup, usage, and API reference, see docs/README.md.
We welcome contributions! Please see CONTRIBUTING.md for:
- Getting started with development
- Code style and commit conventions
- Testing requirements
- Areas where help is needed
- Bug reporting
See LICENSE file.