GithubHelp home page GithubHelp logo

lauralyckholm / gifthive Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 959 KB

Gifthive is the one and only place you need, to save all gift ideas for your loved ones. You can add, manage, and view all of your gift ideas in one place, so that you never forget what you where supposed to get dad for Father's day, or your sister on her next birthday!

Home Page: https://gifthive.netlify.app/

JavaScript 91.97% HTML 0.21% CSS 7.82%
css3 expressjs javascript lottie-animation mongodb mongoosejs mui postman react-burger-menu react-router

gifthive's Introduction

Gifthive

As part of the Technigo Web Dev Bootcamp, this project was created as the Final Project. It includes an API, containting several different routes for handling gift items, lists (hives) and users, as well as a frontend handling all user interactions.

Gifthive is the one and only place you need, to save all gift ideas for your loved ones. You can add, manage, and view all of your gift ideas in one place, so that you never forget what you where supposed to get dad for Father's day, or your sister on her next birthday!

Environment Variables

To run this project, you will need to add the following environment variables to your .env file of the backend.

MONGO_URL - Get your Conncection String from MongoDB Atlas.

You will also need to add the following environment variables to your .env file of the frontend.

VITE_BACKEND_API - Add your own backend API deployment link

API Reference

Show all endpoints

  GET /
Description
Shows all available endpoints

/user-routes

Get the all users (only used in development, is commented out so not currently visible on the "/" route)

  GET /users

Get the dashboard/secret page

  GET /dashboard
Parameter Type Description
Auth Header Required. Authorization Middleware checks for header "Auth"
accessToken string Required. AccessToken comes from the logged in user

Regsiter a new user

  POST /register
Parameter Type Description
username string Required. Unique. The username of the new user.
password string Required. The password for the new user

Login a user

  POST /login
Parameter Type Description
username string Required. Unique. The username of the new user.
password string Required. The password for the new user

Update user information

  PUT /users/:id
Parameter Type Description
Auth Header Required. Authorization Middleware checks for header "Auth"
accessToken string Required. AccessToken comes from the logged in user
id string The userId of the user
username string The new username
password string The new password

Delete a user

  DELETE /users/:id
Parameter Type Description
Auth Header Required. Authorization Middleware checks for header "Auth"
accessToken string Required. AccessToken comes from the logged in user
id string The userId of the user to be deleted

Get all the hives that a user has been shared

  GET /users/shared-hives/:id
Parameter Type Description
Auth Header Required. Authorization Middleware checks for header "Auth"
accessToken string Required. AccessToken comes from the logged in user
userId string The userId used to get all hives they have been shared.

/gift-routes

Get all hives

  GET /hives/
Parameter Type Description
Auth Header Required. Authorization Middleware checks for header "Auth"
accessToken string Required. AccessToken comes from the logged in user

Get shared hives with gifts

  GET /hives/shared-with/:id
Parameter Type Description
Auth Header Required. Authorization Middleware checks for header "Auth"
accessToken string Required. AccessToken comes from the logged in user
id string Required. Gets the list of shared hives from the users id.

Get individual hive

  GET /hives/:id
Parameter Type Description
Auth Header Required. Authorization Middleware checks for header "Auth"
accessToken string Required. AccessToken comes from the logged in user
id string The hiveId

Post gift to a hive

  POST /gifts
Parameter Type Description
Auth Header Required. Authorization Middleware checks for header "Auth"
accessToken string Required. AccessToken comes from the logged in user
hiveId string Required. The hiveId in which the gift gets added
gift string Required. The name of the gift
tags array Optional. Tags that could be added to the gift, separated by comma
bought boolean Optional. Status of bought or not
dueDate string Optional. Expected due date for gift item

Add new hive with optional gift and tags

  POST /hives
Parameter Type Description
Auth Header Required. Authorization Middleware checks for header "Auth"
accessToken string Required. AccessToken comes from the logged in user
name string Required. The name of the hive to be added
gift string Optional. Gift to be added to this hive
tags string Optional. Tags to be added to the gift in case one is added
dueDate string Optional. Expected due date for gift item

Share a hive to an other user

  POST /hive/:id/share
Parameter Type Description
Auth Header Required. Authorization Middleware checks for header "Auth"
accessToken string Required. AccessToken comes from the logged in user
shareToEmail string Required. The email of the user you wish to share the hive to

Update a gifts information

  PUT /gifts/:id
Parameter Type Description
Auth Header Required. Authorization Middleware checks for header "Auth"
accessToken string Required. AccessToken comes from the logged in user
gift string Optional. The new name of the gift
tags array Optional. The new tag names
bought boolean Optional. The new status of bought
dueDate string Optional. Expected due date for gift item

Update a hive name

  PUT /gifts/:id
Parameter Type Description
Auth Header Required. Authorization Middleware checks for header "Auth"
accessToken string Required. AccessToken comes from the logged in user
name string Required. The new name of the hive

Delete an individual gift

  DELETE /gifts/:id
Parameter Type Description
Auth Header Required. Authorization Middleware checks for header "Auth"
accessToken string Required. AccessToken comes from the logged in user

Delete an individual hive

  DELETE /hive/:id
Parameter Type Description
Auth Header Required. Authorization Middleware checks for header "Auth"
accessToken string Required. AccessToken comes from the logged in user

Unshare a specific hive from the email it is shared to

  DELETE /hives/unshare/:id
Parameter Type Description
Auth Header Required. Authorization Middleware checks for header "Auth"
accessToken string Required. AccessToken comes from the logged in user
id string Required. The id of the hive you wish to unshare
unshareFromEmail string Required. Request in the body, pointing to the user account the hive is to be unshared from

/search-routes

Search for hives or gifts

  GET /search
Parameter Type Description
Auth Header Required. Authorization Middleware checks for header "Auth"
accessToken string Required. AccessToken comes from the logged in user
searchTerm string Required. The queryparam that is positioned right behind /search ("/search/searchTerm=")
searchValue string Required. The queryparam that is positioned right behind /searchTerm, the actual value searched for ("/search/searchTerm=HiveName")

Techstack used

  • React
  • Zustand
  • Express JS
  • Mongoose
  • MongoDB
  • CSS
  • SwalAlert2
  • React Burger Menu
  • React Router Dom
  • Material UI
  • Lottie Animation

View it live

Backend only: Render

With frontend: Netlify Status

๐Ÿ”— Links

portfolio

linkedin

gitgub

gifthive's People

Contributors

lauralyckholm 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.