{"id":42540534,"url":"https://github.com/omept/ride-share","last_synced_at":"2026-01-28T18:12:22.959Z","repository":{"id":171835503,"uuid":"648041239","full_name":"omept/ride-share","owner":"omept","description":"Ride sharing API built with Typescript, Knex, Objection, and Jest","archived":false,"fork":false,"pushed_at":"2023-06-02T04:23:21.000Z","size":199,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-01-29T21:04:08.300Z","etag":null,"topics":["authentication","expressjs","jest-tests","logging","nodejs","restful-api","ridesharing","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/omept.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":"SECURITY.md","support":null,"governance":null}},"created_at":"2023-06-01T04:46:04.000Z","updated_at":"2023-06-02T04:27:28.000Z","dependencies_parsed_at":"2023-09-25T06:58:12.101Z","dependency_job_id":null,"html_url":"https://github.com/omept/ride-share","commit_stats":{"total_commits":8,"total_committers":1,"mean_commits":8.0,"dds":0.0,"last_synced_commit":"a06648f656439f62bbe144c86211aa2a9089908e"},"previous_names":["ong-gtp/ride-share","omept/ride-share"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/omept/ride-share","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/omept%2Fride-share","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/omept%2Fride-share/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/omept%2Fride-share/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/omept%2Fride-share/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/omept","download_url":"https://codeload.github.com/omept/ride-share/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/omept%2Fride-share/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28848524,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-28T15:15:36.453Z","status":"ssl_error","status_checked_at":"2026-01-28T15:15:13.020Z","response_time":57,"last_error":"SSL_read: 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":["authentication","expressjs","jest-tests","logging","nodejs","restful-api","ridesharing","typescript"],"created_at":"2026-01-28T18:12:17.033Z","updated_at":"2026-01-28T18:12:22.947Z","avatar_url":"https://github.com/omept.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"Ride-sharing REST API  for Node.js Express API in Typescript with jsonwebtoken, joi, Knex, and Objection.js\n\n## Requirements\n\n- [Node.js](https://yarnpkg.com/en/docs/install)\n- [Yarn](https://yarnpkg.com/en/docs/install)\n- [NPM](https://docs.npmjs.com/getting-started/installing-node)\n- [Docker](https://docs.docker.com/install/)\n\n## Assumptions\n\n- A user can be a driver, admin, or customer\n- signup is not available to the public.\n- No real ride is booked\n\n## Getting Started\n\nClone the repository, install the dependencies.\n\n```bash\n$ git clone git@github.com:ong-gtp/ride-share.git \u003capplication-name\u003e\n\n$ cd \u003capplication-name\u003e\n\n$ cp .env.example .env # Update database credentials\n\n$ npm install mysql --save # mysql driver for Knex.\n\n$ yarn install\n\n$ yarn migrate # migrate database\n```\n\nLoad fake data in database.\n\n```bash\n$ yarn load:fake Ride 10  # CREATES 10 RIDES IN THE DB\n```\n\nStart the application.\n\n```bash\n$ yarn start # For development\n\n$ yarn build # For production\n```\n\n\n**Using Docker (OPTIONAL)**\n\nMake a copy of `.env.docker` and save as `.env`.\n\n```bash\n$ cp .env.docker .env\n```\n\nInstall dependencies and run the application locally.\n\n```bash\n$ docker compose up -d postgres\n\n$ docker compose up -d api\n\n$ docker compose exec api sh yarn migrate # Make sure server is started checking logs before running this command\n```\n\nView logs of the container.\n\n```bash\n$ docker compose logs -f\n```\n\nTo stop the services.\n\n```bash\n$ docker compose stop api postgres\n```\n\n## (Development) Generating Migrations and Seeds\n\nTo create migration use `make:migration` and seed use `make:seeder`:\n\n```bash\n$ yarn make:migration create_{table_name}_table\n\n$ yarn make:seeder {table_name}_table_seeder\n```\n\nExample,\n\n```bash\n$ yarn make:migration create_vehicles_table\n\n$ yarn make:seeder rides_table_seeder\n```\n\nModify migration and seeder file as per the requirement. Then finally:\n\n```bash\n$ yarn migrate # to migrate\n\n$ yarn seed # to seed\n```\n\n## REST endpoints\n```bash\nApp endpoints can be found in api.rest file\n\n#### Routes ⚡\n| Routes           | HTTP Methods | Params                                   | Description                                                                                                  |\n| :--------------- | :----------- | :--------------------------------------- | :----------------------------------------------------------------------------------------------------------- |\n| /                | GET          | none                                     | Displays application infomation                                                                              |\n| /login           | POST         | `email` `password`                       | Logs in a user and returns the jwt session token                                                             |\n| /logout          | POST         | none                                     | Logs out a user                                                                                              |\n| /refresh         | POST         | none                                     | Refresh a user jwt token                                                                                     |\n| /start-ride     | POST         | `customerId`  `driverId`, `destination`, `startedFrom                     | Start a ride                                                                         |\n| /stop-ride | POST         | `ride_id`   | Stop a ride |\n\n```\n\n## Setting up REST Client (OPTIONAL)\n\nFirst install Rest Client from vscode extensions\n\nCreate a file or add following lines in `.vscode` \u003e `settings.json` and switch an environment `Cmd/Ctrl + Shift + P` \u003e `REST Client: Switch Environment`. Then, you can request APIs from `api.rest` file.\n\n```json\n{\n  \"rest-client.environmentVariables\": {\n    \"$shared\": {\n      \"refreshToken\": \"foo\",\n      \"accessToken\": \"bar\",\n      \"email\": \"sgr.raee@gmail.com\",\n      \"password\": \"secret\" \n    },\n    \"local\": {\n      \"host\": \"localhost\",\n      \"refreshToken\": \"{{$shared refreshToken}}\",\n      \"accessToken\": \"{{$shared accessToken}}\",\n      \"email\": \"{{$shared email}}\",\n      \"password\": \"{{$shared password}}\"\n    }\n  }\n}\n```\n\n## License\n\nride-share is under [MIT License](LICENSE).\n\n\n## Reference \n- https://github.com/cham11ng/typescript-api-starter\n- https://knexjs.org/\n- https://vincit.github.io/objection.js\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fomept%2Fride-share","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fomept%2Fride-share","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fomept%2Fride-share/lists"}