{"id":19408794,"url":"https://github.com/daern91/taxi-bid","last_synced_at":"2025-02-25T02:17:51.676Z","repository":{"id":222339643,"uuid":"756306768","full_name":"daern91/taxi-bid","owner":"daern91","description":null,"archived":false,"fork":false,"pushed_at":"2024-02-13T18:35:29.000Z","size":120,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-07T14:24:29.177Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/daern91.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-02-12T12:06:39.000Z","updated_at":"2024-02-13T16:42:01.000Z","dependencies_parsed_at":"2025-01-07T14:24:23.366Z","dependency_job_id":null,"html_url":"https://github.com/daern91/taxi-bid","commit_stats":null,"previous_names":["daern91/taxi-bid"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daern91%2Ftaxi-bid","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daern91%2Ftaxi-bid/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daern91%2Ftaxi-bid/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daern91%2Ftaxi-bid/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/daern91","download_url":"https://codeload.github.com/daern91/taxi-bid/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240587480,"owners_count":19825005,"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-11-10T12:07:54.037Z","updated_at":"2025-02-25T02:17:51.651Z","avatar_url":"https://github.com/daern91.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"### Summary\n\nTiny TypeScript/nodejs backend taxi-booking app using Postgres as db and express as server framework.\n\nThe routes, spec, API-client, etc, are all generated with [tsoa](https://github.com/lukeautry/tsoa).\n\n### Description\n\nOne problem I've seen happening over and over again in the industry is that we get behind with chore work such as updating Openapi specs and SDKs. I wanted to find a solution, and this repo is an example that fixes it by using a code-first approach that generates routes, validators, client SDK, and API-spec (swagger).\n\nThe idea is that we should be able to code our types, and set up the routes/handlers we want, and everything else should be updated from there. I found that `tsoa` handles routes, validators, and specs nicely with express and [https://github.com/ferdikoomen/openapi-typescript-codegen](openapi-typescript-codegen) delivered a workable SDK.\n\nPlease have a look inside the backend folder to see the structure, then the magic happens with the `generate` script defined in the be:s `package.json`.\n\nAlso note that you need to cd into the backend folder and run both `npm install` and `npm run generate` there in order to build the be routes and the client.\n\n### Setup steps\n\n1. Add local db folder `mkdir -p .postgres/data`\n2. `cd` into the backend folder and run `npm install` followed by `npm run generate`. This will build routes, api-spec, and api-client for the script to use.\n3. Run `docker compose up` to start services and populate DB.\n4. `cd` into the scripts folder, run `npm install` followed by `npm start` to verify that all endpoints are working.\n5. Script tests should pass\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdaern91%2Ftaxi-bid","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdaern91%2Ftaxi-bid","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdaern91%2Ftaxi-bid/lists"}