A full-stack property listing and favourites management system built using the MERN stack. Users can browse properties, save favourites, and manage them in real time.
- 🔐 User Authentication (JWT based)
- 🏘️ View all available properties
- ⭐ Add properties to favourites
- ❌ Remove properties from favourites
- 📦 Backend-controlled property creation (no UI for adding properties)
- ⚡ UI updates for favourites
Properties are NOT created from the frontend UI.
- Properties are added manually through backend (API/Postman)
- You can, for now, use terminal to add properties for testing(server should be running)
curl -X POST http://localhost:8080/property/add \
-H "Content-Type: application/json" \
-d '{
"propertyName": "Sunset Villa",
"propertyLocation": "Kathmandu",
"propertyPrice": 250000
}'
- Frontend is read-only for properties
- Users (buyers) can:
- View properties
- Like (favourite) properties
- Remove from favourites
This keeps:
- Business logic controlled
- No unauthorized property creation
- Cleaner UI
- React (TypeScript)
- React Router
- Axios
- Tailwind CSS
- React Hot Toast
- Heroicons
- Node.js
- Express.js
- MongoDB + Mongoose
- JWT Authentication
client/
├── components/
├── pages/
├── lib/
└── ...
server/
├── controller/
├── model/
├── middleware/
├── routes/
└── ...
git clone <your-repo-url>Frontend:
cd client
npm installBackend:
cd server
npm installCreate .env in server folder (take .env.example for reference)
Backend:
npm run devFrontend:
npm start- Add to favourite:
POST /favourite/add/:propertyId
- Get user's favourites:
GET /favourite/list
- Remove from favourite:
DELETE /favourite/remove/:propertyId
- Get all properties:
GET /property/list
- Add property (manual/admin use only):
POST /property/add
- User logs in → JWT stored
- Dashboard loads:
- Fetch properties
- Fetch favourites
- When user clicks ⭐:
- Sends
propertyIdto backend - Stored with
userId
- Sends
- When user removes:
- Deletes using
favId
- Deletes using
- UI updates instantly (no reload needed)
- ❌ No UI for adding properties (intentional)
- ❌ No admin panel
- ❌ No image upload for properties
- Admin dashboard for property management
- Property images & details page
- Search & filters
- Pagination
- Role-based UI
Kunal Shrestha
This project is for learning and personal use.