A property rental management system built with Java, JavaFX, and MySQL. Landlords can manage properties, tenants, leases, and payments through a tabbed desktop interface.
- Property Management — add, view, and remove rental properties with type, location, and monthly rent
- Tenant Tracking — store tenant contact info, email, and loyalty points
- Lease Management — link tenants to properties with start/end dates and status tracking
- Payment Records — log payments with amounts, dates, and status (foreign key to tenants)
- Statistics Tab — view summary data across properties and tenants
- Auto-Create Schema — database tables are created on first launch if they don't exist
src/main/java/com/example/housepos/
├── Database/
│ ├── Const.java # DB connection config (env vars)
│ ├── DBConst.java # Table/column name constants
│ └── Database.java # Singleton connection + schema setup
├── dao/
│ ├── PropertyDAO.java # Property CRUD operations
│ ├── TenantDAO.java # Tenant CRUD operations
│ ├── LeaseDAO.java # Lease CRUD operations
│ └── PaymentDAO.java # Payment CRUD operations
├── pojo/
│ ├── DatabaseItem.java # Base class with ID
│ ├── Property.java # Property model
│ ├── Tenant.java # Tenant model
│ ├── Lease.java # Lease model
│ └── Payment.java # Payment model
├── tabs/
│ ├── AddItemTab.java # Form tab for adding records
│ ├── RemoveItem.java # Tab for removing records
│ └── StatisticsTab.java # Summary statistics view
└── HelloApplication.java # Application entry point
- Singleton —
Database.javaensures a single DB connection - DAO (Data Access Object) — separates data persistence from business logic
- POJO — clean model classes with inheritance (
DatabaseItembase)
- Java 17+
- MySQL 8.0+
- Gradle
Set environment variables before running:
export DB_NAME=housepos
export DB_USER=your_username
export DB_PASS=your_passwordTables are auto-created on first launch.
./gradlew run