Skip to content

Nawoth-Th/Web-Based-Property-Sales-System

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

6 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🏠 Property Management System

Java Spring Boot MySQL JavaScript

A comprehensive full-stack property management system built with Java Spring Boot and modern web technologies

University Project

πŸ“‹ Table of Contents

🎯 Overview

This Property Management System is a comprehensive full-stack web application designed to streamline property sales, rentals, and management processes. Built as a university project, it demonstrates enterprise-level Java development practices, design patterns, and modern web technologies.

Key Highlights

  • πŸ—οΈ Full-Stack Architecture: Java Spring Boot backend with vanilla JavaScript frontend
  • πŸ” Role-Based Security: Multi-role user system with Spring Security
  • πŸ“± Responsive Design: Modern UI with CSS Grid and Flexbox
  • 🎨 Design Patterns: Implementation of 5 key design patterns
  • πŸ—„οΈ Robust Database: MySQL with proper relationships and constraints
  • πŸ“§ Email Notifications: Automated email system for important events

✨ Features

πŸ‘₯ User Management

  • Multi-Role System: BUYER, SELLER, RENTER, AGENT, ADMIN
  • Secure Authentication: BCrypt password encryption
  • Profile Management: User registration, login, and profile updates
  • Demo Accounts: Pre-configured accounts for testing

🏘️ Property Management

  • Dual Property Types: Support for both sales and rentals
  • Advanced Search: Filter by location, price, type, and status
  • Image Management: Upload and manage property images
  • Status Tracking: AVAILABLE, SOLD, RENTED, MAINTENANCE
  • Seller Dashboard: Manage your property listings

πŸ“… Booking System

  • Appointment Scheduling: Book property visits with date/time selection
  • Conflict Detection: Automatic detection of booking conflicts
  • Status Management: PENDING, CONFIRMED, CANCELLED
  • Multi-User Views: Different views for buyers and sellers

🏠 Rental Management

  • Agreement Creation: Create and manage rental agreements
  • Status Tracking: ACTIVE, EXPIRED, TERMINATED
  • Extension System: Extend existing rental agreements
  • Expiration Monitoring: Track expiring agreements

πŸ’¬ Communication System

  • Property Inquiries: Send and manage property inquiries
  • Offer System: Submit, accept, reject, or counter offers
  • Status Tracking: OPEN, RESOLVED, ARCHIVED for inquiries
  • Email Notifications: Automated notifications for important events

πŸ› οΈ Technology Stack

Backend

  • Java 21 - Latest LTS version with modern features
  • Spring Boot 3.2.0 - Rapid application development framework
  • Spring Security - Authentication and authorization
  • Spring Data JPA - Database operations and ORM
  • MySQL 8.0+ - Relational database management
  • Maven - Dependency management and build tool

Frontend

  • HTML5 - Semantic markup and modern structure
  • CSS3 - Advanced styling with Grid and Flexbox
  • Vanilla JavaScript - ES6+ features and modern syntax
  • Fetch API - RESTful API communication

Database

  • MySQL - Primary database
  • JPA/Hibernate - Object-relational mapping
  • Foreign Key Constraints - Data integrity
  • Enum Types - Status management

πŸš€ Quick Start

Prerequisites

  • JDK 21 or higher
  • MySQL 8.0 or higher
  • Maven 3.6 or higher
  • Git for version control

Installation

  1. Clone the repository

    git clone https://github.com/your-username/property-management-system.git
    cd property-management-system
  2. Setup MySQL Database

    CREATE DATABASE property_sales_db;
  3. Configure Database Connection

    Update src/main/resources/application.properties:

    spring.datasource.url=jdbc:mysql://localhost:3306/property_sales_db?createDatabaseIfNotExist=true
    spring.datasource.username=your_username
    spring.datasource.password=your_password
  4. Run the Application

    mvn spring-boot:run
  5. Access the Application

    • Open your browser to http://localhost:8080
    • Use demo accounts or register new users

πŸ“ Project Structure

property-management-system/
β”œβ”€β”€ πŸ“ src/main/java/com/university/propertysales/
β”‚   β”œβ”€β”€ πŸ“ entity/              # JPA entities
β”‚   β”‚   β”œβ”€β”€ User.java
β”‚   β”‚   β”œβ”€β”€ Property.java
β”‚   β”‚   β”œβ”€β”€ Booking.java
β”‚   β”‚   β”œβ”€β”€ RentalAgreement.java
β”‚   β”‚   β”œβ”€β”€ Inquiry.java
β”‚   β”‚   └── Offer.java
β”‚   β”œβ”€β”€ πŸ“ repository/          # Data repositories
β”‚   β”œβ”€β”€ πŸ“ service/             # Business logic
β”‚   β”œβ”€β”€ πŸ“ controller/           # REST controllers
β”‚   β”œβ”€β”€ πŸ“ dto/                  # Data Transfer Objects
β”‚   β”œβ”€β”€ πŸ“ mapper/               # Entity-DTO mappers
β”‚   β”œβ”€β”€ πŸ“ config/               # Configuration classes
β”‚   └── πŸ“ pattern/              # Design patterns
β”‚       β”œβ”€β”€ πŸ“ factory/          # Factory Method Pattern
β”‚       β”œβ”€β”€ πŸ“ singleton/        # Singleton Pattern
β”‚       β”œβ”€β”€ πŸ“ decorator/        # Decorator Pattern
β”‚       β”œβ”€β”€ πŸ“ observer/         # Observer Pattern
β”‚       └── πŸ“ strategy/           # Strategy Pattern
β”œβ”€β”€ πŸ“ src/main/resources/
β”‚   β”œβ”€β”€ πŸ“ static/               # Frontend files
β”‚   β”‚   β”œβ”€β”€ πŸ“ css/              # Stylesheets
β”‚   β”‚   β”œβ”€β”€ πŸ“ js/               # JavaScript files
β”‚   β”‚   └── *.html               # HTML pages
β”‚   └── application.properties   # Configuration
β”œβ”€β”€ πŸ“ database/                 # Database scripts
β”‚   β”œβ”€β”€ schema.sql              # Database schema
β”‚   └── migration_add_images.sql # Image support migration
β”œβ”€β”€ πŸ“ uploads/                  # File uploads
└── πŸ“„ README.md                 # This file

🎨 Design Patterns

This project demonstrates the implementation of 5 key design patterns:

1. 🏭 Factory Method Pattern

  • Location: pattern/factory/
  • Purpose: Creates different notification types
  • Implementation: NotificationFactory with Email, SMS, Push, In-App notifications

2. πŸ”’ Singleton Pattern

  • Location: pattern/singleton/EmailConfiguration.java
  • Purpose: Single email configuration instance
  • Features: Thread-safe, prevents cloning/deserialization

3. 🎨 Decorator Pattern

  • Location: pattern/decorator/
  • Purpose: Dynamically adds features to property descriptions
  • Components: Basic property + decorators (Premium Location, Luxury Amenities, Furnished)

4. πŸ‘€ Observer Pattern

  • Location: pattern/observer/
  • Purpose: Notifies observers when property status changes
  • Observers: Email notifications, audit logs, market updates

5. 🎯 Strategy Pattern

  • Location: pattern/strategy/
  • Purpose: Different pricing calculation algorithms
  • Strategies: Standard, Premium, Discount pricing

Demo Endpoints

# Test all patterns
GET /api/design-patterns/demo?propertyId=1

# Test individual patterns
GET /api/design-patterns/demo/factory
GET /api/design-patterns/demo/singleton
GET /api/design-patterns/demo/decorator
GET /api/design-patterns/demo/observer?propertyId=1
GET /api/design-patterns/demo/strategy?propertyId=1

πŸ” Demo Accounts

Role Username Password Description
πŸ‘‘ Admin admin admin123 Full system access
🏠 Seller seller seller123 Property management
πŸ›’ Buyer buyer buyer123 Property browsing and booking
🀝 Agent agent agent123 Property agent access

πŸ“š API Documentation

User Management

POST   /api/users/register     # Register new user
POST   /api/users/login        # User login
GET    /api/users/{id}         # Get user by ID
PUT    /api/users/{id}         # Update user

Property Management

GET    /api/properties                    # List all properties (with filters)
POST   /api/properties                    # Create property
GET    /api/properties/{id}               # Get property details
PUT    /api/properties/{id}                # Update property
DELETE /api/properties/{id}                # Delete property
POST   /api/properties/upload             # Upload property images

Booking Management

POST   /api/bookings                      # Create booking
GET    /api/bookings/buyer/{buyerId}      # Get bookings by buyer
PUT    /api/bookings/{id}/status         # Update booking status

Rental Management

POST   /api/rentals                       # Create rental agreement
GET    /api/rentals/tenant/{tenantId}     # Get agreements by tenant
PATCH  /api/rentals/{id}/extend          # Extend agreement
GET    /api/rentals/expiring              # Get expiring agreements

Inquiry Management

POST   /api/inquiries                     # Create inquiry
GET    /api/inquiries/sender/{senderId}  # Get inquiries by sender
PATCH  /api/inquiries/{id}/status        # Update inquiry status

Offer Management

POST   /api/offers                        # Create offer
POST   /api/offers/{id}/accept           # Accept offer
POST   /api/offers/{id}/counter          # Counter offer
GET    /api/offers/buyer/{buyerId}      # Get offers by buyer

πŸ–ΌοΈ Screenshots

Homepage

Homepage

Property Listings

Property Listings

Dashboard

Dashboard

Booking System

Booking System

πŸŽ“ Educational Value

This project serves as an excellent example of:

  • Enterprise Java Development with Spring Boot
  • Design Pattern Implementation in real-world scenarios
  • Full-Stack Web Development with modern technologies
  • Database Design with proper relationships
  • RESTful API Development with comprehensive endpoints
  • Security Implementation with Spring Security
  • Modern Frontend Development with responsive design

πŸ”§ Development Setup

IDE Configuration

  • IntelliJ IDEA (recommended) or Eclipse
  • Spring Boot plugin for IDE
  • MySQL Workbench for database management

Code Style

  • Follow Java naming conventions
  • Use Spring Boot best practices
  • Implement proper error handling
  • Write comprehensive comments

πŸš€ Future Enhancements

  • Email Notifications - Automated email system
  • File Upload - Property image management
  • Advanced Search - Map integration and filters
  • Payment Integration - Online payment processing
  • Mobile App - React Native or Flutter
  • Real-time Chat - WebSocket implementation
  • Analytics Dashboard - Property statistics
  • API Documentation - Swagger/OpenAPI integration

πŸ‘₯ Team

Project Group 2025-Y2-S1-MLB-B7G2-01

Name IT Number
Pathirana P.M.K.H IT24101797
Wathuthanthiri W.M.R.V IT24101677
Maddegoda M.V.S IT24101739
Dissanayake D.M.N.T IT24102280
Gunasinghe N.A.L IT24101721
  • Backend Development: Java Spring Boot, MySQL, REST APIs
  • Frontend Development: HTML5, CSS3, JavaScript ES6+
  • Database Design: MySQL schema and relationships
  • Design Patterns: Implementation of 5 key patterns
  • Documentation: Comprehensive project documentation

πŸ“„ License

This project is developed as a university assignment and is for educational purposes.


🏠 Property Management System
Built with ❀️ for University Project

GitHub Java Spring Boot

About

This Property Management System is a comprehensive full-stack web application designed to streamline property sales, rentals, and management processes. Built as a university project, it demonstrates enterprise-level Java development practices, design patterns, and modern web technologies.

Resources

License

Stars

Watchers

Forks

Contributors