Thank you for applying at Feather.
We'll use this project on our pair programming interview. Follow the instructions below to get started.
- Make sure you have Docker installed on your machine
- Set up the environment variables
cp .env.example .env
- Build and run the Docker image:
docker compose up --build
- On a new terminal, run the migration and the seed script to add initial data:
docker compose exec backend yarn prisma migrate dev
docker compose exec backend yarn prisma db seed
- That’s it!
You can see the app on http://localhost:3000
The API should be running on http://localhost:4000
** Note ** If you want to install new dependencies, you'll have to do it inside the docker container. To do that, you can use the following command:
# On the root directory of the project
docker compose exec {backend OR frontend} yarn add {the_name_of_the_package}
Make sure to replace the values between the curly braces {}
with the correct ones.
After following the Getting started guide, the backend should be running on port 4000
. The backend currently have one endpoint:
Request type | Path | Query Params | Example |
---|---|---|---|
GET |
/policies |
search |
/policies?search=BARMER |
Feel free to update or add more endpoints to accommodate or improve your solution.
fields | type | comment |
---|---|---|
id | string | Used to identify the policy |
customer | Customer | Object holding the customer's informations |
provider | string | Name of the provider (Allianz, AXA…) |
insuranceType | InsuranceType | Type of the insurance (Liability, Household…) |
status | PolicyStatus | Status of the insurance (Active, Cancelled) |
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 |
---|---|---|
id | uuid | Used to identify the customer |
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