Skip to content

moarsh17/LuxeStay-JavaFXProject

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LuxeStay Hotel Management System

A comprehensive JavaFX-based hotel management application designed to streamline hotel operations including room management, customer bookings, billing, and reporting.

Features

1. User Authentication

  • Secure login screen for staff access
  • User authentication before accessing the main application

2. Dashboard

  • Real-time overview of hotel operations
  • Quick statistics and key metrics
  • Visual summary of current bookings and occupancy

3. Room Management

  • View all available, occupied, and maintenance rooms
  • Room types: Single, Double, Deluxe, Suite
  • Set room prices per day
  • Mark rooms as available, occupied, or under maintenance
  • Track room amenities (AC, WiFi)
  • Assign rooms to floors

4. Customer Management

  • Register and manage customer information
  • Store customer contact details
  • Track customer booking history
  • Maintain customer database

5. Booking Management

  • Create new bookings for customers
  • Assign rooms to bookings
  • Set check-in and check-out dates
  • View all active and historical bookings
  • Manage booking status

6. Billing System

  • Generate bills for completed bookings
  • Calculate charges based on room type and duration
  • Track payment status
  • View billing history
  • Generate PDF bill reports

7. Checkout Management

  • Process customer checkouts
  • Calculate final charges
  • Generate checkout receipts
  • Process payments

8. Reporting

  • Generate comprehensive hotel reports
  • Export data to PDF format
  • View historical data and analytics
  • Track revenue and occupancy metrics

Project Structure

hotelmanagement/
├── pom.xml                          # Maven configuration
├── src/
│   └── main/
│       ├── java/
│       │   └── com/hotel/
│       │       ├── App.java                         # Application entry point
│       │       ├── model/                           # Data models
│       │       │   ├── Bill.java                   # Bill entity
│       │       │   ├── Booking.java                # Booking entity
│       │       │   ├── Customer.java               # Customer entity
│       │       │   └── Room.java                   # Room entity
│       │       ├── service/
│       │       │   └── HotelService.java           # Core business logic (thread-safe singleton)
│       │       ├── storage/
│       │       │   └── JsonStorageManager.java     # JSON data persistence
│       │       ├── billing/
│       │       │   └── BillingManager.java         # Billing calculations and PDF generation
│       │       └── ui/
│       │           ├── LoginController.java        # Login screen controller
│       │           ├── MainWindow.java             # Main application window
│       │           ├── tabs/                       # UI tabs/screens
│       │           │   ├── DashboardTab.java      # Dashboard view
│       │           │   ├── RoomTab.java           # Room management view
│       │           │   ├── CustomerTab.java       # Customer management view
│       │           │   ├── BookingTab.java        # Booking management view
│       │           │   ├── BillingTab.java        # Billing view
│       │           │   ├── CheckoutTab.java       # Checkout processing view
│       │           │   └── ReportTab.java         # Reports and analytics view
│       │           └── util/
│       │               └── StyleUtil.java         # UI styling utilities
│       └── resources/
│           ├── fxml/
│           │   └── login.fxml                      # Login screen layout (FXML)
│           └── styles/
│               └── hotel.css                       # Application stylesheets
└── data/                                           # JSON data files
    ├── rooms.json                                  # Room data persistence
    ├── customers.json                              # Customer data persistence
    ├── bookings.json                               # Booking data persistence
    └── bills.json                                  # Bill data persistence

Technology Stack

  • Language: Java 23
  • UI Framework: JavaFX 21
  • Build Tool: Maven
  • Data Format: JSON (Jackson)
  • Report Generation: iText PDF Library
  • Concurrency: Java ReentrantReadWriteLock for thread-safe operations
  • Data Binding: JavaFX ObservableList for reactive UI updates

Prerequisites

Before setting up the project, ensure you have:

  • Java Development Kit (JDK) 23 or higher
  • Maven 3.6.0 or higher
  • Git (optional, for version control)

Verify Installation

# Check Java version
java -version

# Check Maven version
mvn -version

Installation & Setup

1. Clone or Download the Project

# If using git
git clone <repository-url>
cd hotelmanagement

# Or extract the zip file and navigate to the directory
cd hotelmanagement

2. Create Data Directory

The application requires a data directory to store JSON files:

# The data directory should already exist, but if not:
mkdir data

3. Build the Project

# Navigate to project root
cd hotelmanagement

# Build using Maven
mvn clean compile

4. Download Dependencies

Maven will automatically download all required dependencies (JavaFX, Jackson, iText, etc.) during the first build.

Running the Application

Using Maven

# Run directly from Maven
mvn javafx:run

Using IDE (IntelliJ IDEA / Eclipse / VS Code)

  1. Open the project in your IDE
  2. Right-click on App.java → Run
  3. Or use the IDE's run button

From JAR (after packaging)

mvn package
java -jar target/HotelManagement-1.0-SNAPSHOT.jar

Login Credentials

The application requires authentication. Use the following default credentials:

  • Username: admin
  • Password: password

(Note: Customize credentials in the LoginController.java as needed)

Data Persistence

All data is persisted in JSON format in the data/ directory:

  • rooms.json - Room inventory and status
  • customers.json - Customer information
  • bookings.json - Booking records
  • bills.json - Billing records

The application features automatic data saving with a background thread, ensuring no data loss.

Architecture

Thread-Safe Service Layer

The HotelService is implemented as a thread-safe singleton using:

  • Double-checked locking pattern
  • ReentrantReadWriteLock for concurrent read/exclusive write access
  • Auto-save thread for periodic data persistence

Observable Collections

All data collections use JavaFX's ObservableList for:

  • Real-time UI updates
  • Automatic synchronization between model and view
  • Change notifications

Data Flow

UI Tab Controllers
       ↓
HotelService (Thread-safe)
       ↓
JsonStorageManager
       ↓
data/ (JSON files)

Room Management

Room Types

  • SINGLE
  • DOUBLE
  • DELUXE
  • SUITE

Room Status

  • AVAILABLE
  • OCCUPIED
  • MAINTENANCE

Room Amenities

  • Air Conditioning (AC)
  • WiFi

Billing System

  • Automatic calculation based on room type and booking duration
  • PDF report generation using iText
  • Multiple payment status tracking
  • Revenue reporting and historical data

Development

Key Classes

Class Purpose
App.java Application entry point, initializes login screen
HotelService.java Core business logic, thread-safe singleton
JsonStorageManager.java Data persistence layer
BillingManager.java Billing calculations and PDF generation
Room.java Room entity with JavaFX properties
Booking.java Booking entity and logic
Customer.java Customer information
Bill.java Bill record and payment tracking

Building with Custom Configurations

# Compile with debug info
mvn clean compile -X

# Skip tests (if applicable)
mvn clean compile -DskipTests

# Rebuild everything
mvn clean install

Troubleshooting

Common Issues

Issue: JavaFX module not found

Solution: Ensure Java version is 23+ and dependencies are downloaded
mvn clean install

Issue: Data not persisting

Solution: Verify the data/ directory exists and has write permissions
ls -la data/

Issue: Application won't start

Solution: Check if port is already in use or try:
mvn clean javafx:run

Configuration

Customize Settings

Edit the following files as needed:

  • App.java - Window title, size, and startup configuration
  • hotel.css - Color scheme and styling
  • Model classes - Add new fields or properties

Contributing

To extend this project:

  1. Add new features to appropriate tab controllers
  2. Create model classes in the model/ package
  3. Add service methods in HotelService.java
  4. Update JSON storage if new data structures are added
  5. Create corresponding FXML files in resources/fxml/

License

This project is provided as-is for educational and commercial use.

Author

LuxeStay - Hotel Management System


Learning Resources


Last Updated: April 2026 Version: 1.0-SNAPSHOT

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors