jdegand / shoppingify-backend

Devchallenges - Legacy - Full-Stack Developer - Shoppingify

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Shoppingify Backend

Solution for a challenge from Devchallenges.io.

Table of Contents

Overview

Built With

  • express generator
  • bcrypt
  • cookie-parser
  • cors
  • express
  • jsonwebtoken
  • mongoose

Features

This application/site was created as a submission to a DevChallenges challenge. The challenge was to build an application to complete the given user stories.

Continued Development

  • Categories have to be created before Items - debatable if category should belong to Item model versus a model of its own.
  • Categories plus populate to get all items - versus getting categories and items separately
  • List should be changeable if same day? - how should state change ?
  • JWT protection for most routes - getting Items not protected and getting Categories not protected
  • Users route not required
  • Statistics doesn't require a route ?
  • Problems if you delete a category - item will be linked non-existent category - have to delete item as well
  • Same if you delete an item have to remove it from category array
  • Guidelines - no deletion of categories or items - both can be added only
  • Cross referencing models might be overkill here
  • Design choice - add quantity to item model versus list model
  • Need user attached to items ?
  • Problem with making list name unique - different users cannot have same list name

How To Use

To clone and run this application, you'll need Git and Node.js (which comes with npm) installed on your computer. From your command line:

# Clone this repository
$ git clone https://github.com/jdegand/shoppingify-backend

# Install dependencies
$ npm install

# Add env variables (PORT, MONGO_URI, REFRESH_TOKEN_SECRET, ACCESS_TOKEN_SECRET) and connect to mongo

# Run the app
$ npm start

Useful Resources

About

Devchallenges - Legacy - Full-Stack Developer - Shoppingify


Languages

Language:JavaScript 98.9%Language:HTML 0.8%Language:CSS 0.3%