If you have cloned this repository or pulled the docker image, the app will be available locally at http://localhost:3000 upon following the above steps
This app utilises Next.js and was bootstrapped with create-next-app.
-- The page heading and USP messages are requested and rendered on the server.
-- The location data request has been wrapped in an API layer and its response has been modified slightly. Try visiting /api/getLocations?search_term=Manchester.
-- The form will submit, navigating you to a /results route that is protected by middleware.
-- The app includes a very basic i18n configuration, allowing you to switch between en-GB and ar-AE.
Heading and USP data is being served via Contentful.
-- These requests are localized and will return english or arabic depending on your current locale.
Styling has been achieved using TailwindCSS combined with sass.
-- I have also added a plugin for logical properties to ensure the layout is always correct when switching between rtl/ltr directions.
Some components and Utils have been tested using Jest and Testing Library
Given more time, there are several things I'd have done, or done differently:
Some components are relatively complex and could have done with more abstraction.
I am a strong advocate for testing everything I do - I would have liked to have added a complete suite of unit, integration and e2e tests to my application using Jest, React Testing Library and Cypress.
-- While TDD is still quite new to me, I did follow the Red Green Refactor principle for the Location Finder component - This is the main reason for my task taking a little longer than expected, I thought it would be a good opportunity to learn.
I would have liked to have implemented Husky and an accompanying pipeline to enforce typechecking, code formatting, test coverage and builds prior to commit or branch merges.
While wiring up the form was not part of the acceptance criteria, I would like to mention that I have used date/time input elements that have retained their native icons - This is more in-line with the current Rental Cars UI, though there are known issues in rtl layouts with these elements as they do not flip as expected.