Skip to content

Randil-ops/ocean-view

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

3 Commits
Β 
Β 
Β 
Β 

Repository files navigation

Ocean View Resort - Hotel Reservation Management System

A comprehensive web-based hotel reservation management system built with Java Spring Boot, designed for Ocean View Resort in Galle, Sri Lanka.

Features

πŸ” User Authentication

  • Secure login system with JWT tokens
  • Role-based access control (Admin/Staff)
  • Password encryption with BCrypt

🏨 Reservation Management

  • 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

πŸ’° Billing System

  • 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

πŸ“š Help & Support

  • Comprehensive user guide
  • FAQ section
  • Room information and rates
  • Contact information for support

🎨 Modern Web Interface

  • Responsive design that works on all devices
  • Beautiful UI with Bootstrap 5
  • Interactive dashboard with menu-driven navigation
  • Real-time updates and notifications

Technology Stack

Backend

  • 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

Frontend

  • HTML5/CSS3 - Markup and styling
  • JavaScript (ES6+) - Client-side scripting
  • Bootstrap 5 - UI framework
  • Font Awesome - Icons

Room Types and Rates

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

Getting Started

Prerequisites

  • Java 17 or higher
  • Maven 3.6 or higher
  • Modern web browser

Installation

  1. Clone the repository

    git clone <repository-url>
    cd ocean-view-resort
  2. Build the application

    mvn clean install
  3. Run the application

    mvn spring-boot:run
  4. 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

API Endpoints

Authentication

  • POST /api/auth/login - User login
  • POST /api/auth/register - User registration

Reservations

  • GET /api/reservations - Get all reservations
  • GET /api/reservations/{id} - Get reservation by ID
  • GET /api/reservations/number/{reservationNumber} - Get reservation by number
  • GET /api/reservations/search?guestName={name} - Search reservations by guest name
  • POST /api/reservations - Create new reservation
  • PUT /api/reservations/{id} - Update reservation
  • DELETE /api/reservations/{id} - Delete reservation
  • POST /api/reservations/checkin/{reservationNumber} - Check in guest
  • POST /api/reservations/checkout/{reservationNumber} - Check out guest
  • GET /api/reservations/bill/{reservationNumber} - Generate bill

Help

  • GET /api/help/guide - Get user guide
  • GET /api/help/faq - Get FAQ
  • GET /api/help/room-info - Get room information

Database Schema

Users Table

  • id (Primary Key)
  • username (Unique)
  • password (Encrypted)
  • role (ADMIN/STAFF)

Reservations Table

  • id (Primary Key)
  • reservationNumber (Unique)
  • guestName
  • address
  • contactNumber
  • roomType
  • checkInDate
  • checkOutDate
  • bookingDate
  • totalAmount
  • checkedIn (Boolean)
  • checkedOut (Boolean)

Security Features

  • JWT-based authentication
  • Password encryption with BCrypt
  • Role-based authorization
  • CORS configuration
  • Input validation and sanitization
  • SQL injection prevention

Development

Project Structure

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

Adding New Features

  1. Create entity classes in model/ package
  2. Create repository interfaces in repository/ package
  3. Implement service logic in service/ package
  4. Create REST endpoints in controller/ package
  5. Update frontend JavaScript as needed

Testing

Running Tests

mvn test

Manual Testing

  1. Access the H2 console at http://localhost:8080/h2-console
  2. Use JDBC URL: jdbc:h2:mem:oceanviewresort
  3. Username: sa, Password: (leave empty)

Deployment

Production Deployment

  1. Configure production database (MySQL/PostgreSQL)
  2. Update application.properties with production settings
  3. Build the application: mvn clean package
  4. Deploy the JAR file to your server
  5. Configure reverse proxy (nginx/Apache) if needed

Docker Deployment

# Build Docker image
docker build -t ocean-view-resort .

# Run container
docker run -p 8080:8080 ocean-view-resort

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Add tests for new features
  5. Submit a pull request

Support

For technical support:

License

This project is licensed under the MIT License - see the LICENSE file for details.

Version History

  • 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.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors