AthosExarchou/ds-exc-2024
This Apartment Rental Application is a web-based platform that allows users to: View available apartments for rent, rent apartments, submit new apartments, manage user roles and more.
Distributed Systems Group Project 2024-2025
This application was developed as a group project for the Distributed Systems course at Harokopio University of Athens - Dept. of Informatics and Telematics, later expanded with independent features and refinements.
Apartment Rental Management System
Contents
- Overview
- What's New in v2.0
- Core Features
- Email Notifications
- UI & UX Enhancements
- Requirements
- Installation
- Configuration
- Usage Guide
- Role Management
- Project Structure
- Contact
- Contributors
- License
Overview
A Spring Boot-powered rental management platform where users can:
- Browse available apartments
- Rent apartments by providing tenant details
- Submit new apartments by providing necessary details
- Receive automated email notifications for important actions
Version 2.0 focuses on robust backend improvements, responsive UI redesign, and production-grade structure.
What's New in v2.0
- Enhanced Security Setup: New
LoginSuccessHandler, refinedSecurityConfig, and admin auto-initialization viaAdminInitializer. - Profile Management: Dedicated
ProfileControllerand profile templates under/profile. - Full UI Revamp: Every Thymeleaf template redesigned for consistency, spacing, and responsiveness across devices.
- Mobile Optimization: Responsive grid layouts and adaptive buttons for small screens.
- New Email Templates: All notification emails modernized with consistent branding and improved readability.
- Codebase Cleanup: Refactored controllers, services, and repositories for better logic flow and maintainability.
- Global CSS & JS: New
/static/css/style.cssand/static/js/togglePassword.jsfor improved design and interactivity. - Contact & Legal Pages: Added dedicated sections under
/contact/and/legal/.
Core Features
- Apartment Listings: Browse, filter, and view all approved apartments.
- Dynamic Roles: Automatic role assignment for first-time owners or tenants.
- Email Automation: Clean, HTML-based notification system for every major event.
- Error Handling: Custom 403, 404, and 500 pages.
- Responsive Design: Fully functional across desktop, tablet, and mobile.
- Access Control: Role-based access ensures only authorized users can perform certain actions.
Email Notifications
The platform provides automatic email notifications to improve user engagement and administrative transparency. Emails are sent for the following actions:
- New User Registration: A welcome message is sent upon account creation.
- Account Deletion: A notice is sent when a user account is deleted by the admin.
- User Info Update: A confirmation email is sent when personal user information is changed by the admin.
- Apartment Creation: Owners receive a confirmation when they submit a new apartment.
- Apartment Approval: Owners are notified once their submitted apartment is approved by the admin.
- Apartment Deletion: Owners are notified when their apartment listing is successfully removed.
- Rent Application Approval: Tenants receive an email when their rental application is approved by the owner.
- Contact form submission: Platform email receives message from user.
All emails use reusable Thymeleaf templates under /templates/email/.
UI & UX Enhancements
- Modern consistent color palette and typography
- Dynamic hero section, gradient buttons, and hover effects
- Clean layout fragments (
header.html,footer.html,layout.html) - Smart button placement for both desktop and mobile
- Subtle animations
Requirements
To run this application, ensure you have the following installed:
- Java: Version 21+
- Spring Boot: Version 3.x
- Maven(optional): Version 3.8+
- Thymeleaf: For front-end rendering
- Database: any (for development)
Installation
- Clone the repository:
git clone https://github.com/AthosExarchou/ds-exc-2024.git
- Open 'ds-exc-2024' in your preferred IDE
- Press 'Run' to boot the application
Or, via terminal, you can run:
mvn spring-boot:run - Access the app in your browser at http://localhost:8080/
Configuration
Before running the application, ensure you configure src/main/resources/application.properties.
Required Properties:
- Application Name and Server Port
spring.application.name=<Your Application Name> server.port=8080
- Database Connection
spring.datasource.username=<DATABASE_USERNAME> spring.datasource.password=<DATABASE_PASSWORD> spring.datasource.url=jdbc:mysql://<HOST>:<PORT>/<DB_NAME>
- Gmail SMTP Settings (for Email Notifications)
spring.mail.host=smtp.gmail.com spring.mail.port=587 spring.mail.username=realestate2025project@gmail.com spring.mail.password=<YOUR_APP_PASSWORD> spring.mail.protocol=smtp spring.mail.properties.mail.smtp.auth=true spring.mail.properties.mail.smtp.starttls.enable=true
Usage Guide
For Tenants
- Log in with your credentials
- Visit the "Apartments For Rental" page to view available apartments
- Click on the "Application for Rental" button for the desired apartment
- If renting for the first time, fill in your details (First Name, Last Name, Phone Number)
- Submit the form to complete the rental process
For Owners
- Log in with your credentials
- Navigate to the "Apartments For Rental" page
- Click on the "Create new Apartment" button
- Fill in the details of the apartment you want to list
- Submit the form to make the apartment available for rent (will first have to be approved by the administrator)
- Manage your listings via My Apartments
For Admins
- Approve pending Apartments
- Manage users and roles
- Monitor rental activity
Access Restrictions
- Only owners can delete apartments they have created
- Tenants can only rent apartments that are available
Role Management
| Role | Description |
|---|---|
| USER | Default upon registration |
| OWNER | Assigned when a user creates their first apartment |
| TENANT | Assigned when a user applies for rental |
| ADMIN | Full management access; initialized via AdminInitializer |
Project Structure
src/main/java/gr/hua/dit/ds/ds_exc_2024/
│
├── config/ # Configuration classes (security, initialization, etc.)
├── controllers/ # REST & MVC controllers (handle HTTP requests)
├── dto/ # DTOs for data transfer
├── entities/ # JPA entities (User, Role, Apartment, etc.)
├── repositories/ # Spring Data JPA repositories
├── services/ # Business logic layer
└── DsExc2024Application.java # Main Spring Boot entry point
src/main/resources/
│
├── static/ # Static resources (CSS, JS, images)
├── templates/ # Thymeleaf templates (UI pages)
│ ├── apartment/ # Views related to apartments
│ ├── auth/ # Authentication & user management pages
│ ├── contact/ # Contact form pages
│ ├── email/ # Email templates
│ ├── error/ # Custom error pages
│ ├── legal/ # ToS & privacy pages
│ ├── owner/ # Owner-related pages
│ ├── page_layout/ # Common layout fragments (header, footer, etc.)
│ ├── tenant/ # Tenant-related pages
│ └── index.html # Homepage
└── application.properties # App configuration (DB, SMTP, etc.)
Contact
For support or inquiries:
- Email: realestate2025project@gmail.com
- Website: localhost:8080
Contributors
| Student ID | Name | Contribution Context |
|---|---|---|
| it2022134 | Exarchou Athos | Core backend, full v2.0 overhaul, email & UI redesign |
| it22149 | Alexandros-Georgios Zarkalis | Initial DS coursework implementation |
License
This project is licensed under the MIT License.
You are free to use, modify, and distribute this project with attribution.
Version History
| Version | Date | Summary |
|---|---|---|
| v1.0 | February 2024 | Initial release (Distributed Systems coursework) |
| v2.0 | October 2025 | Major overhaul: UI redesign, profile system, security enhancements, responsive design, code refactor |