RoomFinder is a full-stack MERN application for discovering and posting room/roommate listings. It includes secure authentication, listing management, image upload, and real-time chat between users.
- Authentication with JWT and protected routes
- Create, edit, and delete room listings
- Image upload and optimization pipeline (Cloudinary + Sharp)
- Listing search/filter workflows
- Real-time messaging with Socket.IO
- Responsive React UI with Tailwind CSS
- Frontend: React, Vite, Tailwind CSS, React Router
- Backend: Node.js, Express, Socket.IO
- Database: MongoDB (Mongoose)
- Auth/Security: JWT, bcrypt, cookie-based sessions, rate limiting
- Media: Cloudinary, Multer, Sharp
RoomFinder/
api/ # Express API + Socket.IO server
MERN-ROOM/ # React frontend (Vite)
- Node.js 18+ (recommended)
- npm 9+
- MongoDB connection string
- Cloudinary account credentials
- Google Maps API key (for map-related frontend features)
Create an .env file in api/:
PORT=5000
MONGO_URL=your_mongodb_connection_string
JWT_SECRET=your_jwt_secret
AES_SECRET_KEY=your_aes_secret
CLOUDINARY_CLOUD_NAME=your_cloud_name
CLOUDINARY_API_KEY=your_api_key
CLOUDINARY_API_SECRET=your_api_secret
NODE_ENV=developmentCreate an .env file in MERN-ROOM/:
VITE_API_URL=http://localhost:5000
VITE_GOOGLE_MAPS_API_KEY=your_google_maps_key- Clone the repository
git clone https://github.com/meghshah324/RoomFinder.git
cd RoomFinder- Install backend dependencies
cd api
npm install- Install frontend dependencies
cd ../MERN-ROOM
npm installUse two terminals.
- Start backend server
cd api
npm run dev- Start frontend app
cd MERN-ROOM
npm run devFrontend: http://localhost:5173
Backend health check: http://localhost:5000/api/health
Backend (api/package.json):
npm run dev- Start API with nodemonnpm start- Start API with node
Frontend (MERN-ROOM/package.json):
npm run dev- Start Vite dev servernpm run build- Build production bundlenpm run preview- Preview production buildnpm run lint- Run ESLint