A simple system for online book and buy train tickets. Inspired by KAI's booking system (Indonesian Railways Company).
Table of Contents
The Train Booking System is application designed to streamline the process of booking train tickets.
Key Features:
- Search and Book Trains:
- Passengers can search for available trains by entering their departure and arrival destinations, travel dates, and class preferences.
- A comprehensive list of train options, along with details such as departure and arrival times, ticket prices, and available seats, is displayed for easy selection
- Seat Selection:
- Passengers can choose their preferred seats or berths, helping them plan their journey with comfort and convenience in mind.
- Ticket Management:
- Passengers can view and manage their booked tickets, including the ability to cancel or reschedule their journeys (subject to the railway's policies).
- User Profiles:
- Passengers can create and manage user profiles with personal information, enabling faster and easier booking for future trips.
Trains
| Code | Name |
|---|---|
| CHE | Argo Cheribon |
| PHR | Argo Pahrahyangan |
| TKS | Taksaka |
| DWP | Argo Dwipangga |
| SMU | Argo Semeru |
| GJY | Gajayana |
| KLG | Kaligung |
| CIR | Ciremai |
| HAR | Harina |
Available Travels
| Travel Code | Departure Station | Destination Station | Train Name | Departure Schedule | Arrival Schedule | EKO Fare | EKS Fare |
|---|---|---|---|---|---|---|---|
| 26 | Gambir | Tegal | Argo Cheribon | 08:30 | 12:39 | 180000 | 220000 |
| 27 | Tegal | Gambir | Argo Cheribon | 13:30 | 17:34 | 180000 | 220000 |
| 42 | Gambir | Bandung | Argo Pahrahyangan | 12:30 | 15:25 | 150000 | 200000 |
| 47 | Bandung | Gambir | Argo Pahrahyangan | 08:45 | 11:52 | 150000 | 200000 |
| 68 | Gambir | Yogyakarta | Taksaka | 09:20 | 15:40 | 500000 | |
| 67 | Yogyakarta | Gambir | Taksaka | 08:45 | 15:09 | 500000 | |
| 10 | Gambir | Solo Balapan | Argo Dwipangga | 08:50 | 15:50 | 350000 | |
| 9 | Solo Balapan | Gambir | Argo Dwipangga | 20:30 | 03:30 | 350000 | |
| 18 | Gambir | Gubeng | Argo Semeru | 06:20 | 16:50 | 450000 | |
| 17 | Gubeng | Gambir | Argo Semeru | 09:05 | 19:40 | 450000 | |
| 56 | Gambir | Malang | Gajayana | 18:50 | 07:06 | 550000 | |
| 55 | Malang | Gambir | Gajayana | 14:55 | 03:10 | 550000 | |
| 194 | Tegal | Semarang Poncol | Kaligung | 05:05 | 07:18 | 80000 | 120000 |
| 195 | Semarang Poncol | Tegal | Kaligung | 05:00 | 07:14 | 80000 | 120000 |
| 196 | Tegal | Semarang Poncol | Kaligung | 10:46 | 12:55 | 80000 | 120000 |
| 197 | Semarang Poncol | Tegal | Kaligung | 13:50 | 16:04 | 80000 | 120000 |
| 192 | Tegal | Semarang Poncol | Kaligung | 12:32 | 14:45 | 85000 | 1150000 |
| 193 | Semarang Poncol | Tegal | Kaligung | 17:00 | 19:15 | 85000 | 115000 |
Local Development
- Golang
- Make
- Redis
- PostgreSQL
- Clone the repo
git clone https://github.com/ardimr/train-booking-system
- Install Go packages
go mod install
- Run the program
make run_app
Run With Docker Compose
*Make sure you have installed the docker-compose. Please follow this link for the guidance
-
Clone the repo
git clone https://github.com/ardimr/train-booking-system
or you can simply just copy the docker-compose file in this repository
-
Run docker-compose
-
Start Application
docker-compose up -d
-
Stop Application
docker-compose down
-
For more examples, please refer to the Documentation
- Add authentication and authorization
- Payment integration
- Database Migration
- Refactor booking mechanism
- Add Notification
- Load Testing
- UI Flow
- Admin Dashboard
- UI Booking Form Validation
See the open issues for a full list of proposed features (and known issues).
Distributed under the MIT License. See LICENSE.txt for more information.
Rizky Ardi Maulana - rizkyardimaulana@gmail.com
Project Link:







