YelpCamp is a full-stack web application that allows users to discover, create, review, and manage campgrounds. It features secure user authentication, dynamic image uploads with Cloudinary, and interactive maps with MapTiler. Deployed on Heroku with a MongoDB Atlas backend.
https://yelpofcamp-7a9b83777101.herokuapp.com
Step 2: Successful Registration
- Register, login, and logout securely using Passport.js (LocalStrategy).
- Session management is handled using
express-session, with session data stored in MongoDB viaconnect-mongo— ensuring persistent and scalable session storage across server restarts and deployments.
- Logged-in users can:
- Create a new campground (title, location, price, images, description)
- View all campgrounds
- Edit or Delete only their own campgrounds
- Users can:
- Add reviews with comments and ratings
- Delete only their own reviews
Only review owners can delete:
- Owners can:
- Edit campground details
- Upload new images (via Multer + Cloudinary)
- Delete old images (from both Cloudinary and DB)
| Action | Requires Login | Must Be Owner |
|---|---|---|
| Create campground | ✅ | ❌ |
| Edit/Delete campground | ✅ | ✅ |
| Add review | ✅ | ❌ |
| Delete review | ✅ | ✅ |
| Upload/Delete images | ✅ | ✅ |
Middleware like isLoggedIn, isAuthor, and isReviewAuthor enforce these rules.
| Tool/Service | Purpose |
|---|---|
| Node.js | Backend runtime |
| Express.js | Web framework |
| MongoDB Atlas | NoSQL cloud database |
| Mongoose | ODM for MongoDB |
| EJS | Templating engine |
| Bootstrap | Frontend styling |
| Cloudinary | Image storage and deletion |
| Multer | File upload middleware |
| MapTiler | Interactive campground maps |
| Passport.js | Authentication |
| dotenv | Environment variable management |
| Heroku | Deployment |
- Heroku hosts the backend and serves the frontend.
- MongoDB Atlas stores user data, reviews, and campground info.
- Cloudinary handles all campground image uploads and deletions.
- MapTiler renders maps based on campground location.
Set in a .env file (not committed to version control):
CLOUDINARY_CLOUD_NAME=your_cloud_name
CLOUDINARY_KEY=your_api_key
CLOUDINARY_SECRET=your_secret
MAPTILER_KEY=your_maptiler_api_key
DB_URL=your_mongo_atlas_uri
SECRET=your_session_secret