In this code challenge you'll need to create a simple admin panel from scratch. It would need to have a single table view to list insurance policies showcasing all the various field they may have.
The frontend part would communicate with the backend through a GraphQL API. You need to implement both.
We've generated some boilerplate for you to get started.
- How you write idiomatic code.
- How you deal with UI/UX.
- How you navigate the requirements.
- How you test & write testable code.
- How you package the code.
- How you deal with the security concerns.
- How you communicate with your fellow programmers.
- On the backend, change the GraphQL schema to reflect the Data structure
- On the frontend, fetch the data returned by the GraphQL endpoint with the help of the Apollo client
- On the frontend, display all the data returned by the endpoint in a table with the help of tailwindcss
- At least several fields should be editable in place
- The table should have pagination and sorting on each of the columns
- (Bonus) Add a text search input
- (Bonus) Let the admin filter policies by insurance type or other fields
- (Bonus) Package the app with Docker
- (Bonus) Authenticate admins using login/password
- (Bonus) Create more screens (e.g. customer profile, policy page…)
To make it all work, you have to define a GraphQL schema first. No need to back it with a real database, however this would make sense to demonstrate the "edit" function. Each policy should have at least the following fields:
fields | type | comment |
---|---|---|
customer | Customer | Object holding the customer's informations |
provider | string | Name of the provider (Allianz, AXA…) |
insurance type | InsuranceType | Type of the insurance (Liability, Household…) |
status | PolicyStatus | Status of the insurance (Active, Cancelled) |
policyNumber | string | Used to identify the policy |
startDate | date | Date when the policy should start |
endDate | date | Date when the policy ends |
createdAt | date | Date when the record was created |
fields | type | comment |
---|---|---|
firstName | string | Customer’s first name |
lastName | string | Customer’s last name |
dateOfBirth | date | Customer’s date of birth |
InsuranceType can be of Liability
, Household
, Health
PolicyStatus can be of Active
, Pending
, Cancelled
and Dropped out