Giter Site home page Giter Site logo

shopify-fall-intern-project's Introduction

Shopify Fall 2021 Intern Challenge

Task: To build a simple image repository.

Created by: Jeffrey Ha (LinkedIn, Github, Devpost)

Technologies used: Node.js, Express.js, Firebase, Amazon S3, Multer, Mocha Chai

Features

  1. Upload images (up to 5) as either anonymous or registered user.
  2. Delete image
  3. Download image
  4. View specific image or all images
  5. Create user
  6. View user or all created users

Setup

  1. Create an .env file (template given below).
  2. Create a credentials file under C:\Users\{user}\.aws\ (template given below).
  3. Run npm install in the root directory of the folder.

To run the project, run npm start. It will create a web server under the port 5000, assuming it is available.

To run the tests for this project... (has a default 10,000 ms timeout)

  1. Ensure that the server is running already (run npm start) in a separate command line interface.
  2. In another command line interface, run npm test to execute all tests.

All API Routes

  1. GET /api/images/ - Retrieves all uploaded (public) images.
  2. POST /api/images/upload - Uploads one or more (up to 5) images to the server.
  3. GET /api/images/i/{IMAGE_ID}/ - Retrieves information of the image.
  4. DELETE /api/images/i/{IMAGE_ID} - Deletes the image from the server.
  5. POST /api/images/i/{IMAGE_ID}/set_public - Updates whether the image is "public" or not.
  6. GET /api/images/i/{IMAGE_ID}/download - Downloads the specified image, assuming it is public.
  7. GET /api/users/ - Retrieves all registered users.
  8. POST /api/users/register - Registers a new user in the database.
  9. GET /api/users/u/{USER_ID}/ - Retrieves information of the user (as well as their uploaded [public] images).
  10. POST /api/users/u/{USER_ID}/upload - Uploads one or more (up to 5) images to the server under this user's id.

.env Template

FIREBASE_API_KEY=
FIREBASE_AUTH_DOMAIN=
FIREBASE_DATABASE_URL=
FIREBASE_PROJECT_ID=
FIREBASE_STORAGE_BUCKET=
FIREBASE_MESSAGING_SENDER_ID=
FIREBASE_APP_ID=
FIREBASE_MEASUREMENT_ID=

AWS_ACCESS_KEY_ID=
AWS_SECRET_ACCESS_KEY_ID=
AWS_BUCKET_NAME=

credentials Template

[default]
aws_access_key_id=
aws_secret_access_key=

shopify-fall-intern-project's People

Contributors

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