UrbanHaven is a full-stack web application for browsing and managing property listings. It uses server-side rendering with EJS to deliver dynamic content efficiently.
🔗 Live Demo: https://urbanhaven.onrender.com/listings
- 🏘️ Browse all property listings
- ➕ Create new listings
- 📝 Edit existing listings
- 🗑️ Delete listings
- 🎨 Server-side rendered UI using EJS
- ☁️ Deployed on cloud (Render)
- 🗺️ Map integration for listings
- Node.js
- Express.js
- EJS (Embedded JavaScript Templates)
- HTML, CSS
- MongoDB Atlas
- Render
.
├── models/ # Mongoose schemas
├── routes/ # Express routes
├── controllers/ # Logic for routes
├── views/ # EJS templates
│ ├── listings/
│ ├── partials/
│ └── layouts/
├── public/ # Static files (CSS, JS)
├── app.js # Main server file
git clone https://github.com/your-username/urbanhaven.git
cd urbanhaven
npm install
Create a .env file:
ATLAS_URL=your_mongodb_connection_string
PORT=3000
npm start
| Method | Route | Description |
|---|---|---|
| GET | /listings | Show all listings |
| GET | /listings/new | Form to create listing |
| POST | /listings | Create listing |
| GET | /listings/:id | Show single listing |
| GET | /listings/:id/edit | Edit form |
| PUT | /listings/:id | Update listing |
| DELETE | /listings/:id | Delete listing |
- Server-side rendering with EJS
- RESTful routing
- MVC architecture
- MongoDB with Mongoose
- Deployment debugging (502 errors & DB connection issues)
ATLAS_URL→ MongoDB connection stringPORT→ Server port
-
🔐 User authentication (JWT / sessions)
-
📸 Image upload support
-
❤️ Favorites system
-
🔍 Search & filtering
MIT License