Skip to main content

๐Ÿจโš™๏ธ Overall application overview

The symfony application is a simple Rental listing and booking application. It's a monolithic application that has a backend and a frontend. The backend is a REST API that serves the frontend. The frontend is a simple twig application that uses the REST API to list and book rentals.

โคด Main Flowsโ€‹

  • List Rentals: The user can list all the rentals available
  • Search Rentals: The user can search for rentals by location and date
  • Create Rental: The user can create a rental listing
  • Book Rental: The user can book a rental
  • List Bookings: The user can list all the bookings made

Data Modelโ€‹

The application has the following entities:

  • Rental: Represents a rental listing
  • Booking: Represents a booking made by a user
  • Availability: Represents the subdocument object availability of a rental

Collections:

  • rentals: Collection of rentals
{
"_id": {
"$oid": "65dca21600a610ba8536b343"
},
"name": "Fahey, Leannon and Gleichner",
"location": "Elisabethland",
"night_cost": 415,
"availability": [
{
"start_date": {
"$date": "2024-01-01T00:00:00.000Z"
},
"end_date": {
"$date": "2024-04-16T00:00:00.000Z"
}
},
{
"start_date": {
"$date": "2024-04-21T00:00:00.000Z"
},
"end_date": {
"$date": "2024-04-25T00:00:00.000Z"
}
},
{
"start_date": {
"$date": "2024-05-01T00:00:00.000Z"
},
"end_date": {
"$date": "2025-01-01T00:00:00.000Z"
}
}
]
}

The document above represents a rental listing. It has a name, location, night_cost, and availability. The availability is an array of subdocument objects that represent the available dates for the rental.

  • bookings: Collection of bookings
{
"_id": {
"$oid": "65dca21600a610ba8536b343"
},
"rental_id": "65dca21600a610ba8536b343",
"rental_name": "Fahey, Leannon and Gleichner",
"night_cost": 415,
"total_cost": 1245,
"start_date": {
"$date": "2024-04-17T00:00:00.000Z"
},
"end_date": {
"$date": "2024-04-20T00:00:00.000Z"
}
}

The document above represents a booking made by a user. It has a rental_id, rental_name, night_cost, total_cost, start_date, and end_date.