Welcome to the Real Estate App repository! This project is a full-fledged real estate application that allows users to search, list, and manage property listings. It includes functionalities such as user authentication, profile management, and saving favorite properties. This app is built using the MERN stack (MongoDB, Express, React, Node.js) and SCSS CSS.
- User authentication (Register/Login)
- User profile management
- Create, read, update, and delete property listings
- Save and unsave favorite properties
- Real-time notifications for new listings
- Responsive design with SCSS CSS
- Frontend: React, SCSS CSS, React Router
- Backend: Node.js, Express
- Database: MongoDB, Prisma ORM
- Authentication: JSON Web Tokens (JWT), bcrypt
-
Clone the repository:
git clone https://github.com/DhruvilJariwala/Real-Estate-app.git cd Real-Estate-app
-
Install dependencies:
# For the frontend cd client npm install # For the backend cd ../server npm install
-
Set up environment variables:
Create a
.env
file in theserver
directory and add the following environment variables:DATABASE_URL=your_mongodb_connection_string JWT_SECRET=your_jwt_secret
-
Run the application:
# Start the backend server cd server npm start # Start the frontend development server cd ../client npm start
-
Access the application:
Open your browser and go to
http://localhost:3000
to see the frontend. The backend server will be running onhttp://localhost:5000
.
- Register/Login: Create a new account or log in with an existing one.
- Profile Management: View and update your user profile.
- Property Listings: Browse available properties, view detailed information, and save your favorites.
- Add New Listing: Add new property listings if you are logged in.
/
: Home page/list
: Property listings page/:id
: Single property detail page/login
: Login page/register
: Registration page/profile
: User profile page (protected)/profile/update
: Update user profile page (protected)/add
: Add new property listing page (protected)
GET /api/users
: Get all usersGET /api/users/:id
: Get a user by IDPUT /api/users/:id
: Update a user by IDDELETE /api/users/:id
: Delete a user by IDPOST /api/auth/register
: Register a new userPOST /api/auth/login
: User loginGET /api/posts
: Get all property listingsGET /api/posts/:id
: Get a property listing by IDPOST /api/posts
: Create a new property listing (protected)PUT /api/posts/:id
: Update a property listing by ID (protected)DELETE /api/posts/:id
: Delete a property listing by ID (protected)POST /api/posts/save
: Save or unsave a property listing (protected)GET /api/profile/posts
: Get user profile posts (protected)GET /api/profile/notifications
: Get number of unread notifications (protected)