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

valle-web-client-mvp

v0.1.0

Published

> Scalable React APP architecture with Flux and PRPL pattern.

Downloads

3

Readme

Valle Web Client MVP

Scalable React APP architecture with Flux and PRPL pattern.

Features

  • Custom webpack configs for production WPO.
  • Single Page App.
  • Client side .env file for all API path.
  • Single Page App.
  • Easy multiple shells with custom routers.
  • Immutable data structure by Immutable.js.
  • Auth validations.
  • Fake RESTFull server for development.
  • Complete HTTP error handler.
  • Custom hooks for fetch data.
  • Custom hook for input data.
  • Custom hook for keyboard controls.
  • Async loaders for fetch data.
  • Flux architecture.
    • Redux for data management.
    • Redux Thunk for action creators.
    • Generic async actions for CRUD any data with any RESTFull API.
    • Generic reducers for for CRUD any data with any RESTFull API.
  • Custom PRPL pattern.
    • Push critical dependencies.
    • Render a minimal bundle.
    • Pre-push with Service Workers.
    • Lazy loading all code splitted bundles.
  • Offline session data with sessionStorage.
  • Offline user data with localStorage.
  • Offline complex data with indexdDB.
  • Unit tests and coverage with Jest and Enzyme.
  • Code style guide with ESLint for validate the style and code quality.
  • Robust CSS architecture.
    • Modularized with CSS Loader.
    • CSS Lint for performance and cross borwser validations.
    • BEM methodology for naming conventions.
    • CSScomb for autoformat all CSS files.
  • Webcomponents with webpack loader.
  • SVG with webpack loader.
  • Custom themes with CSS custom properties.
  • Dynamic title with react helmet.
  • All components docs with storybook.
  • Custom 404 page.
  • Custom ENV for DEBUG.

Concepts

Architecture

A Flux based architecture using Redux for data flow management, Redux Thunk for action creators and localstorage for client side database.

Data flow

Custom PRPL pattern.

A custom PRPL pattern, using multiple App shells and code splitting.

Fetch flow

Sources:

Development

Getting started

Clone this repository and install its dependencies:

$ git clone https://github.com/valleweb/valle-web-client-mvp.git
$ cd valle-web-client-mvp
$ yarn

Configure your environment following the .env.example file.

Build / Start App

Builds and start the App (with local server and livereload):

$ yarn start

Run fake RESTFull API with JWT

Go to ./server folder and install its dependencies:

$ cd server
$ yarn

Run fake server with auth:

$ yarn start

See all docs

Folders structure

All files and folders:

.
├── README.md
├── CONTRIBUTING.md
├── scripts/
├── .storybook/
├── .out/
├── .dist/
├── config/
├── docs/
├── server/
├── tests/
|   ├──setup/
|   └──components/
|       ├── atoms/
|       ├── molecules/
|       └── organisms/
├── stories/
|   ├── atoms/
|   ├── molecules/
|   ├── organisms/
|   ├── templates/
|   └── pages/
├── storybook/
├── src/
|   ├── assets/
|   |   ├── icons/
|   |   |── styles/
|   |   |   ├── components/
|   |   |   |   ├── atoms/
|   |   |   |   ├── molecules/
|   |   |   |   └── organisms/
|   |   |   ├── layouts/
|   |   |   ├── shell/
|   |   |   ├── views/
|   |   |   └── global.css
|   |   └── scripts/
|   |       ├── actionCreators/
|   |       |   ├── auth/
|   |       |   ├── theme/
|   |       |   └── generic/
|   |       ├── components/
|   |       |   ├── atoms/
|   |       |   ├── molecules/
|   |       |   └── organisms/
|   |       ├── config/
|   |       ├── db/
|   |       ├── helpers/
|   |       ├── hooks/
|   |       ├── shell/
|   |       |   ├── layouts/
|   |       |   |   ├── AppLayout.js
|   |       |   |   └── LoginLayout.js
|   |       |   ├── routes/
|   |       |   |   ├── AppRoute.js
|   |       |   |   └── LoginRoute.js
|   |       |   └── Shell.js
|   |       ├── store/
|   |       |   ├── reducers/
|   |       |   |   ├── auth.js
|   |       |   |   ├── notify.js
|   |       |   |   └── generic.js
|   |       |   └── store.js
|   |       ├── views/
|   |       └── index.js
|   ├── index.html
|   └── serviceWorkers.js
├── .babelrc
├── .csscomb.json
├── .csslintc
├── .env.example
├── .eslintrc
├── .editorconfig
├── .gitignore
├── commitlint.config.js
├── yarn.lock
├── jest.config.js
├── Dockerfile
└── package.json

API comunication data patterns

All app communication are based in json data. All json patterns are individual documented and follow the semantic version.

Login flow

Code Style

Follow the Valle Web code style guide.

All code style are automatic validate with ESLint and CSSLint

The CSS code are automatic formated by CSScomb

Tests

Run all unit tests:

$ yarn test

All automatic tasks

  • yarn test - Run unit tests.
  • test:watch - Watch files for run tests.
  • test:cover - Generate test coverage results.
  • test:snap - Generate new jest snapshots.
  • lint:js - Run javascript / JSX ESLint.
  • lint:css - Run CSS lint.
  • lint:format - Autoformat CSS with CSScomb.
  • lint - Run all lint rules.
  • check - Check for outdated, incorrect, and unused dependencies.
  • start-storybook - Start the storybook docs at local server.
  • build-storybook - Build storybook files.
  • deploy-storybook - SH for deploy the build files for a dev server using scp.
  • start - Build and start a local server with livereload.
  • build:docker - Build a local nginx/node with Docker.
  • start:docker - Start a local nginx/node with Docker.
  • server - Start local server.
  • build - Build the App.
  • analyze - Analyze the webpack bundle.
  • clean - SH for clean the dev server using ssh.
  • deploy - SH for deploy the build files for a dev server using scp.

Versioning

To keep better organization of releases we follow the Semantic Versioning 2.0.0 guidelines.

Commiting

Commit naming rules by @commitlint/config-conventional.

Contributing

Want to contribute? Follow these recommendations.

History

See Releases for detailed changelog.