Skip to content

Navigation Menu

Sign in
Sign up

Repository files navigation

Roamly - Travel Listings Platform

Roamly is a full-stack web application built with Node.js and Express that allows users to browse, create, and manage travel listings. The platform includes features for user authentication, listing management, and review systems.

πŸš€ Features

  • User Authentication and Authorization
  • Create, Read, Update, and Delete (CRUD) operations for travel listings
  • Review system for listings
  • Image upload functionality using Cloudinary
  • Interactive maps integration with Mapbox
  • Responsive design using EJS templates
  • Session management with MongoDB
  • Flash messages for user feedback

πŸ› οΈ Tech Stack

  • Backend: Node.js, Express.js
  • Database: MongoDB with Mongoose ODM
  • Authentication: Passport.js with Local Strategy
  • Frontend: EJS (Embedded JavaScript) templates
  • File Upload: Multer with Cloudinary integration
  • Maps: Mapbox SDK
  • Session Management: Express-session with MongoDB store
  • Form Validation: Joi
  • Styling: Custom CSS

πŸ“‹ Prerequisites

  • Node.js (v22.14.0 or higher)
  • MongoDB Atlas account
  • Cloudinary account
  • Mapbox account

πŸ”§ Installation

  1. Clone the repository:
git clone https://github.com/Anzar18/Roamly
  1. Install dependencies:
npm install
  1. Create a .env file in the root directory with the following variables:
ATLAS_URL=your_mongodb_atlas_url
SECRET=your_session_secret
CLOUDINARY_CLOUD_NAME=your_cloudinary_cloud_name
CLOUDINARY_API_KEY=your_cloudinary_api_key
CLOUDINARY_API_SECRET=your_cloudinary_api_secret
MAPBOX_TOKEN=your_mapbox_token
  1. Start the development server:
npm start

The application will be available at http://localhost:8080

πŸ“ Project Structure

phase1/
β”œβ”€β”€ controllers/ # Route controllers
β”œβ”€β”€ models/ # Database models
β”œβ”€β”€ routes/ # Express routes
β”œβ”€β”€ views/ # EJS templates
β”œβ”€β”€ public/ # Static files
β”œβ”€β”€ utils/ # Utility functions
β”œβ”€β”€ middleware.js # Custom middleware
β”œβ”€β”€ app.js # Main application file
└── package.json # Project dependencies

πŸ” Environment Variables

Make sure to set up the following environment variables in your .env file:

  • ATLAS_URL: MongoDB Atlas connection string
  • SECRET: Session secret key
  • CLOUDINARY_CLOUD_NAME: Cloudinary cloud name
  • CLOUDINARY_API_KEY: Cloudinary API key
  • CLOUDINARY_API_SECRET: Cloudinary API secret
  • MAPBOX_TOKEN: Mapbox access token

πŸ™ Acknowledgments

  • Express.js team for the amazing framework
  • MongoDB team for the database
  • Cloudinary for image hosting
  • Mapbox for mapping services

AltStyle γ«γ‚ˆγ£γ¦ε€‰ζ›γ•γ‚ŒγŸγƒšγƒΌγ‚Έ (->γ‚ͺγƒͺγ‚ΈγƒŠγƒ«) /