GithubHelp home page GithubHelp logo

hi_shepherd's Introduction

🚧 Shepherd Broker Dashboard

This simple, full-stack web application allows a broker to complete and submit an insurance application for a client.

shepherd

Demo (Local):

Note: This application was developed on a machine using an ARM processor, which may lead to unexpected issues during building on Linux/other systems.

Pre-Installation System Requirements:

  • Git (v2)
  • npm (v6)
  • Node.js (v16)
  • PostgreSQL (v13)

Installation:

  1. In your terminal git clone https://github.com/foodforcode/hi_shepherd.git to clone repo.
  2. Navigate to root directory hi_shepherd/
  3. In your terminal psql -d test -a -f ./database/schema.sql to create PostgreSQL database and tables.
  4. In your terminal npm install to install all dependencies.
  5. In your terminal npm start to start server and build webpack bundle.

View in Browser:

Navigate to localhost:3000 in your browser to view and use dashboard.

Completed Requirements:

  1. βœ… A simple web application for a broker to use.

    A simple, no-frills application that is intuitive and simple to use.

  2. βœ… A broker lands on the home page and is shown 2 application options. These options are coming from an API.

    An API is providing 2 application options to the broker.

  3. βœ… A broker clicks on an option and is shown a form with the respective fields.

    Upon clicking, a broker is shown the field inputs for the respective form.

  4. βœ… The broker submits the form upon validation and completion and the data is saved.

    The inputs are validated in the front end using required statements and type attributes.

    The data is saved to a PostgreSQL database and prevented from sql injection attacks.

    An alert is presented to display successful submission or error.

    Upon successful submission, a disabled form is displayed to present application information.

  5. βœ… The broker is allowed to submit a form only if they have an β€œauth” cookie with the value β€œshepherd”.

    Form submit only allowed for brokers authorized with headers { cookie: shepherd }

  6. βœ… A working localhost demo.

    The demo application can be tested locally at localhost:3000

  • πŸ’° Bonus:
    • Node.js

    • Express.js

    • React.js

    • Saving data to PostgreSQL database

    • Protection against SQL injection attacks

    • Peep the tab of the web application for a familiar favicon!

    • Lighthouse labs performance:

      Screen Shot 2021-09-19 at 22 41 11 Screen Shot 2021-09-19 at 22 48 35

πŸ— Architecture:

  • Front end:

React w/ hooks: A modern, popular front end framework used to create this Single Page Application that allows for seamless re-rendering of data without reloading. Hooks allow for the simple state management this project required without use of additional libraries. React is fast and highly scalable.

Reactstrap powered by Bootstrap: A toolkit for building mobile-first sites with responsive components. Provides increased accesibility which is a standard requirement. Great for getting this mvp completed in a timely manner and keep components uniform. Easily integrates with preprocessors.

Axios: A promise-based library used for retreiving application options and forms and sending form data.

  • Back end:

Node/Express server: A powerful, lighweight, non-blocking server to handle requests incoming HTTP request for mail and server static assests. Highly scalable to serve other data and make third party API or database requests.

Nodemon: A utility used for ease in development by restarting application upon file changes. Efficient for viewing changes during development.

node-postgres & pg-format: Modules for interfacing with postgreSQL database and writing dyanamic query strings. Used to keep backend code dry in the context of these unique, dynamic forms and protect against sql injections.

  • Build tools:

Webpack: This webpack is a custom configuration for this broker dashboard, chosen over Create React App for customizability and scalability. Webpack with Babel is used as a compiler, transpiler, and bundler to allow browers to read jsx code in one convenient, but large, bundle. Webpack can easily be configured for the addition of Sass and other libraries as needed during scaling.

πŸ“š Tech Stack:

Future Development:

  1. Add test coverage
  2. Add PDF generation upon form submission
  3. Add React Router for url 'redirect' to form pages
  4. Implement TypeScript for type checking
  5. Implement GraphQL: Provides more flexiblity to fetch data Allows additional type safety Prevents overfetching Limits bandwith and waterfall requests for faster loads particularly on mobile
  6. Add regex for increased validation
  7. Add additional UI design and micro-interactions
  8. Add true authorization for brokers

hi_shepherd's People

Contributors

foodforcode avatar

Forkers

mmahalwy

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.