RentiFlat.com is a web application helping tenants and real estate owners match each other comfortably and inexpensively. Property owners can create a simple yet apt web pages detailing their flats with pictures, location, number of rooms, price and more. The web pages are then shared throughout the flat owner's social network and groups related to renting and finding flats. On the other side, people looking for a suitable living space stumble upon these offers with links pointing to the web pages describing them. They navigate to the offer details, seeing beautiful pictures and most importantly the list of other people who are interested in renting the property too. Flat owner can see the email addresses of the candidates so he or she can contact them about the offer.
There are two main reasons:
- It could help flat owners with renting their properties.
- I wanted to learn developing web applications in WordPress.
The project is based on Bedrock WordPress stack (configuration, deployments) and Sage WordPress starter theme. Therefore, the structure follows their best practices.
Eenvironments and deploy configurations.
The web application (theme) with dependencies (plugin, WordPress) and user-generated content.
Package definition file containing autoloading paths and dependencies with versions.
Link to the theme folder: https://github.com/lamosty/rentiflat/tree/master/web/app/themes/rentiflat-theme.
Custom fonts, images, JavaScripts and Sass (CSS) files which get concatenated and minified during the deploy process.
RentiFlat main library folder containing autoloaded classes and helpers.
Files which are used as Page Templates for specific app pages.
Template files used for app pages. They follow the WordPress Template Hierarchy. Scribu's Theme Wrapper is used so I don't have to replicate header and footer on all templates.
Main bootstrapping file. It is loaded by WordPress on each request to the web app. I'm using Encase IOC container for classes dependency injection.
Modified gulpfile.js from Sage starter theme. This file specifies gulp tasks such as JS, CSS concatenation and minification.
- Composer to load dependencies
- Node.js with NPM, gulp, bower to run JS/CSS tasks
- Web server with PHP and MySQL
- Clone the repository
- Run
composer install
- Create an .env file
- Set your web server document root to /path/to/site/web
- Access WP admin at
http://example.com/wp/wp-admin
- Switch to RentiFlat theme
- Create a new home page. Set the page to be Static Front Page so
index.php
template is used. - Create a new flat. It will use the
single-rentiflat_flat.php
template.