Giter Club home page Giter Club logo

dummy-products-api's Introduction

DUMMY PRODUCTS REST API

Made With

This API aims to replicate the behaviour of various ecommerce website data and this is best for prototyping such kind of website. It provides dummy products with placeholder images with different sizes. I made this because I cannot find any api that can provide such dummy products, though there are some like ebay dev, however, its such as hassle to request an access and read through all the long documentation since all I need is a fake product as a placeholder. Faker js would do, however, I'm looking for something that matches at least the name of the product and its type/department. and here you go!

Documentation

if you found this very useful, Please don't forget to star this repo! ๐ŸŽ‰ A rookie like me will highly appreaciate it

FEATURES

  • each dummy product has 3 dummy images (sizes 150x150, 300x300, 600x600) relative to product type (images used has CC license)
  • each dummy product comes with description, prices, stock, ratings, and 5 reviews
  • each dummy product query has an option to include similar products relative to its type or department
  • with filters, you filter by stocks, sales, price, ratings with operators lt, gt, lte, gte (where in lt is 'less than', and lte 'less than or equal to', same pattern goes with gt & gte)
    • filters will only work on /products and /products/search routes
  • with search route, matches all product names depending on the query. You need to use query string keys term which will throw an error if not provided
  • with pagination, you need to use query string keys page and limit. You can use both at the same time or one at a time
    • pagination (page & limit) can be used with all routes except /departments and /products/:product_id
  • with checkout, it only emulates the post request when buying something. nothing is inserted on the database but returns an object of the transaction

SAMPLE

This is a dummy e-commerce website that consumes this API. This one is built using Vanilla JS wrapped with Typescript ๐ŸŽ‰ (just for experimentation)

You can visit the repo here You can visit the website here

Screenshot Screenshot Screenshot

TO DO LIST (OPEN FOR CONTRIBUTIONS)

  • dummy users
  • dummy cart
  • remove unnecessary routes to utilize query strings
  • add dimensions property on Product Model?
  • add discount property on Product Model?

CONTRIBUTING GUIDELINES

Please check this contributing guidlines

CONTRIBUTORS โœจ

Thank you for all who contributed to this project!


Justin Balaguer

Author: Kevin Roi R. Basina

dummy-products-api's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

dummy-products-api's Issues

Application error

I tried to access the webpage to sign up for an API key. Got an application error page from Heroku.

API key

Hi,

Whenever I input my email via the website to get an API key, the form outputs undefined and the email never arrives.
When I attempt again, I receive:

Something went wrong. Remember that you can only request an API key once a day

Very keen to use, so if you could fix or get me an API key, that would be great. Thank you.

add 'similar products'

on /products/:product_id route, add an option to look for 'similar products' with the ff specs:

  • similar products, limited to 5 similar products only
  • similar products will exclude description and reviews field
  • since this is an option, it can be omitted (query string) and just return the queried product

Make the dataset public?

Hey can you please make the dataset public, in JSON or CSV file so that people can easily import and build their own stuff or contribute easily here as well.?

Docs cached, need to implement cache busting

since caching is implemented, changes on docs doesn't reflect on browsers storing cache until after 2 weeks
SOLUTION: use webpack instead of gulp

app.use((req, res, next) => {
    res.withError = ErrorReponse;
    res.setHeader('Cache-Control', 'public, max-age=1209600')
    next();
})

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.