{"id":20787692,"url":"https://github.com/stemount/na-test","last_synced_at":"2025-09-12T21:14:49.492Z","repository":{"id":37518977,"uuid":"128352828","full_name":"stemount/na-test","owner":"stemount","description":null,"archived":false,"fork":false,"pushed_at":"2022-12-08T18:58:24.000Z","size":2038,"stargazers_count":0,"open_issues_count":28,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-06T14:42:25.181Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/stemount.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-04-06T06:02:15.000Z","updated_at":"2018-04-06T08:40:55.000Z","dependencies_parsed_at":"2023-01-25T15:31:34.641Z","dependency_job_id":null,"html_url":"https://github.com/stemount/na-test","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/stemount/na-test","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stemount%2Fna-test","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stemount%2Fna-test/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stemount%2Fna-test/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stemount%2Fna-test/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stemount","download_url":"https://codeload.github.com/stemount/na-test/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stemount%2Fna-test/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274879257,"owners_count":25367095,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-12T02:00:09.324Z","response_time":60,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-17T14:59:14.185Z","updated_at":"2025-09-12T21:14:49.453Z","avatar_url":"https://github.com/stemount.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# NoAgent API Code Test\n\nIn this repo you will find my code test application, I wanted to spend some quality time on implementing the API.\n\nThe brief says to require `Address Line 1, Address Line 2, City, Postcode` however `Address Line 2` is nullable/not required as it is only essential to have the first line address and postcode for the Geocoder.\n\n#### How to set up the project\n- `git clone git@github.com:stemount/na-test.git ~/na-test`\n- copy `.env` file into project directory\n- `vagrant up`\n\nThat is it, it will provision the site it will be available at [http://noagent-test](http://noagent-test).\n\n\n#### Dev tasks\n- [x] Install and configure Laravel and Homestead.\n- [x] Create model for properties\n- [x] Create migration scripts to init project.\n- [x] Find way for ORM to support UUIDs to make properties table more portable e.g. not restricted by an `id` index.\n- [x] Version API e.g. `/api/v1`\n- [x] Create custom google geocoder service.\n\n#### Endpoints\n\n| Method | URI | API Requirement |\n| ------ | --- | ----------- |\n| `GET/HEAD` | `/` | Nothing special, version. |\n| `GET/HEAD` | `/properties` | List all properties. |\n| `POST` | `/properties` | Add a property, requiring only the address. |\n| `GET/HEAD` | `/properies/{property}` | Retrieve a specific property. |\n\nThere is a file named `NoAgent API Code Test.postman_collection.json` to import into _Postman_ REST client with the three endpoints.\n\n![Postman endpoint screenshot](misc/postman.png)\n\n#### Notes\n- **#ORMGate** No automatic model configuration still in the ORM!\n- **Google Geocoder** Using a HTTP library for google maps was a fun task, it ends up pretty shocking code when not using a library 😅.\n- **Homestead w/ Virtualbox Shared Folders** API requests take ~500ms to respond because of the slow.\nfile storage loading all the PHP includes. They should really be under 100ms at the very least!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstemount%2Fna-test","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstemount%2Fna-test","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstemount%2Fna-test/lists"}