{"id":28291142,"url":"https://github.com/thekeogh/loopback-postgresql-graphql","last_synced_at":"2025-07-27T04:06:10.734Z","repository":{"id":131914019,"uuid":"611844881","full_name":"thekeogh/loopback-postgresql-graphql","owner":"thekeogh","description":"LoopBack 4 PostgreSQL GraphQL Boilerplate","archived":false,"fork":false,"pushed_at":"2023-04-11T10:09:11.000Z","size":192,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-13T13:46:03.755Z","etag":null,"topics":["graphql","loopback4","openapi3","postgresql"],"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/thekeogh.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,"zenodo":null}},"created_at":"2023-03-09T16:56:54.000Z","updated_at":"2023-04-21T09:46:44.000Z","dependencies_parsed_at":"2023-05-23T22:15:34.573Z","dependency_job_id":null,"html_url":"https://github.com/thekeogh/loopback-postgresql-graphql","commit_stats":null,"previous_names":["thekeogh/loopback-postgresql-graphql"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/thekeogh/loopback-postgresql-graphql","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thekeogh%2Floopback-postgresql-graphql","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thekeogh%2Floopback-postgresql-graphql/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thekeogh%2Floopback-postgresql-graphql/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thekeogh%2Floopback-postgresql-graphql/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thekeogh","download_url":"https://codeload.github.com/thekeogh/loopback-postgresql-graphql/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thekeogh%2Floopback-postgresql-graphql/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267298566,"owners_count":24065882,"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","status":"online","status_checked_at":"2025-07-27T02:00:11.917Z","response_time":82,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["graphql","loopback4","openapi3","postgresql"],"created_at":"2025-05-22T03:13:33.603Z","updated_at":"2025-07-27T04:06:10.716Z","avatar_url":"https://github.com/thekeogh.png","language":"TypeScript","readme":"# LoopBack 4 PostgreSQL GraphQL Boilerplate\n\nA boilerplate/starter project for quickly building GraphQL APIs using Node.js, LoopBack 4 and PostgreSQL.\n\n## Prerequisites\n\n- Node (built with `19`, but should work on lower)\n- PostgreSQL (locally, externally or docker)\n\n## Setup\n\nClone the repository\n\n```shell\ngit clone git@github.com:thekeogh/loopback-postgresql-graphql.git\n```\n\nInstall the dependencies\n\n```shell\nnpm install\n```\n\nCreate a local `.env` \n\n```shell\ntouch .env.development.local\n```\n\nCopy the values (only the ones you need to change) from the `.env.development` file to this new file, for example:\n\n```shell\n# Database\nDB_USER=joe\nDB_PASSWORD=mysuperpassword\nDB_DATABASE=loopback\n```\n\n\u003e More details on the environment config [below](#environment).\n\nMigrate the database\n\n\u003e See the [database](#database) section for this step.\n\nStart the API\n\n```shell\nnpm start\n# or for dev (using tsc-watch)\nnpm run dev\n```\n\nYou should now see the relevant URLs in your terminal.\n\n## Database\n\nAlthough designed with PostgreSQL in mind, there is no reason why you cannot change the datasource to another (e.g. MariaDB, Oracle, Mongo etc), it is LoopBack after all, and has many drivers. But we use PostgreSQL for this API\n\nOnce you have entered your database credentials [above](#setup), PostgreSQL is ready to go out-the-box. There is an example `user` model in the `models/` folder ready to go, to migrate this:\n\n```shell\nNODE_ENV=development npm run migrate\n```\n\nNow check your database and you should see a `user` table.\n\n## GraphQL\n\nGraphQL is built in to the service via the [openapi-to-graphql](https://github.com/IBM/openapi-to-graphql) and [graphql-http](https://github.com/graphql/graphql-http) libraries. This means, that GraphQL will run on the same port/url as your OAS3 RESTful API. For example:\n\n```\nRESTful: https://localhost:3200\nGraphQL: https://localhost:3200/graphql\n```\n\n\u003e GraphiQL is not currently supported.\n\n## Environment\n\n[dotenv-flow](https://github.com/kerimdzhanov/dotenv-flow) is used out the box, so please read the documentation over there for more on this.\n\nIt's also advisable to add any new env variables to the `src/env.d.ts` file to allow TypeScript insight.\n\n----\n\n[![LoopBack](https://github.com/loopbackio/loopback-next/raw/master/docs/site/imgs/branding/Powered-by-LoopBack-Badge-(blue)-@2x.png)](http://loopback.io/)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthekeogh%2Floopback-postgresql-graphql","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthekeogh%2Floopback-postgresql-graphql","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthekeogh%2Floopback-postgresql-graphql/lists"}