Code Monkey home page Code Monkey logo

mdn-compat-data-explorer's Introduction

MDN Browser Compatibility Data Explorer

Build Status

This is a Rails app that lets the user explore the browser compatibility data that MDN is collecting in the browser-compat-data repo.

Development

Running the application locally

You'll need:

  • Postgres 10 (9.6 should also work)
  • Ruby 2.5.x
  • Node.js 9.x
  • Yarn
  • Graphviz

Run the following commands:

  1. gem install bundler
  2. bundle install
  3. yarn install
  4. bundle exec rails db:create
  5. bundle exec rails db:migrate
  6. bundle exec rails s

With that, the site should be up at localhost:3000.

Updating the mdn-browser-compat-data package

You can update the mdn-browser-compat-data package using bundle exec rake update:update_mdn_package. This Rake task will walk you through the steps of updating the package. Alternatively, you can update it manually, described below.

You can update the mdn-browser-compat-data package manually by doing the following:

  1. Edit the mdn-browser-compat-data package version in package.json and run yarn install.
  2. Update the config.mdn_bcd_version variable in config/application.rb to the current version.
  3. Run node lib/build.js to regenerate the public/data.json file.
  4. Commit these changes and open a pull request.

Updating the database

You can update the database (where all the data is stored) by running bundle exec rake db:seed. Note that this will delete the database and fill it with whatever data is in public/data.json based on db/seeds.rb.

The application essentially uses a static data set. It uses a database simply because I wanted to learn more about databases and wanted an easier means of querying the data.

Updating the database with test data

You can use data from public/data-test.json by running USE_TEST_DATA=true bundle exec rake db:seed. This is useful for ensuring accuracy, since you can manipulate the JSON and will know, e.g. how many features should be listed as true.

Deployment

The live site currently uses Heroku, and is available at mdn-compat-data-explorer.herokuapp.com.

Deployment involves the following:

  • Deploy the current version of the master branch.
  • Run bundle exec rake db:migrate and bundle exec rake db:seed from the Heroku Web Console or with the Heroku CLI.

This should update the site to the current codebase and recreate the database from the db/seeds.rb file.

Dependencies

This project uses:

To view all dependencies used in this project, see the Gemfile and package.json.

Architecture

ERD

Notes

Resources

mdn-compat-data-explorer's People

Contributors

connorshea avatar dependabot-support avatar dependabot[bot] 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.