Challenge Overview
Challenge Overview
In this challenge we are building PHP application with frontend pages that demonstrate usages of multiple functionality as outlined below.
Challenge Requirement
You will address the following in this challenge :
Backend Requirements
-
-
Build a php controller that communicate with URDB API.
-
The code represents how to retrieve list of Utilities/Companies from URDB API.
-
Input parameter to the code will be zip code.
-
Add validation to input zip code. It should be valid US Zip Code.
-
Use this This API, the zip code will be passed in the API call.
-
The api does not directly return the utilities/companies. You need to read utility field from each item, remove duplicate and return the response.
-
api key should be configured.
-
-
The response should be in json format with list of utilities and companies.
-
API key should be configurable.
-
API query example :
-
-
GreenButton XML Uploader
-
Build a php controller that accepts a GreenButton XML file, validate it, and store it locally.
-
The code should accepts only XML files, and should only one file is allowed to be uploaded at a time
-
The uploaded file should be valid GreenButton file, use the greenbutton xsd file to validate the xml.
-
The files will be stored in backend (locally). The folder path should be configurable.
-
Response should be a json response with result of the uploaded file.
-
If error happened, a message with reason should be set in the response.
-
-
Frontend Pages Requirements
General Notes
-
All pages should use bootstrap UI components and AngularJS framework
-
Create a single layout with clear navigation between pages. Basically, a header with link to pages will be sufficient (default bootstrap theme will do that).
-
Pages should be responsive
URDB Page
-
Page will ask for zip code (should be valid US zip code)
-
When user click submit it will make a call to the backend.
-
The response should render the companies in a list/table.
GreenButton Upload Page
This page will allow user to upload GreenButton XML Data :
-
The page will contain a form to upload greenbutton file, only one file is allowed to be uploaded at a time.
-
During upload display progress bar.
-
-
Display result of response
OpenPV Page
OpenPV disallow CORS so you need to implement php code that accepts zip code (must be valid US zip code) and return the response as json to the frontend.
Using This API create a simple page that render Google Map with installation from the api response :
-
Page will ask for zip code (should be valid US zip code)
-
When user click submit it will make a call to the API from Javascript directly.
-
The response should render google map and drop markers for installers, use the details of each installs from response to be used on marker display popup.
-
Implement grid-based clustering for the map.
-
-
The code that interact with the API should be build as a reusable JS library or function. Don’t mix the code with the code that render the map or html.
-
Query examples :
Apache Server and PHP Web Framework
-
It’s up to you to pick the php web framework to serve the frontend pages. BUT the php code functionality should be decoupled from the the framework you are using. Client should be able to reuse the code anywhere.
-
Provide setup instructions to host the code in Apache web server.
Technology
-
Php
-
AngularJS
- Bootstrap
Final Submission Guidelines
Deliverable
-
Source code that address the requirement.
- Deployment guide document.