{"id":23652938,"url":"https://github.com/muratdemirci/muber-driver-api","last_synced_at":"2026-04-09T01:31:50.735Z","repository":{"id":237426324,"uuid":"692506087","full_name":"muratdemirci/muber-driver-api","owner":"muratdemirci","description":"it's just a rest api something something something","archived":false,"fork":false,"pushed_at":"2023-09-16T17:30:35.000Z","size":1042,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"dio","last_synced_at":"2025-09-25T20:58:29.057Z","etag":null,"topics":["mongodb","mongoose","rest-api","tests","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/muratdemirci.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":"2023-09-16T17:28:02.000Z","updated_at":"2024-02-03T21:00:02.000Z","dependencies_parsed_at":null,"dependency_job_id":"9da07ba4-a4df-400c-95fc-985a89ba4d49","html_url":"https://github.com/muratdemirci/muber-driver-api","commit_stats":null,"previous_names":["muratdemirci/muber-driver-api"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/muratdemirci/muber-driver-api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/muratdemirci%2Fmuber-driver-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/muratdemirci%2Fmuber-driver-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/muratdemirci%2Fmuber-driver-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/muratdemirci%2Fmuber-driver-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/muratdemirci","download_url":"https://codeload.github.com/muratdemirci/muber-driver-api/tar.gz/refs/heads/dio","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/muratdemirci%2Fmuber-driver-api/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31581864,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-08T14:31:17.711Z","status":"ssl_error","status_checked_at":"2026-04-08T14:31:17.202Z","response_time":54,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5: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":["mongodb","mongoose","rest-api","tests","typescript"],"created_at":"2024-12-28T17:38:03.994Z","updated_at":"2026-04-09T01:31:50.712Z","avatar_url":"https://github.com/muratdemirci.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Muber Case Study REST API Documentation\n\nThis document provides a detailed description of the REST API endpoints for the muberDriverLocationApi.\n\n## To start setting up the project\n\nStep 1: Clone the repo\n\n```bash\ngit clone https://github.com/muratdemirci/muber-driver-api.git\n```\n\nStep 2: cd into the cloned repo and run:\n\n```bash\nnpm install\n```\n\nStep 3: Put your credentials in the driverlocationapi/config/default.ts file.\n\n```bash\n  port: 1337,\n  secret_key: 'follow_the_deusmur',\n  dbUri: '',\n```\n\nStep 4: To generate example data, run:\n\n```bash\n npm run seed\n```\n\n## Create Driver Locations\n\nThis endpoint creates a new driver location entry in the system.\n\n### Request\n\n`POST http://localhost:1337/api/driver-locations`\n\n### Request Body\n\nThe request body must contain the following parameters:\n\n| Parameter    | Type    | Description                                                                            |\n| ------------ | ------- | -------------------------------------------------------------------------------------- |\n| name         | string  | The name of the driver                                                                 |\n| destination  | string  | The current destination of the driver                                                  |\n| hasPassenger | boolean | Indicates whether the driver has a passenger or not                                    |\n| idle         | boolean | Indicates whether the driver is idle or not                                            |\n| location     | object  | The current location of the driver. It should contain a type and coordinates property. |\n\nExample request body:\n\n```\n\n{\n\"name\": \"john doe\",\n\"destination\": \"Istanbul/Turkey\",\n\"hasPassenger\": false,\n\"idle\": false,\n\"location\": {\n\"type\": \"Point\",\n\"coordinates\": [40.94289771, 29.0390297]\n}\n}\n\n```\n\n### Response\n\nThis endpoint does not return a response body.\n\n## Get Single Driver Location\n\nThis endpoint retrieves the driver location with the specified driver ID.\n\n### Request\n\n`GET http://localhost:1337/api/driver-locations/:driverId`\n\n**:driverId**: The unique identifier of the driver.\n\n### Response\n\nThis endpoint does not return a response body.\n\n## Get Nearest Driver\n\nThis endpoint retrieves the nearest driver to the provided location.\n\n### Request\n\n`GET http://localhost:1337/api/search/location?longitude=:longitude\u0026latitude=:latitude`\n\n**:longitude**: The longitude of the location.\n\n**:latitude**: The latitude of the location.\n\n### Request Headers\n\n| Key            | Value     |\n| -------------- | --------- |\n| x-access-token | JWT Token |\n\n### Response\n\nThis endpoint does not return a response body.\n\n## Remove Single Driver Location\n\nThis endpoint removes the driver location with the specified driver ID.\n\n### Request\n\n`DELETE http://localhost:1337/api/driver-locations/:driverId`\n\n**:driverId**: The unique identifier of the driver.\n\n### Response\n\nThis endpoint does not return a response body.\n\n## Update Single Driver Location\n\nThis endpoint updates the driver location with the specified driver ID.\n\n### Request\n\n`PUT http://localhost:1337/api/driver-locations/:driverId`\n\n**:driverId**: The unique identifier of the driver.\n\n### Request Body\n\nThe request body must contain the following parameters:\n\n| Parameter    | Type    | Description                                                                            |\n| ------------ | ------- | -------------------------------------------------------------------------------------- |\n| name         | string  | The name of the driver                                                                 |\n| destination  | string  | The current destination of the driver                                                  |\n| hasPassenger | boolean | Indicates whether the driver has a passenger or not                                    |\n| idle         | boolean | Indicates whether the driver is idle or not                                            |\n| location     | object  | The current location of the driver. It should contain a type and coordinates property. |\n\nExample request body:\n\n```\n\n{\n\"name\": \"murat\",\n\"destination\": \"Ankara/Turkey\",\n\"hasPassenger\": false,\n\"idle\": false,\n\"location\": {\n\"type\": \"Point\",\n\"coordinates\": [40.94289771, 29.0390297]\n}\n}\n\n```\n\n### Response\n\nThis endpoint does not return a response body.\n\n## Driver Locations Health Check\n\nThis endpoint performs a health check on the driver locations API.\n\n### Request\n\n`GET /api/healthcheck`\n\n### Request Headers\n\n| Key            | Value     |\n| -------------- | --------- |\n| x-access-token | JWT Token |\n\n### Response\n\nThis endpoint does not return a response body.\n\n## Matching API Health Check\n\nThis endpoint performs a health check on the matching API.\n\n### Request\n\n`GET http://localhost:1447/api/healthcheck`\n\n### Request Headers\n\n| Key            | Value |\n| -------------- | ----- |\n| x-access-token |       |\n\n### Response\n\nThis endpoint does not return a response body.\n\n## Matching API Valid Token\n\nThis endpoint tests the validity of the provided token for the matching API.\n\n### Request\n\n`GET http://localhost:1447/api/token`\n\n### Response\n\nThis endpoint does not return a response body.\n\n## Matching API Invalid Token\n\nThis endpoint tests the invalidity of a token for the matching API.\n\n### Request\n\n`GET http://localhost:1447/api/tokenNotAuthenticated`\n\n### Response\n\nThis endpoint does not return a response body.\n\n## Matching API Search Driver\n\nThis endpoint searches for a driver within a specified distance from a location.\n\n### Request\n\n`POST http://localhost:1447/api/search/driver`\n\n### Request Headers\n\n| Key            | Value     |\n| -------------- | --------- |\n| x-access-token | JWT Token |\n\n### Request Body\n\nThe request body must contain the following parameters:\n\n| Parameter | Type   | Description                   |\n| --------- | ------ | ----------------------------- |\n| latitude  | string | The latitude of the location  |\n| longitude | string | The longitude of the location |\n\nExample request body:\n\n```\n\n{\n\"latitude\": \"40.619080\",\n\"longitude\": \"29.227659\"\n}\n\n```\n\n### Response\n\nThis endpoint does not return a response body.\n\n```\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmuratdemirci%2Fmuber-driver-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmuratdemirci%2Fmuber-driver-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmuratdemirci%2Fmuber-driver-api/lists"}