A terminal-based vehicle rental management application developed in Java using a layered architecture (DAO, Service, Model). The system allows users to register, log in, and rent vehicles such as cars, motorcycles, and helicopters.
- User authentication with email and password (hashed using SHA-256)
- Admin-defined vehicles and categories
- Vehicle search and category-based filtering
- Hourly, daily, weekly, and monthly rental options
- Corporate users can only rent vehicles monthly
- Deposit requirement for vehicles over 2 million TL and users under 30 years old
- Paginated vehicle listing
- View rental history
- Terminal-based interactive menu system
- PostgreSQL database with proper relational design
- Java 21
- PostgreSQL
- JDBC
- Maven (or manual PostgreSQL JAR inclusion)
- SHA-256 password encryption
- Layered architecture (Model, DAO, Service, Main)
- SQL (with relationships and JOIN operations)
- Clone this repository.
- Import the SQL backup file located at
resources/db_backup.sql
into your PostgreSQL database. - Configure your database connection in the code.
- Build and run the application using an IDE or terminal.
The system uses a PostgreSQL database with the following tables:
users
vehicles
vehicle_categories
rentals
Sample data is included in the SQL backup.
- Passwords are hashed using SHA-256.
- Only authenticated users can rent vehicles.
- Only admin users can add or manage vehicles.
- Rental durations: hourly, daily, weekly, monthly
- Corporate users must rent for at least one month
- If a vehicle's price exceeds 2 million TL:
- User must be over 30 years old
- A 10% deposit is required
You can find sample users, vehicles, and categories in the SQL backup file.