This guide will walk you through the process of setting up the MERN Real Estate on your local machine.
Before you begin, ensure you have Node.js installed on your system.
Start by cloning the repository to your local machine:
git clone https://github.com/shanthi1710/Estate.git
cd Estate-
Environment Files: Navigate to the
backendfolder and create two files:.envand.env.e2e. Add the following contents to both files:MONGO_URL= PORT= JWT_SECRET= -
MongoDB Setup:
- Sign up for an account at MongoDB Atlas.
- Create a new cluster and follow the instructions to set up a new database.
- Once set up, obtain your MongoDB connection string and add it to the
MONGO_URLvariable in your.envfiles.
-
JWT_SECRET_KEY:
- This just needs to be any long, random string. You can google "secret key generator".
-
Frontend URL:
- The
FRONTEND_URLshould point to the URL where your frontend application is running (typicallyhttp://localhost:3000if you're running it locally).
- The
-
Environment Files: Navigate to the
frontendfolder and create a file:.env:VITE_FIREBASE_API_KEY= -
VITE_FIREBASE_API_KEY:
- To obtain the VITE_FIREBASE_API_KEY, you need to create a Firebase project on the Firebase console (https://console.firebase.google.com/) and then navigate to project settings where you can find your API key under the "General" tab.
-
Backend:
- Navigate to the
apidirectory. - Install dependencies:
npm install. - Start the server:
npm run dev.
- Navigate to the
-
Frontend:
- Open a new terminal and navigate to the
clientdirectory. - Install dependencies:
npm install. - Start the frontend application:
npm run dev. - The application should now be running on
http://localhost:5173but verify this in your command line terminal
- Open a new terminal and navigate to the