FastFlat is a web-based real estate platform allowing users to search, favorite and interact with property listings. This project is designed with PHP and MySQL, using XAMPP for local development and the Doctrine ORM for database management.
- User Registration and Login: Users can register for an account and log in to save their preferences.
- Property Search: The application includes a search functionality that allows users to filter properties based on various criteria, such as city, property type (e.g., flat, house) and move-in date. This makes it easy for users to find properties that match their specific needs and preferences.
- Favorite Properties: Users can mark properties as favorites with a single click, making it simple to keep track of listings they are interested in. These favorites are stored in the user's profile, allowing for quick access during future visits.
- User-Property Interaction: Users can send messages or inquiries about specific properties, making the process of finding and securing a rental more efficient.
- User-Create flat request: Users can submit requests for flats that meet their requirements. This feature allows potential renters to specify their needs (e.g., location, budget, amenities) and enables property owners to respond with suitable options. This interaction enhances the chances of matching users with ideal properties.
- XAMPP: Install XAMPP for an Apache server, MySQL and PHP support.
- Composer: For managing dependencies.
- Clone the Repository:
git clone https://github.com/alexcodeberlin/fastFlat.git
- Open the XAMPP Control Panel.
- Start the Apache and MySQL modules:
- Click the "Start" button next to Apache to run the web server on port 80.
- Click the "Start" button next to MySQL to run the MySQL server on port 3306.
- To confirm both servers are running:
- Open a browser and visit
http://localhost. If successful you should see the XAMPP dashboard.
- Open a browser and visit
- Open phpMyAdmin by going to
http://localhost/phpmyadmin. - Create a new database named
property. - Import the SQL file located in the
databasefolder of the project to set up the initial structure. - For testing: Create a new database named
test_propertyand do the same.
To install PHPUnit for your project, follow these steps:
-
Ensure Composer is Installed:
- Before installing PHPUnit, make sure you have Composer installed. You can download it from getcomposer.org.
-
Navigate to Your Project Directory:
- Open your terminal (Command Prompt, PowerShell, or any terminal emulator).
- Change to your project directory where your PHP project is located:
cd path/to/your/project
-
Install PHPUnit:
- Run the following command to require PHPUnit as a development dependency:
composer require --dev phpunit/phpunit
- Run the following command to require PHPUnit as a development dependency:
-
Verify Installation:
- After installation, you can verify that PHPUnit is installed by running:
./vendor/bin/phpunit --version
- After installation, you can verify that PHPUnit is installed by running:
This will ensure that PHPUnit is available for testing your PHP code within the project.
- Copy
.env.exampleto a new file called.env. - Open the
.envfile and enter your database credentials:- Host: The database host (usually
localhost). - Username: Your database username (e.g.,
root). - Password: Your database password (leave empty if you're using XAMPP defaults).
- Database Name: The name of the database you created (e.g.,
property).
- Host: The database host (usually
- Move or copy the project files into the XAMPP
htdocsdirectory (e.g.,C:\xampp\htdocs\fastFlaton Windows). - Open your web browser and navigate to
http://localhost/fastFlatto access the application.
- The code is well commented in each file.
- Well structured.
- The names for variables and functions are Intention revealing.
- The code has a minimal amount of duplication.
- The projects code follows proper and consistent naming conventions. It doesn't need a lot of comments because it is self documenting.
- It is easy to test because it is well structured
- I use error handling with Clear Error identification and messages.
- All nested if conditions are removed.
- The app is secure against sql injection.
Usage of Software for cleaner code deepsource: For clean code and code smells Sonarlint:For clean code and code smells
It has a minimal amount of duplication (DRY)
- Integration Test: FastFlat uses PHPUnit for unit and integration testing. Goto Test.readme for more information..
