DatabΓΊs
Core backend server implementing GTFS Schedule and GTFS Realtime specifications for comprehensive transit data management. Provides RESTful API endpoints for static schedule data (routes, stops, trips) and real-time vehicle information (positions, alerts, service updates) with PostgreSQL/PostGIS storage and real-time data validation.
β¨ Features
- π GTFS Schedule & Realtime Support - Full implementation of GTFS specifications
- π RESTful API - Comprehensive endpoints for transit data access
- π Real-time Data Processing - Live vehicle positions, alerts, and service updates
- πΊοΈ Geospatial Support - PostgreSQL/PostGIS for location-based queries
- π Background Processing - Celery integration for data validation and updates
- π’ Multi-tenant Architecture - Support for multiple transit agencies
π Getting Started
Prerequisites
- Python 3.11+
- Redis server
- PostgreSQL 12+ with PostGIS extension
- Git
Installation
- Clone the repository
bash
git clone https://github.com/simovilab/databus.git
cd databus
- Set up virtual environment (recommended)
bash
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
- Install dependencies
bash
pip install -r requirements.txt
- Configure environment
bash
cp .env.example .env # Create and edit your environment variables
- Set up database
bash python manage.py migrate python manage.py createsuperuser # Optional: create admin user
Running the Application
- Start Redis server (in separate terminal)
bash
redis-server
- Start Celery worker (in separate terminal)
bash
celery -A realtime worker -l info
- Start Django development server
bash python manage.py runserver
The application will be available at http://localhost:8000
π Usage
| Endpoint | Description |
|---|---|
/api/ |
REST API root - browse all available endpoints |
/api/docs/ |
Interactive API documentation (ReDoc) |
/api/docs/schema/ |
OpenAPI schema |
/admin/ |
Django admin interface |
/feed/ |
GTFS feed endpoints |
π Documentation
- HOWTO.md - Complete guide for setting up a development environment with Docker
- docs/development.md - Functional development notes and data specifications (Spanish)
- docs/deployment.md - Production deployment with Celery and systemd
- docs/api.md - API specification and data formats
- docs/obe.md - On-board equipment specifications
- WARP.md - Development guidance for Warp terminal users
For the full documentation site, run mkdocs serve and visit http://localhost:8000
π£οΈ Roadmap
Where is this going? Check SIMOVI's roadmap.
π€ Contributing
Help is welcome! See the guidelines.
π Contact
- Email: [email protected]
- Website: simovi.org
π License
Apache 2.0