Giter Site home page Giter Site logo

adriangeorgem / home-insurance-quote Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 344 KB

Home Insurance Quote Summary Page - A ReactJS-based application that empowers users to customize their home insurance coverage by adding or removing optional extras. Real-time price updates, responsive design, and a user-friendly interface provide an enhanced insurance shopping experience.

Home Page: https://home-insurance-quote.vercel.app

HTML 15.14% JavaScript 58.47% CSS 26.40%

home-insurance-quote's Introduction

Home Insurance Quote Summary Page ๐Ÿ 

Project Overview ๐Ÿ”

This project is a ReactJS-based application designed for a Home Insurance product. It features a dynamic quote summary page that allows users to personalize their insurance coverage by adding or removing optional extras. The core functionality revolves around a user-friendly interface that enables users to interact with the quote in real-time, providing immediate feedback on pricing and selections.

Approach and Key Components ๐ŸŒŸ

Component Design ๐ŸŽจ

  • QuoteSummary Component: Designed to provide users with a personalized greeting and a summary of their base insurance quote, including reference and coverage start date.

  • PriceDisplay Component: Implemented to dynamically display the price of the insurance quote, updating in real-time as users select or deselect extras. Includes the functionality to toggle between monthly and annual payment options.

  • AddonItem Component: Each addon is represented by an AddonItem component, allowing users to add or remove extras from their quote. The component visually indicates whether an extra is selected and contributes to the overall price calculation.

State Management ๐Ÿ“Š

  • Local State Hooks: Utilized useState for managing the state within components, ensuring that the UI is consistent with the user's interactions.

  • Event Handling: Adopted a straightforward approach to event handling for user actions, such as selecting extras and toggling between payment frequencies.

API Integration ๐ŸŒ

  • API Service: Created an apiService to interact with the provided RESTful API, handling asynchronous requests for fetching quote data and available addons.

  • Error Handling: Incorporated error handling to manage any issues during API interaction, ensuring the application's robustness.

Responsiveness ๐Ÿ“ฑ

  • CSS Modules: Leveraged CSS Modules for component-specific styling, allowing for a clean separation of concerns and avoiding style conflicts.

  • Media Queries: Implemented responsive design using media queries, ensuring the application's layout and functionality are maintained across different device sizes.

Development Strategy ๐Ÿš€

  • Incremental Development: Followed an incremental development approach, focusing on one component at a time to ensure each meets its intended functionality before moving on to the next.

  • Code Modularity: Emphasized creating reusable components and utility functions to keep the code DRY (Don't Repeat Yourself) and enhance readability and maintainability.

Testing and Quality Assurance ๐Ÿงช

  • Manual Testing: Conducted thorough manual testing to verify that each acceptance criterion was met and that the user experience was seamless.

  • Responsive Testing: Tested the application across multiple devices and viewport sizes to ensure compatibility and usability.

Challenges and Resolutions ๐Ÿ› ๏ธ

  • UI Alignment: Encountered challenges in ensuring consistent alignment of elements across components, which was resolved through careful CSS flexbox adjustments and setting common height values.

  • State Synchronization: Ensured that the state across components was synchronized, particularly when reflecting selected extras and the total price.

Future Improvements ๐Ÿšง

  • Accessibility: Plan to improve accessibility by adding ARIA attributes and ensuring keyboard navigation is fully supported.

  • State Management: Explore integrating a more robust state management solution, such as Redux or Context API, to handle the state more efficiently as the application scales.

  • Unit Testing: Implement unit tests with Jest and React Testing Library to cover critical functions and component renders.

Setup and Installation โš™๏ธ

To get the application up and running on your local machine:

npm install
npm run json-server

Open a new terminal window and run the following command:

npm start

Mock API

To get the details of the quote and addons, you'll need to run the JSON server by executing the following command: This will generate the mocked data and host the API on port 3001.

To get the details of the quote, please use the following endpoint:

http://localhost:3001/quote

Likewise, to get all available addons, please use:

http://localhost:3001/addons

Full documentation for JSON Server is supplied here: JSON Server GitHub.


## Contributions & Feedback ๐Ÿ‘

Feel free to contribute, open issues, and provide feedback to improve the application.

home-insurance-quote's People

Contributors

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