{"id":24874691,"url":"https://github.com/dirheimerb/relay-couch","last_synced_at":"2025-03-27T02:15:50.710Z","repository":{"id":53986637,"uuid":"521975509","full_name":"dirheimerb/relay-couch","owner":"dirheimerb","description":null,"archived":false,"fork":false,"pushed_at":"2022-09-16T18:12:10.000Z","size":1091,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-01T07:28:57.841Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dirheimerb.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":"kriasoft","patreon":"koistya"}},"created_at":"2022-08-06T14:55:26.000Z","updated_at":"2022-08-06T14:55:32.000Z","dependencies_parsed_at":"2023-01-18T11:00:14.328Z","dependency_job_id":null,"html_url":"https://github.com/dirheimerb/relay-couch","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":"kriasoft/graphql-starter-kit","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dirheimerb%2Frelay-couch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dirheimerb%2Frelay-couch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dirheimerb%2Frelay-couch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dirheimerb%2Frelay-couch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dirheimerb","download_url":"https://codeload.github.com/dirheimerb/relay-couch/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245767360,"owners_count":20668826,"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":"2025-02-01T07:28:11.769Z","updated_at":"2025-03-27T02:15:50.681Z","avatar_url":"https://github.com/dirheimerb.png","language":"TypeScript","funding_links":["https://github.com/sponsors/kriasoft","https://patreon.com/koistya","http://patreon.com/koistya","https://img.shields.io/badge/dynamic/json?color=%23ff424d\u0026label=Patreon\u0026style=flat-square\u0026query=data.attributes.patron_count\u0026suffix=%20patrons\u0026url=https%3A%2F%2Fwww.patreon.com%2Fapi%2Fcampaigns%2F233228"],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003e\n  \u003cimg src=\"https://s.tarkus.me/graphql-logo.png\" width=\"128\" height=\"128\" alt=\"GraphQL\" /\u003e\u003cbr\u003e\n  GraphQL API and Relay Starter Kit\n  \u003cbr\u003e\n  \u003ca href=\"http://www.typescriptlang.org/\"\u003e\u003cimg src=\"https://img.shields.io/badge/%3C%2F%3E-TypeScript-%230074c1.svg?style=flat-square\" height=\"20\"\u003e\u003c/a\u003e\n  \u003ca href=\"http://patreon.com/koistya\"\u003e\u003cimg src=\"https://img.shields.io/badge/dynamic/json?color=%23ff424d\u0026label=Patreon\u0026style=flat-square\u0026query=data.attributes.patron_count\u0026suffix=%20patrons\u0026url=https%3A%2F%2Fwww.patreon.com%2Fapi%2Fcampaigns%2F233228\" height=\"20\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://discord.gg/gx5pdvZ7Za\"\u003e\u003cimg src=\"https://img.shields.io/discord/643523529131950086?label=Chat\u0026style=flat-square\" height=\"20\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://github.com/kriasoft/relay-starter-kit/stargazers\"\u003e\u003cimg src=\"https://img.shields.io/github/stars/kriasoft/relay-starter-kit.svg?style=social\u0026label=Star\u0026maxAge=3600\" height=\"20\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://twitter.com/koistya\"\u003e\u003cimg src=\"https://img.shields.io/twitter/follow/koistya.svg?style=social\u0026label=Follow\u0026maxAge=3600\" height=\"20\"\u003e\u003c/a\u003e\n\u003c/h1\u003e\n\n## Features\n\n- Monorepo project structure powered by Yarn with PnP\n- GraphQL API using code-first development approach (TypeScript, GraphQL.js, Knex, PostgreSQL)\n- Stateless JWT cookie-based authentication (supporting SSR, OAuth 2.0 via Google, Facebook, etc.)\n- Database tooling — seed files, migrations, Knex.js REPL shell, etc.\n- Front-end boilerplate pre-configured with TypeScript, Webpack v5, React, Relay, and Materia UI\n- Serverless deployment — `api`, `img` → Cloud Functions, `web` → Cloudflare Workers\n- HTML page rendering (SSR) at CDN edge locations, all ~100 points on Lighthouse\n- Pre-configured dev, test / QA, production, and review (per PR) environments\n- Pre-configured VSCode code snippets and other VSCode settings\n- The ongoing design and development is supported by these wonderful companies:\n\n\u003ca href=\"https://reactstarter.com/s/1\"\u003e\u003cimg src=\"https://reactstarter.com/s/1.png\" height=\"60\" /\u003e\u003c/a\u003e\u0026nbsp;\u0026nbsp;\u003ca href=\"https://reactstarter.com/s/2\"\u003e\u003cimg src=\"https://reactstarter.com/s/2.png\" height=\"60\" /\u003e\u003c/a\u003e\u0026nbsp;\u0026nbsp;\u003ca href=\"https://reactstarter.com/s/3\"\u003e\u003cimg src=\"https://reactstarter.com/s/3.png\" height=\"60\" /\u003e\u003c/a\u003e\n\n---\n\nThis project was bootstrapped with [GraphQL API Starter Kit](https://github.com/kriasoft/relay-starter-kit).\nBe sure to join our [Discord channel](https://discord.com/invite/bSsv7XM) for assistance.\n\n## Directory Structure\n\n`├──`[`.github`](.github) — GitHub configuration including CI/CD workflows\u003cbr\u003e\n`├──`[`.vscode`](.vscode) — VSCode settings including code snippets, recommended extensions etc.\u003cbr\u003e\n`├──`[`env`](./env) — environment variables that are used for local development (`local`, `test`, `prod`)\u003cbr\u003e\n`├──`[`db`](./db) — database schema, seeds, and migrations ([Cloud SQL](https://cloud.google.com/sql), [Knex.js](https://knexjs.org/))\u003cbr\u003e\n`├──`[`api`](./api) — GraphQL API and authentication ([Could SQL](https://cloud.google.com/sql), [Cloud Functions](https://cloud.google.com/functions), [GraphQL.js](https://graphql.org/graphql-js/))\u003cbr\u003e\n`├──`[`img`](./img) — dynamic image resizing ([Cloud Functions](https://cloud.google.com/functions), [Cloud Storage](https://\ncloud.google.com/storage))\u003cbr\u003e\n`├──`[`infra`](./infra) — cloud infrastructure configuration ([Terraform](https://www.terraform.io/))\u003cbr\u003e\n`├──`[`web`](./web) — [React](https://reactjs.org/) / [Relay](https://relay.dev/) web application with CDN rendering ([Webpack](https://webpack.js.org/), [Cloudflare Workers](https://workers.cloudflare.com/))\u003cbr\u003e\n`├──`[`scripts`](./scripts) — Automation scripts shared across the project\u003cbr\u003e\n`└── ...` — add more packages such as `worker`, `admin`, `mobile`, etc.\n\n## Requirements\n\n- [Node.js](https://nodejs.org/) v16, [Yarn](https://yarnpkg.com/) package manager\n- Local or remote instance of [PostgreSQL](https://www.postgresql.org/) (see [Postgres.app](https://postgresapp.com/), [Google Cloud SQL](https://cloud.google.com/sql))\n- [VS Code](https://code.visualstudio.com/) editor with [recommended extensions](.vscode/extensions.json)\n\n## Getting Started\n\nJust [clone](https://github.com/kriasoft/relay-starter-kit/generate) the repo\nand run `yarn install` followed by `yarn start`:\n\n```bash\n$ git clone --origin=seed --branch=main --single-branch \\\n    https://github.com/kriasoft/relay-starter-kit.git example\n$ cd ./example                  # Change current directory to the newly created one\n$ yarn install                  # Install project dependencies\n$ yarn setup                    # Configure environment variables\n$ yarn db:reset                 # Create or update PostgreSQL database\n$ yarn api:start                # Launch GraphQL API and authentication server\n$ yarn web:start                # Launch React/Relay front-end app\n```\n\nThe API server must become available at [http://localhost:8080/api](http://localhost:8080/api).\u003cbr\u003e\nThe web application front-end must become available at [http://localhost:3000/](http://localhost:3000/).\n\n## How to Deploy\n\nBefore you can deploy the app, ensure that the target\n[GCP project](https://console.cloud.google.com/cloud-resource-manager) exists\nand that all the environment variables (found in [`/env/*.env`](/env) files) are\nup-to-date, for both `test` (QA) and `prod` (production) environments.\n\nIf you just created a brand new GCP project, you can configure it by running:\n\n```bash\n$ yarn gcp:setup --env=test\n$ yarn gcp:setup --env=prod\n```\n\nOR, by using Terraform (found in [`/infra`](./infra/)), which one is more\nconvenient for you.\n\nOnce a new commit or PR lands onto the `main` (or, `release`) branch, it's going\nto be deployed automatically using a GitHub Actions workflow. Alternatively,\nyou can deploy the app manually by running:\n\n```bash\n# Build and deploy the GraphQL API (GCF)\n$ yarn api:build\n$ yarn api:deploy --env=prod\n\n# Build and deploy the web front-end to Cloudflare Workers (CDN)\n$ yarn web:build\n$ yarn web:deploy --env=prod\n\n# Migrate the target database to the latest version\n$ yarn db:migrate --env=prod\n```\n\nWhere `--env=prod` is the target (production) deployment environment,\nusing `--env=test` when not specified.\n\n## References\n\n- [Getting Started with Cloud Functions (2nd gen)](https://codelabs.developers.google.com/codelabs/cloud-starting-cloudfunctions-v2)\n- [Yarn 2 (Berry) - Plug'n'play, constraints and workspaces](https://www.youtube.com/watch?v=HUVawJXeHfU) by [@jherr](https://github.com/jherr)\n- [Google Cloud SQL — Tips \u0026 Tricks](https://medium.com/@koistya/google-cloud-sql-tips-tricks-d0fe7106c68a?sk=fe65df6e858c9b57edbda07bc67ed0e9) by [@koistya](https://github.com/koistya)\n- [Database change management with Node.js](https://dev.to/koistya/database-change-management-with-node-js-12dk) by [@koistya](https://github.com/koistya)\n\n## How to Update\n\nIn the case when you kept the original Node.js Starter Kit git history, you can\nalways pull and merge updates from the \"upstream\" repository back into your\nproject by running:\n\n```bash\n$ git fetch seed                # Fetch Node.js Starter Kit (upstream) repository\n$ git checkout main             # Switch to the main branch (or, master branch)\n$ git merge seed/main           # Merge upstream/master into the local branch\n```\n\nIn order to update Yarn and other dependencies to the latest versions, run:\n\n```bash\n$ yarn set version latest       # Upgrade Yarn CLI to the latest version\n$ yarn upgrade-interactive      # Bump Node.js dependencies using an interactive mode\n$ yarn install                  # Install the updated Node.js dependencies\n$ yarn dlx @yarnpkg/sdks vscode # Update VSCode settings\n```\n\n## Backers\n\n\u003ca href=\"https://reactstarter.com/b/1\"\u003e\u003cimg src=\"https://reactstarter.com/b/1.png\" height=\"60\" /\u003e\u003c/a\u003e\u0026nbsp;\u0026nbsp;\u003ca href=\"https://reactstarter.com/b/2\"\u003e\u003cimg src=\"https://reactstarter.com/b/2.png\" height=\"60\" /\u003e\u003c/a\u003e\u0026nbsp;\u0026nbsp;\u003ca href=\"https://reactstarter.com/b/3\"\u003e\u003cimg src=\"https://reactstarter.com/b/3.png\" height=\"60\" /\u003e\u003c/a\u003e\u0026nbsp;\u0026nbsp;\u003ca href=\"https://reactstarter.com/b/4\"\u003e\u003cimg src=\"https://reactstarter.com/b/4.png\" height=\"60\" /\u003e\u003c/a\u003e\u0026nbsp;\u0026nbsp;\u003ca href=\"https://reactstarter.com/b/5\"\u003e\u003cimg src=\"https://reactstarter.com/b/5.png\" height=\"60\" /\u003e\u003c/a\u003e\u0026nbsp;\u0026nbsp;\u003ca href=\"https://reactstarter.com/b/6\"\u003e\u003cimg src=\"https://reactstarter.com/b/6.png\" height=\"60\" /\u003e\u003c/a\u003e\u0026nbsp;\u0026nbsp;\u003ca href=\"https://reactstarter.com/b/7\"\u003e\u003cimg src=\"https://reactstarter.com/b/7.png\" height=\"60\" /\u003e\u003c/a\u003e\u0026nbsp;\u0026nbsp;\u003ca href=\"https://reactstarter.com/b/8\"\u003e\u003cimg src=\"https://reactstarter.com/b/8.png\" height=\"60\" /\u003e\u003c/a\u003e\n\n## How to Contribute\n\nAnyone and everyone is welcome to [contribute](.github/CONTRIBUTING.md). Start\nby checking out the list of [open issues](https://github.com/kriasoft/relay-starter-kit/issues)\nmarked [help wanted](https://github.com/kriasoft/relay-starter-kit/issues?q=label:\"help+wanted\").\nHowever, if you decide to get involved, please take a moment to review the\n[guidelines](.github/CONTRIBUTING.md).\n\n## License\n\nCopyright © 2016-present Kriasoft. This source code is licensed under the MIT license found in the\n[LICENSE](https://github.com/kriasoft/relay-starter-kit/blob/main/LICENSE) file.\n\n---\n\n\u003csup\u003eMade with ♥ by Konstantin Tarkus ([@koistya](https://twitter.com/koistya), [blog](https://medium.com/@koistya))\nand [contributors](https://github.com/kriasoft/relay-starter-kit/graphs/contributors).\u003c/sup\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdirheimerb%2Frelay-couch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdirheimerb%2Frelay-couch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdirheimerb%2Frelay-couch/lists"}