Skip to content

Latest commit

 

History

History
97 lines (55 loc) · 6.5 KB

README.md

File metadata and controls

97 lines (55 loc) · 6.5 KB

HOMELANDER

This project implements a real estate management system using ReactJs, Prisma ORM with MongoDB, NodeJs, Socket IO and Zustand for state Management.The system supports user management, post management, chat functionality, and saved posts for users.

Project Setup

To set up and run the project, follow these steps:

  1. Clone the repository.

  2. Navigate to each of the following folders and install the dependencies:

    cd client
    npm install
    
    cd ../api
    npm install
    
    cd ../socket
    npm install
  3. Open three separate terminals and run the following commands:

    cd client
    npm run dev
    
    cd ../api
    npm start
    
    cd ../socket
    npm start
    
    

Data Model

The schema includes models for User, Post, PostDetail, SavedPost, Chat, and Message, each with specific fields to capture relevant data. The User model maintains user information, the Post model holds property listings, and the PostDetail model provides additional details about each post. The SavedPost model allows users to save their favorite posts, while the Chat and Message models enable real-time communication between users. The ER diagram is as follows Screenshot 2024-07-26 at 5 10 58 PM

Design Patterns Followed

The project employs several design patterns to ensure clean, maintainable code:

  • Singleton Pattern: Manages a single Prisma client instance to ensure efficient database connections.
  • Builder Pattern: Splits complex object creation processes, such as Post and PostDetail, into simpler, more manageable parts. This separation allows for more flexible and maintainable code by constructing Post objects and their detailed descriptions (PostDetail) independently.
  • High Level Architecture

    Screenshot 2024-07-26 at 8 39 32 PM

    The application architecture is built with a React frontend and an Express backend. The React app interacts with the Express API, where middleware manages authentication and authorization, ensuring that only logged-in users can access protected routes. The Express API handles data requests, interacts with the MongoDB database via Prisma ORM, and returns the appropriate responses. In the React app, routes are categorized into protected and unprotected types: protected routes include profile updates, user updates, and post creation, while unprotected routes include the home page, listing page, login, and registration. This structure ensures a secure and efficient flow of data and user interactions across the system.We also have socket IO server to allow real time chat updates to both the participants and we use state management library called Zustand to display notificaion on unread messages in navbar (currently notification is not real time we have to refresh it but in future we can make it real time).

    Features

    The Real Estate Management System offers a comprehensive set of features to enhance user experience and streamline property management:

    • User Management: Users can register, log in, and manage their profiles, including updating avatars and other personal details.
    • Property Listings: Users can create, update, and delete property listings. Each listing includes details such as title, price, images, address, city, bedroom count, bathroom count, type, property type, and location coordinates.
    • Detailed Property Information: Each property listing can have additional details captured in the PostDetail model, including descriptions, utilities, pet policies, income requirements, and proximity to schools, buses, and restaurants.
    • Saved Posts: Users can save their favorite property listings for quick access later, providing a convenient way to bookmark potential properties of interest.
    • Chat Functionality: Real-time chat allows users to communicate directly with each other, enhancing interaction and negotiation capabilities. The chat system supports multiple users and maintains a history of messages.Also we display notifications to user using state management library
    • Search and Filter: Users can search and filter property listings based on various criteria, such as city, type, property type, bedroom count, and price range, making it easy to find the perfect property.
    • Secure Authentication: JWT based authentication ensures that only authorized users can access and manage their information, enhancing security and data privacy.
    • Responsive Design: The application is designed to be responsive, ensuring a seamless experience across different devices, including desktops, tablets, and mobile phones.
    • Map Integration: Users can view property locations and detailed information on the react leafleft map, providing a visual representation of property listings and their proximity to amenities.

    Future Enhancements

    • Ratings and Reviews: Implement a system for users to rate and review properties and agents, enhancing credibility and providing valuable feedback.
    • Advanced Search Filters: Introduce more granular search filters, such as property age, amenities, and neighborhood ratings, to help users find exactly what they’re looking for.
    • Agent Profiles: Create a dedicated profile type for real estate agents, allowing them to showcase their listings, credentials, and client testimonials.
    • Interactive Property Maps: Enhance property maps with interactive features like nearby schools, hospitals, and shopping centers, offering users more contextual information.

    Scalability

    To ensure the system can handle growing user demands and an increasing number of property listings, it is designed with scalability in mind. By leveraging a modular architecture and employing efficient database indexing in the future, the system can accommodate a higher volume of transactions and data. Additionally, using cloud-based solutions and microservices will allow for dynamic scaling of resources as needed. This approach ensures that performance remains optimal even as the user base and data complexity expand.

    Author

    Ramakrishnan Varadharajan