{"id":17436077,"url":"https://github.com/janearc/bourdain","last_synced_at":"2026-02-03T11:35:13.454Z","repository":{"id":257918312,"uuid":"869139993","full_name":"janearc/bourdain","owner":"janearc","description":"take-home exercise for stephen","archived":false,"fork":false,"pushed_at":"2024-10-15T21:41:53.000Z","size":123,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-09T11:11:09.659Z","etag":null,"topics":["docker-compose","golang","homework","interviewing","postgresql","rdbms"],"latest_commit_sha":null,"homepage":"","language":"Go","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/janearc.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-10-07T19:32:37.000Z","updated_at":"2024-10-15T21:41:57.000Z","dependencies_parsed_at":"2024-10-19T08:53:15.343Z","dependency_job_id":null,"html_url":"https://github.com/janearc/bourdain","commit_stats":null,"previous_names":["janearc/bourdain"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/janearc/bourdain","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/janearc%2Fbourdain","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/janearc%2Fbourdain/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/janearc%2Fbourdain/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/janearc%2Fbourdain/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/janearc","download_url":"https://codeload.github.com/janearc/bourdain/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/janearc%2Fbourdain/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29044435,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-03T10:09:22.136Z","status":"ssl_error","status_checked_at":"2026-02-03T10:09:16.814Z","response_time":96,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["docker-compose","golang","homework","interviewing","postgresql","rdbms"],"created_at":"2024-10-17T10:02:02.358Z","updated_at":"2026-02-03T11:35:13.433Z","avatar_url":"https://github.com/janearc.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# bourdain\n\ntake-home exercise for stephen\n\n# problem\n\ngiven a set of restaurants with attributes:\n\n```json\n{\n  \"restaurants\": [\n    {\n      \"name\": \"string\",\n      \"capacity\": {\n          \"two-top\":  1,    // integer\n          \"four-top\": 2,    // integer,\n          \"six-top\":  3,    // integer\n      },\n      \"endorsements\": [\n        \"gluten-free\",\n        \"kid-friendly\",\n        \"paleo\"\n      ],\n      \"location\": [\n        37.7749,\n        -122.4194\n      ]\n    }\n  ]\n}\n```\n\nand a set of diners with attributes:\n\n```json\n{\n  \"diners\": [\n    {\n      \"name\": \"string\",\n      \"location\": [\n        37.7749,\n        -122.4194\n      ],\n      \"preferences\": [\n        \"gluten-free\",\n        \"kid-friendly\",\n        \"paleo\"\n      ]\n    }\n  ]\n}\n```\n\ncreate two endpoints:\n\n```golang\n// restaurantAvailability returns a list of restaurants that can accommodate the number of diners at the given time\nhttp.HandleFunc(\"/restaurant/available\", func(w http.ResponseWriter, r *http.Request) {\n\t// reservations are assumed to be two hours\n\tstartTime := r.URL.Query().Get(\"startTime\")\n\t// how you implement this is up to you\n\tdiners := r.URL.Query().Get(\"diners\")\n})\n```\n\n```golang\n// restaurantBook reserves the correct number of tables at the given restaurant\nhttp.HandleFunc(\"/restaurant/book\", func(w http.ResponseWriter, r *http.Request) {\n    // reservations are assumed to be two hours\n    startTime := r.URL.Query().Get(\"startTime\")\n    // how you implement this is up to you\n    diners := r.URL.Query().Get(\"diners\")\n    // how you implement this is up to you\n    restaurant := r.URL.Query().Get(\"restaurant\")\n})\n```\n\nOnly API is in scope; UI is out of scope. You may use a database. The solution does not need to be publicly deployed\nbut should be developed in a manner consistent with production code. Language is your choice but please do not use\nbefunge.\n\nSolution is in this directory in SOLUTION.md","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjanearc%2Fbourdain","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjanearc%2Fbourdain","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjanearc%2Fbourdain/lists"}