A comprehensive web-based hotel reservation management system built with Java Spring Boot, designed for Ocean View Resort in Galle, Sri Lanka.
- Secure login system with JWT tokens
- Role-based access control (Admin/Staff)
- Password encryption with BCrypt
- Create new reservations with unique reservation numbers
- View all reservations with search and filter capabilities
- Update and delete reservations
- Check-in and check-out functionality
- Automatic conflict detection for room bookings
- Automatic bill calculation based on room rates and stay duration
- Support for multiple room types with different pricing
- Generate and print bills
- Detailed billing information
- Comprehensive user guide
- FAQ section
- Room information and rates
- Contact information for support
- Responsive design that works on all devices
- Beautiful UI with Bootstrap 5
- Interactive dashboard with menu-driven navigation
- Real-time updates and notifications
- Java 17 - Programming language
- Spring Boot 3.2.0 - Application framework
- Spring Security - Authentication and authorization
- Spring Data JPA - Database access
- H2 Database - In-memory database (for development)
- JWT - Token-based authentication
- Maven - Build tool
- HTML5/CSS3 - Markup and styling
- JavaScript (ES6+) - Client-side scripting
- Bootstrap 5 - UI framework
- Font Awesome - Icons
| Room Type | Price per Night | Features |
|---|---|---|
| Standard Room | $50 | Queen Bed, Ocean View, AC, WiFi, Mini Bar |
| Deluxe Room | $80 | King Bed, Balcony, AC, WiFi, Mini Bar, Coffee Maker |
| Suite | $150 | King Bed + Sofa Bed, Living Area, Balcony, AC, WiFi, Mini Bar, Coffee Maker, Work Desk |
| Ocean View Suite | $250 | 2 King Beds, Living & Dining Areas, Large Balcony, AC, WiFi, Mini Bar, Coffee Maker, Work Desk, Jacuzzi, Butler Service |
- Java 17 or higher
- Maven 3.6 or higher
- Modern web browser
-
Clone the repository
git clone <repository-url> cd ocean-view-resort
-
Build the application
mvn clean install
-
Run the application
mvn spring-boot:run
-
Access the application
- Open your web browser
- Navigate to
http://localhost:8080 - Use the default credentials:
- Admin: username:
admin, password:admin123 - Staff: username:
staff, password:staff123
- Admin: username:
POST /api/auth/login- User loginPOST /api/auth/register- User registration
GET /api/reservations- Get all reservationsGET /api/reservations/{id}- Get reservation by IDGET /api/reservations/number/{reservationNumber}- Get reservation by numberGET /api/reservations/search?guestName={name}- Search reservations by guest namePOST /api/reservations- Create new reservationPUT /api/reservations/{id}- Update reservationDELETE /api/reservations/{id}- Delete reservationPOST /api/reservations/checkin/{reservationNumber}- Check in guestPOST /api/reservations/checkout/{reservationNumber}- Check out guestGET /api/reservations/bill/{reservationNumber}- Generate bill
GET /api/help/guide- Get user guideGET /api/help/faq- Get FAQGET /api/help/room-info- Get room information
- id (Primary Key)
- username (Unique)
- password (Encrypted)
- role (ADMIN/STAFF)
- id (Primary Key)
- reservationNumber (Unique)
- guestName
- address
- contactNumber
- roomType
- checkInDate
- checkOutDate
- bookingDate
- totalAmount
- checkedIn (Boolean)
- checkedOut (Boolean)
- JWT-based authentication
- Password encryption with BCrypt
- Role-based authorization
- CORS configuration
- Input validation and sanitization
- SQL injection prevention
src/
βββ main/
β βββ java/com/oceanview/resort/
β β βββ config/ # Configuration classes
β β βββ controller/ # REST controllers
β β βββ model/ # Entity classes
β β βββ repository/ # JPA repositories
β β βββ security/ # Security configuration
β β βββ service/ # Business logic
β β βββ OceanViewResortApplication.java
β βββ resources/
β βββ static/ # Web assets (CSS, JS, images)
β βββ application.properties
- Create entity classes in
model/package - Create repository interfaces in
repository/package - Implement service logic in
service/package - Create REST endpoints in
controller/package - Update frontend JavaScript as needed
mvn test- Access the H2 console at
http://localhost:8080/h2-console - Use JDBC URL:
jdbc:h2:mem:oceanviewresort - Username:
sa, Password: (leave empty)
- Configure production database (MySQL/PostgreSQL)
- Update
application.propertieswith production settings - Build the application:
mvn clean package - Deploy the JAR file to your server
- Configure reverse proxy (nginx/Apache) if needed
# Build Docker image
docker build -t ocean-view-resort .
# Run container
docker run -p 8080:8080 ocean-view-resort- Fork the repository
- Create a feature branch
- Make your changes
- Add tests for new features
- Submit a pull request
For technical support:
- Email: support@oceanviewresort.com
- Phone: +94-11-234-5678
- Location: Ocean View Resort, Galle, Sri Lanka
This project is licensed under the MIT License - see the LICENSE file for details.
- v1.0.0 - Initial release with core features
- User authentication
- Reservation management
- Billing system
- Help section
- Modern web interface
Ocean View Resort Reservation System - Streamlining hotel management with modern technology.