WanderLust is a full-stack MERN (MongoDB, Express, React, Node.js) application that allows users to share their favorite places, upload images, and interact with a community of travelers.
- User Authentication: Secure Sign Up and Login with JWT (JSON Web Tokens) and password hashing (bcryptjs).
- Place Management:
- Create new places with titles, descriptions, and addresses.
- Upload images for each place.
- Google Maps Integration: Automatically converts addresses to coordinates and displays them on a map.
- Edit and Delete your own places.
- Social Interactions:
- Like System: Like and Unlike places shared by others. real-time like counts.
- Global Feed: View all users and their shared places.
- Responsive Design: A modern, dark-themed UI that works seamlessly on desktop and mobile devices.
Frontend:
- React.js: Validated component-based UI.
- React Router: For client-side routing.
- OpenLayers: For map rendering (replacing Google Maps API for easier setup).
- CSS3: Custom modern styling with a premium dark theme.
Backend:
- Node.js & Express.js: RESTful API server.
- MongoDB & Mongoose: NoSQL database for flexible data storage.
- Multer: For handling image file uploads.
- JWT & Bcryptjs: For secure authentication and authorization.
- Google Geocoding API (Optional/Configurable): For address-to-coordinate conversion.
Follow these steps to run the application locally:
- Node.js (v14 or higher)
- MongoDB (Local or AtlasURI)
git clone <repository-url>
cd wanderlustNavigate to the backend folder and install dependencies:
cd backend
npm installEnvironment Variables:
The backend logic currently uses hardcoded credentials/secrets for demonstration purposes. In a production environment, you should create a .env file for:
DB_USERDB_PASSWORDDB_NAMEJWT_SECRET
Start the backend server:
npm startThe server will start on http://localhost:5000.
Navigate to the frontend folder and install dependencies:
cd ../frontend
npm installStart the React development server:
npm startThe application will open in your browser at http://localhost:3000.
├── backend/
│ ├── controllers/ # Request handling logic
│ ├── models/ # Mongoose schemas (User, Place)
│ ├── routes/ # API endpoints
│ ├── middleware/ # Auth and file upload checks
│ ├── uploads/ # Stored images
│ └── app.js # Entry point
│
├── frontend/
│ ├── src/
│ │ ├── places/ # Place-related components/pages
│ │ ├── user/ # User-related components/pages
│ │ ├── shared/ # Reusable UI elements, hooks, context
│ │ └── App.js # Main component & Routing
- No Plaintext Passwords: User passwords are hashed before storage.
- Token-Based Auth: Protected routes (Create, Update, Delete, Like) require a valid JWT.
- Authorization Checks: Users can only edit or delete their own places.
- Add comments functionality to places.
- Implement a "Follow" system for users.
- Deploy to a cloud provider (e.g., Heroku, Vercel).
Built with ❤️ by Prashant