https://github.com/simovilab/databus
Core GTFS server implementing Schedule and Realtime specifications for comprehensive transit data management with RESTful APIs
https://github.com/simovilab/databus
api celery django gtfs
Last synced: 2 months ago
JSON representation
Core GTFS server implementing Schedule and Realtime specifications for comprehensive transit data management with RESTful APIs
- Host: GitHub
- URL: https://github.com/simovilab/databus
- Owner: simovilab
- License: apache-2.0
- Created: 2023-12-08T01:25:31.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2026-04-08T18:48:21.000Z (2 months ago)
- Last Synced: 2026-04-08T20:21:54.217Z (2 months ago)
- Topics: api, celery, django, gtfs
- Language: Python
- Homepage: http://databus.bucr.digital/
- Size: 5.25 MB
- Stars: 99
- Watchers: 1
- Forks: 1
- Open Issues: 18
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Agents: AGENTS.md
Awesome Lists containing this project
README

# 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
1. **Clone the repository**
```bash
git clone https://github.com/simovilab/databus.git
cd databus
```
2. **Set up virtual environment** (recommended)
```bash
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
```
3. **Install dependencies**
```bash
pip install -r requirements.txt
```
4. **Configure environment**
```bash
cp .env.example .env # Create and edit your environment variables
```
5. **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
```
2. **Start Celery worker** (in separate terminal)
```bash
celery -A realtime worker -l info
```
3. **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](HOWTO.md)** - Complete guide for setting up a development environment with Docker
- **[docs/development.md](docs/development.md)** - Functional development notes and data specifications (Spanish)
- **[docs/deployment.md](docs/deployment.md)** - Production deployment with Celery and systemd
- **[docs/api.md](docs/api.md)** - API specification and data formats
- **[docs/obe.md](docs/obe.md)** - On-board equipment specifications
- **[WARP.md](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](https://github.com/simovilab/context/blob/main/roadmap.md).
## π€ Contributing
Help is welcome! See the [guidelines](https://github.com/simovilab/.github/blob/main/CONTRIBUTING.md).
## π Contact
- Email: simovi@ucr.ac.cr
- Website: [simovi.org](https://simovi.org)
## π License
Apache 2.0