This code challenge aims to evaluate your skills in API development, database design, and the Laravel framework. The provided Laravel application comprises two main entities: Doctors and Tests. The current data structure has redundant information about doctors and/or clinics across multiple rows. Your task is to normalize the data by splitting it into two tables: a doctors table containing information about individual doctors, and a clinics table containing information about individual clinics. Note that multiple doctors can work at the same clinic and a clinic can contain multiple doctors.
Additionally, you need to modify the user interface to match the new database structure.
Lastly, the doctor and clinic information is inconsistent due to multiple users' input over time. Develop tools to merge duplicate doctors and clinics.
The current application includes:
- A Laravel project named "code-challenge."
- A SQLite database with preseeded Doctors and Tasks.
- Controllers, views, form requests, and routes for Doctors and Tests.
Follow these steps to run the application:
- Ensure PHP, Composer, and the SQLite extension are installed on your system.
- Clone this repository. Do not fork it!
- Run
composer installto install required dependencies. - Run
php artisan serveto start the Laravel development server. - Run
yarn devto run Vite and compile Tailwind resources. - Visit the application in your browser at http://127.0.0.1:8000/doctors or http://127.0.0.1:8000/tests.
Make an update to the application by completing the following tasks:
- Normalize the
doctorstable by splitting it into two tables:- A table containing information about doctors.
- A table containing information about clinics.
- Maintain the relationship between the new tables and tests, ensuring the tests index displays the same information after your changes.
- Create a user interface to perform the following actions:
- Merge duplicate doctors.
- Merge duplicate clinics.
- The .env file is committed to Git. Under normal circumstances, this would be avoided.
- The authentication system can be ignored.
- Limit your work to 4 hours.
- Document any assumptions you make.
- You may use any libraries you prefer, but be prepared to justify your choices.
- Your user interface implementation will be judged on ease of use rather than aesthetics, as this is not a graphic design challenge.
- Implement any additional improvements you deem necessary.
- Develop a page that recommends likely duplicates and allows users to merge them.
- Break down the clinic_address into multiple columns and geocode the location.
Submit your solution, along with any additional documentation or explanations, to warren@eugenelabs.com.
Good luck and enjoy the challenge!