A modern command-line train reservation system built with Java, featuring user authentication, train search, seat booking, and comprehensive booking management.
RailMate is a CLI-based train ticket booking application that demonstrates core software engineering concepts including:
- Object-Oriented Design - Clean architecture with entity, service, and utility layers
- JSON Data Persistence - Local storage using Jackson for data serialization
- Secure Authentication - BCrypt password hashing for user credentials
- Interactive CLI - User-friendly command-line interface with menu-driven navigation
| Component | Technology |
|---|---|
| Language | Java 26 |
| Build Tool | Gradle 9.5 |
| JSON Processing | Jackson Databind |
| Password Hashing | jBCrypt |
| IDE Support | IntelliJ IDEA / Eclipse |
- Java Development Kit (JDK) 26 or higher
- Gradle 9.5+ (included via wrapper)
# Clone the repository
git clone https://github.com/codesbyjit/RailMate.git
cd RailMate
# Build the project
./gradlew build
# Run the application
./gradlew runRunning Train Booking System
Choose option
1. Sign up
2. Login
3. Fetch Bookings
4. Search Trains
5. Book a Seat
6. Cancel my Booking
7. Exit the App
RailMate/
├── app/
│ └── src/main/java/ticket/booking/
│ ├── Entities/ # Data models
│ │ ├── User.java
│ │ ├── Train.java
│ │ └── Ticket.java
│ ├── Services/ # Business logic
│ │ ├── UserBookingService.java
│ │ └── TrainService.java
│ ├── Utils/ # Utilities
│ │ └── UserServiceUtil.java
│ └── LocalStorage/ # JSON data files
│ ├── User.json
│ └── Train.json
├── gradle/wrapper/ # Gradle wrapper
├── build.gradle # Build configuration
└── settings.gradle # Project settings
- Password Hashing - BCrypt algorithm for secure password storage
- Input Validation - Proper validation at multiple layers
- Error Handling - Graceful error handling with descriptive messages
This project is for educational purposes.
CodesByJit
- GitHub: @codesbyjit
⭐ Star this repository if you find it helpful!