Wanderlust is a web application that allows users to explore and create travel listings. Users can post listings for various destinations, view details of those listings, and leave reviews. The app also supports geolocation integration for addresses and image management for each listing via Cloudinary. The application features user authentication, and it's built using the stack (MongoDB, Express, EJS, Node.js), along with several other useful libraries and APIs.
Check out the live version of Wanderlust here: Wanderlust Live
- User Authentication: Users can sign up, log in, and log out.
- Listing Management: Users can create, update, and delete travel listings.
- Reviews: Users can post, edit, and delete reviews on listings.
- Geolocation: Locations for listings are geocoded using the MapTiler API.
- Image Upload: Users can upload images for their listings, managed through Cloudinary.
- Session Management: Sessions are managed using MongoDB and Express sessions.
- Flash Messages: Flash messages display success or error notifications throughout the app.
- Node.js and Express.js for backend development
- MongoDB for database management, using Mongoose for object data modeling (ODM)
- Passport.js for local user authentication
- Cloudinary for image storage and management
- Axios for making HTTP requests (geocoding locations)
- EJS for rendering dynamic views on the frontend
- Multer for handling file uploads
- Connect-flash for showing flash messages (e.g., success, error notifications)
- Method-Override to support HTTP verbs like PUT and DELETE in forms
- dotenv for managing environment variables
- MapTiler API for geolocation (getting longitude and latitude based on a given address)
- Node.js and npm installed on your system.
- A MongoDB database (you can use MongoDB Atlas for a cloud-based solution).
- A Cloudinary account to manage images (optional for image management).
-
Clone the repository:
git clone https://github.com/yourusername/wanderlust.git
-
Navigate into the project directory:
cd wanderlust
-
Install dependencies:
npm install
-
Set up environment variables: Create a
.env
file in the root of your project and add the following keys:ATLASTDB_URL=mongodb://yourdburl SECRET=yoursecretkey MAP_API_KEY=yourmaptilerapi_key CLOUDINARY_CLOUD_NAME=yourcloudname CLOUDINARY_API_KEY=yourapikey CLOUDINARY_API_SECRET=yourapisecret PORT=3000
-
Run the application:
npm start
The app will now be running at
http://localhost:3000
.