npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

gs-challenge

v1.0.0

Published

Boilerplate to build a full stack web application using React, Node.js, Express and Webpack.

Downloads

3

Readme

GS - Car Fleet Management (CFM)

Tested environment config

  • Node 10.6.0
  • NPM 6.1.0

Run the app

  • Rename env.sample file to .env
  • npm install
  • npm run dev (should auto-open a tab)
  • Otherwise, localhost:4000

Run the tests

  • npm run test

Warning: "extensive" thought process documented below.

First thoughts

Given the nature of the challenge, my first goal is to spin up an environment that allows me to begin coding in the preferred frameworks.

Tools and utils

When starting a new project, after looking at the requirements, getting a handle on the scope and establishing a framework, my next thought is: "which tools and utilities do I want include in the project to ensure my success."

  • Given it's a fairly small project, I will forego Redux and utilize React as much as possible (hooks, etc.)
  • Reselect: to provide an easy way to return data from the store
  • Immutable: lots of helpers and ensuring ... immutability
  • Jest: to handle unit testing and snapshots
  • StyledComponents: because I love them, overall
    • Let's talk CSS Modules pros/cons later

Setup cont.

  • Install tools/utilities and wire up, configs, etc.
  • Think through file organization based on requirements
    • Where do I want shared/helpers to live?
    • How big is the app going to get?
    • What things have I done in the past that I don't want to ever experience again?

General process/thinking

  • Review requirements and establish a "mock state tree" that meets said requirements
  • Enable ECMAScript 6 Imports in Node.JS to handle local store for API
    • ESM to the rescue!

(Rough) Technical Specification

Note: numeric values are based on agile's fibonacci scale, to determine estimated time needed to complete a given task

  • (3) Define and create a RESTful interface

    • See requirements document
    • Node/Express/Mongoose/MongoDB
  • (2) Test and seed the data

    • Write a seed method to populate the vehicle data (or just use MongoDB directly)
    • Write method to insert a "random" set of arbitrary objects into each vehicle's "claimHistory" property
  • (3) Add an aggregate GET method to REST

    • Use Mongoose, to return an aggregate of the following vehicle properties:
      • Total count
      • Count by year
      • Total purchase price
  • (2) Write a JavaScript version of the aggregate method

    • See requirements document
    • Do virtually the same thing as the Mongoose aggregate method above
      • Return aggregate data for the properties listed above in the client when requested
  • (2) Wire up Redux and fetch the newly seeded data