Code Monkey home page Code Monkey logo

rhte-2019-hack-ui's Introduction

RHTE 2019 RHMI Hackathon Template UI

This is a template repository used to build a UI to render results fetched from the Junction & Parking Meters API built as part of the Solution Pattern here.

This repository is utilises Patternfly 4 for building the UI. It was generated from the on the Patternfly React Seed.

Quickstart

The following steps will launch a development server that serves the frontend on http://localhost:9000. This also includes endpoints to fetch meter and junction data using http://localhost:9000/meters and http://localhost:9000/junctions.

# ensure you have yarn installled globally
npm install yarn -g

# clone the project (if developing locally)
git clone https://github.com/evanshortiss/rhte-2019-hackathon-on-rhmi-template-ui

# navigate into the project directory
cd rhte-2019-hackathon-on-rhmi-ui

# create an environment variables file (.env)
# replace the stub Google Map API key in .env with a real one
cp .env.example .env

# create JSON files with to hold API data
# *you* will need to paste expected API responses in these
touch mock-api-server/api-data/junctions.json
touch mock-api-server/api-data/meters.json

# install dependencies
yarn

yarn build # build the project
yarn start # start the development server

Development Scripts

Install development/build dependencies yarn

Start the development server yarn start:dev

Run a production build MAPS_API_KEY=$YOUR_GMAPS_API_KEY yarn build

Run the test suite yarn test

Run the linter yarn lint

Run the code formatter yarn format

Launch a tool to inspect the bundle size yarn bundle-profile:analyze

Deployment

You can deploy this using the Node.js s2i builder. This will invoke the yarn build script, then use the server.js when running on OpenShift.

When performing a build the MAPS_API_KEY environment variable needs to set in the build container.

Configurations

Code Quality Tools

  • For accessibility compliance, we use react-axe
  • To keep our bundle size in check, we use webpack-bundle-analyzer
  • To keep our code formatting in check, we use prettier
  • To keep our code logic and test coverage in check, we use jest

rhte-2019-hack-ui's People

Contributors

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