Giter Site home page Giter Site logo

twshiyuliou1997 / cmarketprice Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jahabeebs/cmarketprice

0.0 0.0 0.0 8.33 MB

Historical commodity prices visualized using Chart.js; submitted as part of Cloudflare's Developer challenge; Cloudflare Workers code is here: https://github.com/jahabeebs/alphavantageworker

Home Page: https://www.cmarketprice.com

JavaScript 10.92% Vue 89.08%

cmarketprice's Introduction

License: MIT

cmarketprice

Historical commodity prices visualized using Chart.js; submitted as part of Cloudflare's Developer challenge; Cloudflare Workers code is here: https://github.com/jahabeebs/alphavantageworker

Getting Started

Client-side code build process:

# install dependencies
$ yarn install

# serve with hot reload at localhost:3000
$ yarn dev

# build for production and launch server
$ yarn build
$ yarn start

# generate static project
$ yarn generate

To implement the back-end of the project you must register for a free CommoPrices API account to be able to access their free data endpoint. Then, create a Workers KV namespace called PRICES_DB. Set up a Cron job trigger on Cloudflare to ensure new data is pulled into the KV namespace regularly (I recommend a daily trigger). Bind the Cloudflare Worker to the Workers KV using these instructions.

Build Snapshot

Visit https://cmarketprice.com for the production website

Built With

Client-side code (HTML, Tailwind CSS, JS):

Nuxt.js - Front-end framework

Tailwind CSS - CSS framework

Vue-chartjs - Vue/Nuxt adaptation of Chart.js

nuxtjs/robots - Middleware to generate a robots.txt for the website

Cloudflare Pages - Configured to automatically deploy this repo to production when a successful build is run and avoids CORS issues when working with Cloudflare Workers

Server-side code (Typescript):

Cloudflare Workers - Coordinates Cron job and allows front-end to fetch commodity prices from a KV namespace

Workers KV - An eventually consistent DB that stores the commodity prices data

Commoprices API - API used to get free commodity data provided by the World Bank

General Tools:

Jetbrains Webstorm - IDE

Yarn - Package Manager

cmarketprice's People

Contributors

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