Trola.si is a web application that provides real-time arrival information for Ljubljana city buses. It allows users to:
- Search for bus stations by name or station code
- View upcoming bus arrivals for any station
- Filter arrivals by direction (to/from city center)
- Find nearby stations using geolocation
- See estimated arrival times updated in real-time
The application uses the official LPP (Ljubljana Public Transport) API to fetch live arrival data and provides a clean, mobile-friendly interface for accessing this information.
The focus of this project was:
- Fast and lightweight, works lightning fast on any phone
- Optimized UI - shows only relevant information
- No tracking, no ads, no nonsense
See it live at trola.si.
Before deploying the application, you'll need:
- LPP API Key - Send an email to dpo@lpp.si requesting an API key for accessing the LPP (Ljubljana Public Transport) API.
Once received, add it to your
.envfile asLPP_API_KEY.
-
Copy the configuration files and modify them for your environment:
cp .env.example .env # Modify .env with your settings, including your LPP_API_KEY -
Copy, review and adjust as needed:
docker-compose.ymlDockerfile
-
Start the Docker containers:
docker-compose up -d
-
Install and build frontend dependencies:
npm install npm run dev
-
Install and set up PHP dependencies:
composer install
-
Run database migrations and seed initial data:
php artisan migrate php artisan db:seed
This will:
- Create all necessary database tables
- Load bus station data from the LPP API
-
Set up the cron job for automatic data updates:
# Open crontab configuration crontab -e # Add this line to run Laravel's scheduler every minute * * * * * cd /path-to-your-project && php artisan schedule:run >> /dev/null 2>&1
This will:
- Run the database seeder daily at 4 AM to refresh station data
- Ensure your data stays up to date with the LPP API