https://github.com/akshay-chaulya/worldtravel-api
worldtravel application backend mainly using node.js, express.js and mongoDB
https://github.com/akshay-chaulya/worldtravel-api
authentication cloudinary expressjs javascript jwt leflate location map mongodb mongoose multer node node-js nodemailer worldtravel
Last synced: 6 months ago
JSON representation
worldtravel application backend mainly using node.js, express.js and mongoDB
- Host: GitHub
- URL: https://github.com/akshay-chaulya/worldtravel-api
- Owner: akshay-chaulya
- Created: 2024-09-13T18:10:27.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-12-20T18:40:45.000Z (over 1 year ago)
- Last Synced: 2025-02-11T13:24:22.894Z (over 1 year ago)
- Topics: authentication, cloudinary, expressjs, javascript, jwt, leflate, location, map, mongodb, mongoose, multer, node, node-js, nodemailer, worldtravel
- Language: JavaScript
- Homepage:
- Size: 5.33 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# WorldTravel - Backend
The backend of WorldTravel handles user authentication, email verification, profile image uploads, and saving/deleting traveled cities on a map. It is built using Node.js, Express, MongoDB, and integrates Cloudinary for image storage.
## Features
1. **User Sign-up**: Users can sign up with email verification and a profile image.
2. **User Login**: Allows users to log in to their accounts.
3. **Password Reset**: Users can change their passwords.
4. **Save Traveled Cities & Countries**: Users can save cities and countries they've traveled to.
5. **Delete Saved Cities**: Users can delete previously saved cities.
6. **Pagination**: Paginated data for user-traveled cities.
7. **Full Authentication**: The backend handles secure user authentication and authorization.
## Technologies
- Node.js
- Express
- MongoDB (Mongoose)
- Cloudinary (for image storage)
- JSON Web Tokens (JWT) for authentication
- Mailtrap for email verification
- Multer (for file uploads)
## Setup
1. Clone the repository:
```bash
git clone https://github.com/akshay-chaulya/worldtravel.git
cd worldtravel/backend
```
2. Install dependencies:
```bash
npm install
```
3. Create a `.env` file and add the necessary environment variables:
```plaintext
MONGO_URI=
JWT_SECRET=
CLOUDINARY_API_KEY=
CLOUDINARY_API_SECRET=
CLOUDINARY_CLOUD_NAME=
EMAIL_HOST=
EMAIL_PORT=
EMAIL_USER=
EMAIL_PASS=
```
4. Start the development server:
```bash
npm run dev
```
5. Run in production:
```bash
npm start
```