Coder Social home page Coder Social logo

hrtzc's Introduction

hrtzc

hrtzc is a simple webpage to quickly compare different heart rate training zones models.

  • experiment with mobile-first page design
  • modern web dev tooling instead of dropping a couple of CDN script tags

Usage

The page is available here. It's built and deployed using GitHub Actions and makes use of GitHub Pages.

Development

Some useful one-liners are available as package scripts; run npm run to see a list.

Tech stack

Built with Chart.js, Bootstrap, and Vite + PurgeCSS.

Some notes on how I arrived at this combination:

  • Popularity - I'm not a web developer (and have no interest in becoming one) so I chose Bootstrap and Vite because they are popular and look like will be around for a while. I had an OK time figuring out Bootstrap's mobile-first approach, and I don't have enough experience with web build tools to tell if Vite was the right choice.
  • Power and comfort - I would have loved to use this project to learn D3: it's a simple stacked horizontal bar chart and the dataset recalculation is trivial. Still, I felt like I would need to invest a decent chunk of time before I could produce something close to what Chart.js offers out-of-the-box. I instead chose to experiment with another part of my toolbox.

Web build tools

Part of this project was bringing in a build tool (Vite) to try and improve page performance. A couple of metrics were recorded before and after restructuring the project using the Lighthouse Firefox plugin on the GitHub Pages deployment:

Payload FCP (mobile) FCP (desktop) TBT (mobile) TBT (desktop)
before 113 KiB 1.8 s 0.6 s 170 ms 20 ms
Vite 73 KiB 1.5 s 0.5 s 50 ms 0 ms
+ PurgeCSS 60 KiB 1.3 s 0.4 s 10 ms 0 ms

However, it turns out there's a lot of building that Vite is not doing -- I achieved an 89% size reduction of the CSS bundle by using PurgeCSS.

hrtzc's People

Contributors

tlgs avatar

Stargazers

 avatar  avatar

Watchers

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