This project is a full-stack real estate website that allows users to buy or rent properties. It is built using the MERN stack with Node.js, MongoDB, Prisma, React.js, and Socket.io for real-time communication.
- Features
- Technologies
- Getting Started
- Prerequisites
- Installation
- Running the Application
- Folder Structure
- Contributing
- License
- Browse properties for sale or rent.
- Real-time chat with an admin.
- Secure user authentication and authorization.
- Detailed property listings with images, descriptions, and prices.
- Responsive design for mobile and desktop.
- Frontend: React.js
- Backend: Node.js, Express.js
- Database: MongoDB, Prisma
- Real-time Communication: Socket.io
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
- Node.js
- MongoDB
- Prisma
- npm or yarn
-
Clone the repository:
git clone https://github.com/yourusername/real-estate-website.git cd real-estate-website
-
Install dependencies for the backend:
cd backend npm install
-
Install dependencies for the frontend:
cd ../frontend npm install
-
Install dependencies for Socket.io:
cd ../socket.io npm install
-
Start MongoDB:
Ensure MongoDB is running on your machine. You can start it using the following command:
mongod
-
Configure Prisma:
In the
backend
folder, configure Prisma to connect to your MongoDB instance. Update theprisma/schema.prisma
file with your MongoDB connection details. -
Run database migrations:
cd backend npx prisma migrate dev
-
Start the backend server:
npm start
-
Start the frontend server:
cd ../frontend npm start
-
Start the Socket.io server:
cd ../socket.io npm start
-
Open your browser:
Visit
http://localhost:3000
to view the website.
real-estate-website/
├── backend/
│ ├── prisma/
│ ├── src/
│ ├── package.json
│ └── ...
├── frontend/
│ ├── src/
│ ├── public/
│ ├── package.json
│ └── ...
├── socket.io/
│ ├── src/
│ ├── package.json
│ └── ...
└── README.md