Realtor App concept



Project Overview

Brief Description:
The app is a REST API built in the Node.js framework Nest.js, which queries and updates a Postgres database. The app allows a user to make http requests to a set of endpoints which query available realty properties.

  • The user can request a full list of available properties.
  • The user can also filter the list of properties based on the various attributes of the properties, such as price, city, and property type.
  • Users with a REALTOR role can create, update, and delete realty listings.
  • Users can message the realtor for the property with inquiries.

Technology Stack:

  • Frontend: directory reserved for building a Vue.js frontend
  • Backend: Node.js, Express.js, Nest.js, Prisma ORM
  • Database: Postgres
  • Other Tools: JWT for authentication

Features

Core Features:

  • User authentication and authorization
  • CRUD operations for primary resources.
  • Data Validation and Exceptions

Code & Architecture Features:

  • Modular architecture
  • Automated unit tests
  • Middleware: guards, interceptors, pipes.
  • Dependency inversion by using decorators
  • Separation of Concerns
  • MVC design pattern: Model-View-Controller

Architecture

High-Level Architecture Diagram:

  • The backend application is part of a three-layer stack consisting of a web application frontend, the backend, and a Postgres database:
Tech Stack Diagram



Usage Examples

Using within Postman:

Postman get homes screenshot


The application may be tested using Postman. Above is an example of a request to get a listing of all homes.

Using within JavaScript

JavaScript get homes screenshot


The application may be called from within a frontend app such as a Vue.js application using the JavaScript axios package.

Using with command line

curl -X GET https://vue-nest-realtor-app-2.vercel.app/home

Sample API response:

    An array of objects, each with the properties of one realty listing


Testing

Testing Strategy:

  • Manual testing using Postman.
  • Unit and integration testing using @nestjs/testing package.
  • End-to-end testing using Supertest package for testing http requests and responses.

Challenges & Solutions

Major challenges encountered during development:

  • A major challenge was deploying the app to the cloud. Nest.js was not a pre-configured framework in the settings for Vercel.

Solution Implemented:

  • Trial and error and research in order to set up a configuration for Nest.js running as a Node.js application.