Giter Club home page Giter Club logo

butikk.gijernet.no's People

Contributors

karlinator avatar

Watchers

 avatar  avatar

butikk.gijernet.no's Issues

Lazy load images

Make use of, for instance, this component to lazy load images.

Low priority due to not that many images present. More important (and useful) for mobile.

API only supports up to 100 products

Right now, the products API method only supports a maximum of 100 products. This can be solved by 'paging' through the Stripe data (which caps at 100 products per request), checking the has_more attribute to do so.

App makes tons of unneccasary requests

It occurs to me that almost all the information required across the entire site is already sent out by default with the products function. Every product with every attribute. The only, and I mean only, thing missing is the descriptions.

It should be eminently possible to convert the site into a Progressive Web App (or just reduce server load in general) by making the products function return all the info by default, enable caching on it (google cdn and client side) and then simply storing it as global state in the app. This would eliminate all loading times and API calls except on initial load (which might still not require a full request, see caching and PWA) and on checkout calls.

Make use of Firebase Caching for Functions

Some of the functions can make use of caching. In particular, the 'products' and 'productDetails' can be cached, with maybe up to a few days of TTL.

To do this, it needs to migrate back to a https based (and not onCall) function. This also means moving them back to us-central1, but this is, I think, a small price to pay for caching requests.

Warning: There is no way to 'clear cache' manually, this is controlled entirely by TTL. Cache time might need to be short so updates actually propagate. Consult with customer.

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.