Skip to content

zejiran/real-estate-management-system

Repository files navigation

Real Estate Management System

This repository provides a robust solution for managing real estate properties. It includes a user-friendly Flutter application for property entry and listing, along with a Python service to ensure the accuracy and normalization of location data.

Property Management Application

The Property Management Application is a user-friendly Flutter app that allows users to add, edit, and list various properties. It provides a simple interface to input property details such as name, address, type, and an image URL. The application ensures a seamless property management experience for real estate professionals and property owners alike.

Running the Flutter App

To run the Flutter application on a web browser, use the following command:

flutter run -d web-server

This command will start the Flutter application on a local development server, allowing you to access and interact with the application through your web browser.

Address Normalization Service

This is the backend component of the Real Estate Management System, which includes API endpoints for handling property information and integrating with a third-party API to manage country and region data. Follow the instructions below to set up and run the backend server.

Installation

To set up the backend environment and install the required dependencies, follow the steps below:

  1. Clone the repository to your local machine.
  2. Navigate to the backend directory.
  3. Install dependencies using pipenv:
pipenv install

Running the Server

To run the backend server, execute the following command:

pipenv run python main.py

The server will start on http://localhost:5000/ by default.

Running Tests

To run the unit tests and check the test coverage, use the following command:

pipenv run coverage run --source=main,api_handler -m unittest test_api.py && pipenv run coverage report

This command will execute the tests and display the coverage report in the terminal.

API Endpoints

  • GET /countries?name={country_name}: Retrieves a list of countries based on a partial or exact name match.

Environment Variables

Ensure you have the following environment variables set in a .env file:

API_TOKEN=<api_token>
USER_EMAIL=<email>

Make sure to replace <api_token> and <email> with your actual API token and email.

License

License