simovilab/databus

Core GTFS server implementing Schedule and Realtime specifications for comprehensive transit data management with RESTful APIs

api
celery
django
gtfs

databus

DatabΓΊs

Static Badge Static Badge

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

  1. Clone the repository

bash git clone https://github.com/simovilab/databus.git cd databus

  1. Set up virtual environment (recommended)

bash python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate

  1. Install dependencies

bash pip install -r requirements.txt

  1. Configure environment

bash cp .env.example .env # Create and edit your environment variables

  1. Set up database bash python manage.py migrate python manage.py createsuperuser # Optional: create admin user

Running the Application

  1. Start Redis server (in separate terminal)

bash redis-server

  1. Start Celery worker (in separate terminal)

bash celery -A realtime worker -l info

  1. 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

πŸ“„ License

Apache 2.0

Stars
99
0.00% more than last month
Forks
1
Open Issues
18