A JavaFX desktop application for hotel front-desk management, backed by MongoDB. It handles room bookings, live room availability, and guest & staff records behind a branded navy-and-gold UI.
- Calendar-style room picker – browse rooms in a paged grid; booked rooms are marked red and still bookable for dates outside the existing stay.
- Booking conflict checks – overlapping dates are rejected on save, and a selected room's booked dates are greyed out in the date pickers.
- Early checkout – record when a guest leaves early; the room becomes available again from the checkout date.
- Guest & employee records – add and search customers and employees.
- Consistent themed UI – shared stylesheet with a themed calendar, cards, and dialogs.
- Frontend: JavaFX 20
- Language: Java 17
- Database: MongoDB (e.g. MongoDB Atlas)
- Build: Maven
- JDK 17+
- Maven
- A MongoDB database and its connection string
The connection string is a secret and is not committed. Provide it in one of these ways (checked in this order):
- Environment variable (recommended):
# macOS/Linux export MONGODB_URI="mongodb+srv://<user>:<password>@<cluster-host>/?retryWrites=true&w=majority"
# Windows PowerShell $env:MONGODB_URI = "mongodb+srv://<user>:<password>@<cluster-host>/?retryWrites=true&w=majority"
- System property: pass
-Dmongodb.uri=...when launching. - Local file: copy the template and fill in your string:
OOPproject/demo/src/main/resources/com/example/db/config.properties.example -> OOPproject/demo/src/main/resources/com/example/db/config.propertiesconfig.propertiesis git-ignored, so your credentials stay local.
cd OOPproject/demo
mvn clean javafx:runDefault demo credentials: username CoderHotel, password coder1234.
OOPproject/demo
├── src/main/java/com/example # JavaFX screens (App, AddCustomer, RoomPicker, ...)
│ └── db # MongoConfig, RoomService, RoomInfo
├── src/main/resources/com/example # theme.css and local config.properties
└── pom.xml