In the project directory, you can run:
-
Run
npm install
-
Run
npm run serve
to run the server -
Run
npm run start
to run the client
- This app covers all the points listed in description
- There are four routes configured for this app:
- /check-credit
- /customers
- /customers/:id'
- /credit-cards'
- credit_cards.json was been created and is served from express server
- customers.json was created and is served from express server
- Credit cards contain
eligibility rules
that allows for easy defining of new rules for card. - Each card have validators injected that perform number of validation rules agains customer.
- New credit cards can be easily added, they must follow specified interface.
- Each entity has its own parser from dto to domain model.
- When new rules are needed, new rule would need to be added. Check
EmploymentStatusRule
orIncomeRule
.- This could be more generic, so that rule can be tested agains any Customer property.
- App is fully responsive
- This app was created with simple project starter based on create-react-app.
- Due to time limitations I had to help support myself with UI library (react-library) to speed up development.
- Formik was used for form validation and submission.
- Yup was used to define validation schema for Formik.
- Scss support was added to the project to enable CSS preprocessing and keep consistency in the app.
- I have recently created a little project starter on github and this application is based on it.
- Due to time limitations, tests were not added to this tech test. I am happy to add them if needed.
- This is not production ready solution, there are still improvements to be done, especially around UI/UX.
- In order to support internationalization
i18n
could have been used- This would allow supporting mutliple languages
- This would allow for all static text in the application to be defined in a single file (Better maintainability)