-
Notifications
You must be signed in to change notification settings - Fork 0
PHP Backend challenge for a remote company
License
carlosvinicius/solar
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Project Assessment: Cross-Solar is a backend web application created in a hurry by a startup company called “Green Energy Analytics” in Texas - USA. This application collects energy analytics data for solar panels every hour. Notes: - The project accepts data for registered panels only, and to register a panel, a serial number along with latitude and longitude is required. The serial number must be exactly 16 characters in length (for ex. AAAA1111BBBB2222); latitude and longitude should contain 6 decimal places and must have valid values within latitude range (-90 to 90) and longitude range (-180 to 180) respectively. - The frontend application is excluded from the current scope. It is a separate, fully-functional application handled by another team, and we do not want to modify it. Tasks: 1) The frontend team want to display a panel's historical data in a chart, in which each point represents electricity generated by this panel each day [sum, min, max, average of hourly kilowatt values], up to the end of the previous day. Your goal is to implement the backend part of this task. The API specifications are already there in the code as agreed with the frontend team. 2) There are a few bugs in the application that we would like you to fix. Even though the project might not be in a great structure, please do not spend your valuable time on structural modifications - just focus on fixing the bugs. 3) Increase unit test coverage to reach 90%, achieving more than 90% will only consume your valuable time without extra score. PLEASE NOTE THAT ALL OF THE TASKS LISTED ABOVE ARE MANDATORY. We will evaluate your submission on the following parameters: - Implementation of new feature - Bug fixes - Unit test coverage Prerequisites: * PHP >= 7 * Laravel >= 5.6 * MySQL >= 5.6 * Xdebug * Any IDE * Any MySQL client Setup instructions: - Add your local database password to the .env file. - Create your database using your prefered MySQL client - In the Terminal / Command Line, navigate to this directory (The directory containing Readme.txt) and run the following commands: * composer install * php artisan migrate * php artisan serve - You can then access the api using your prefered toolset (Postman, Curl, etc). Testing instructions: - Add your local database password to the .env.testing file. - Create your testing database using your prefered MySQL client - In the Terminal / Command Line, navigate to this directory (The directory containing Readme.txt) and run the following commands: * composer install * php artisan migrate --env=testing * vendor/bin/phpunit --coverage-html /tmp/report Evaluation: Please make sure to complete the following steps before submitting your completed project: 1) Make sure that you have run the unit tests, there are no errors and any new dependencies are specified/included. 2) Zip your project folder and name it 'cross-solar-php-<YOUR-FULL-NAME>.zip'. 3) Store your file in a shared location where the Crossover team can access and download it for evaluation. Do not forget to paste the shared link in the answer field of this question.
About
PHP Backend challenge for a remote company
Resources
License
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published