Code Monkey home page Code Monkey logo

finalproject-backend's Introduction

Odyssey - Final Project at Technigo Bootcamp - Backend

This project aims to create a backend system for a Travel Planner application. The application enables users to save ideas, reviews, destinations, attractions, and other related information from their trips. Users can interact with these saved collections, adding comments and ratings.They are also able to explore new destinations and attractions through a public API from Google.

Objective

The primary challenge is to design a system capable of securely handling user registration, authentication, as well as managing data related to destinations, attractions, user collections, comments, and ratings. The backend API offers several endpoints for these actions, all of which are secured using authentication.

Features:

User registration and login
Authenticated access to user data
Destination and attraction exploration through Google Geocode API and Google Place API
User can create, view, edit, delete collections
User can add/remove cards to collections
Comment and ratings on destinations

Technologies Used:

  • Node.js
  • Express
  • CORS
  • Mongoose
  • MongoDB
  • bcrypt
  • crypto

Endpoints/Routes:

/
GET - Fetch all endpoints

/trips
POST - Create a new trip for the logged-in user
GET - Fetch all trips from the logged-in user

/trips/:tripId
GET - Fetch a single trip by its ID, can be accessed only by the logged-in user
PATCH - Partially update a single trip details including its name and filters
DELETE - Delete a single trip by its ID, can be deleted only by the logged-in user

/trips/:tripId/cards
PATCH - Add a new card to a single trip

/trips/:tripId/cards/:cardId
PATCH - Add or change comments and stars of a single card in a single trip
DELETE - Delete a single card in a trip's array of cards

/users
GET - Fetch all users

/users/register
POST - Create a new user. Validation of username and password is performed

/users/login
POST - Authenticate a user and return user information

/users/:userId
GET - Fetch a single user by its ID, only allows access if the requested ID matches the logged-in user's ID
PATCH - Update a single user's profile information including profile name, profile text, profile picture, and profile Instagram link. Only allows access if the requested ID matches the logged-in user's ID

/api/places
POST - Fetch nearby places based on longitude, latitude, and type of place using Google Places API

How to Run the API Locally:

Clone the repository
Install dependencies with npm install
Make sure MongoDB is installed and running
Run the server with npm start
Access the API at http://localhost:8080

API Deployed on Google Cloud

Deployed Frontend

https://final-project-odyssey.netlify.app/

Frontend repository

https://github.com/mvfrid/finalproject-frontend

finalproject-backend's People

Contributors

camcron avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.