{"id":15569385,"url":"https://github.com/dwolfhub/spartz-sample","last_synced_at":"2026-04-29T03:03:26.280Z","repository":{"id":15801837,"uuid":"18541282","full_name":"dwolfhub/spartz-sample","owner":"dwolfhub","description":"Sparts Sample","archived":false,"fork":false,"pushed_at":"2014-04-10T17:40:30.000Z","size":444,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-19T06:44:08.728Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dwolfhub.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-04-08T01:46:17.000Z","updated_at":"2014-04-10T17:40:30.000Z","dependencies_parsed_at":"2022-08-25T11:50:48.076Z","dependency_job_id":null,"html_url":"https://github.com/dwolfhub/spartz-sample","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dwolfhub%2Fspartz-sample","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dwolfhub%2Fspartz-sample/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dwolfhub%2Fspartz-sample/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dwolfhub%2Fspartz-sample/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dwolfhub","download_url":"https://codeload.github.com/dwolfhub/spartz-sample/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243223905,"owners_count":20256603,"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","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-10-02T17:27:36.801Z","updated_at":"2025-12-29T03:16:05.022Z","avatar_url":"https://github.com/dwolfhub.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# spartz-sample\n\n## If I had more time\n\n- Write tests for query repositories using in-memory database\n- Investigate speed increase from spatial indexes on latitude/longitude queries\n- Consider different caching practices to account for pagination (perhaps cache the entire result?)\n\n## Database Structure\n\n```MySQL\nCREATE TABLE `cities` (\n   `id` int(10) unsigned NOT NULL AUTO_INCREMENT,\n   `name` varchar(50) COLLATE utf8_unicode_ci NOT NULL,\n   `state` varchar(2) COLLATE utf8_unicode_ci NOT NULL,\n   `status` varchar(25) COLLATE utf8_unicode_ci NOT NULL,\n   `latitude` double(9,6) NOT NULL,\n   `longitude` double(9,6) NOT NULL,\n   `created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',\n   `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',\n   PRIMARY KEY (`id`),\n   KEY `cities_state_index` (`state`)\n ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;\n\nCREATE TABLE `users` (\n   `id` int(10) unsigned NOT NULL AUTO_INCREMENT,\n   `first_name` varchar(25) COLLATE utf8_unicode_ci NOT NULL,\n   `last_name` varchar(25) COLLATE utf8_unicode_ci NOT NULL,\n   `created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',\n   `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',\n   PRIMARY KEY (`id`)\n ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;\n\nCREATE TABLE `users_cities` (\n   `user_id` int(10) unsigned NOT NULL,\n   `city_id` int(10) unsigned NOT NULL,\n   KEY `users_cities_user_id_index` (`user_id`),\n   KEY `users_cities_city_id_index` (`city_id`),\n   CONSTRAINT `users_cities_city_id_foreign` FOREIGN KEY (`city_id`) REFERENCES `cities` (`id`),\n   CONSTRAINT `users_cities_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`)\n ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdwolfhub%2Fspartz-sample","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdwolfhub%2Fspartz-sample","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdwolfhub%2Fspartz-sample/lists"}