{"repo":"graphile/starter","free":true,"listed":false,"github":"https://github.com/graphile/starter","clone":"git clone https://github.com/graphile/starter.git","description":"Opinionated SaaS quick-start with pre-built user account and organization system for full-stack application development in React, Node.js, GraphQL and PostgreSQL. Powered by PostGraphile, TypeScript, Apollo Client, Graphile Worker, Graphile Migrate, GraphQL Code Generator, Ant Design and Next.js","language":"TypeScript","stars":1827,"topics":["apollo-client","eslint","graphile","graphql","job-queue","node","nodejs","postgraphile","postgresql","saas","saas-boilerplate","starter","typescript"],"license":null,"category":"saas_starter","readme_excerpt":"# Graphile Starter\n\n## Take it for a spin!\n\nWe're running the starter at:\n\nhttps://graphile-starter.herokuapp.com\n\nFeel free to register an account and have a poke around as you see fit.\n\n**NOTE**: emails are sent from Graphile Starter, so please only enter email\naddresses you control.\n\n**NOTE**: every time we merge to master, we ship a new version of Graphile\nStarter to Heroku and entirely wipe the database, so your data may not persist.\nIf you wish to delete your data before this time you can do so via the delete\naccount feature baked into the starter.\n\n## NOT FOR BEGINNERS\n\nWe do not advise that you build your own projects on top of this project until\nyou're comfortable with the various tools it uses\n([Node.js](https://nodejs.org/en/docs/),\n[Express](https://expressjs.com/en/api.html),\n[PostgreSQL](https://www.postgresql.org/docs/current/index.html),\n[GraphQL](https://graphql.org/learn/),\n[PostGraphile](https://www.graphile.org/postgraphile/introduction/),\n[Graphile Worker](https://github.com/graphile/worker),\n[Graphile Migrate](https://github.com/graphile/migrate),\n[TypeScript](https://www.typescriptlang.org/docs/),\n[React](https://reactjs.org/docs/getting-started.html),\n[Apollo Client for React](https://www.apollographql.com/docs/react/),\n[GraphQL Code Generator](https://github.com/dotansimha/graphql-code-generator),\n[ESLint](https://eslint.org/),\n[Prettier](https://prettier.io/docs/en/index.html), [Jest](https://jestjs.io/),\n[Cypress](https://www.cypress.io/), etc).\n\nThis is an **advanced** project with deeply integrated tooling across the full\nstack. The project is called \"Starter\" because it helps you to start new\nprojects with all these technologies, tools and techniques already in place. If\nyou're not already familiar with these things then you'll probably find the\nproject overwhelming, it is not intended to be your first experience of any of\nthese tools.\n\nIf you're just getting started with PostGraphile, before you dive into this\nproject make sure you check out the\n[PostGraphile required knowledge](https://www.graphile.org/postgraphile/required-knowledge/)\nand especially the\n[schema design tutorial](https://www.graphile.org/postgraphile/postgresql-schema-design/).\nThis repository takes a slightly different approach to schema design than the\naforementioned tutorial, but it's still an incredibly valuable resource.\n\n## Purpose\n\nGraphile Starter is an opinionated quick-start project for full-stack\napplication development in React, Node.js, GraphQL and PostgreSQL. It includes\nthe foundations of a modern web application, with a full user registration\nsystem, organizations (e.g. teams/companies/etc), session management, optimized\njob queue, a significant amount of pre-configured tooling, tests (both\nend-to-end and more granular) and much more.\n\nIt is suitable for building projects both large and small, with a focus on\nproductivity. You might use it:\n\n- to go from conception to launch of a web app during a hack day\n- as the foundation for client projects at your web agency\n- to build your side-hustle without spending lots of time on boilerplate\n- to build a SaaS project to help fund your open source work 😉\n\nHowever you use it, the project can be deployed to many platforms, and can be\nscaled to larger audiences both horizontally and vertically with very few\nchanges.\n\nPlease note that this software is not \"complete,\" free of software defects, or\nfree of security issues — it is not a \"finished\" solution, but rather the seed\nof a solution which you should review, customize, fix, and develop further.\n\nIt is intended that you use a \"point in time\" version of this software ─ it is\nnot intended that you can merge updates to this software into your own\nderivative in an automated fashion.\n\n<!-- SPONSORS_BEGIN -->\n\n## Crowd-funded open-source software\n\n**PLEASE DONATE.**\n\nTake this software and use it as the starting point to build your project. Go\nmake some money, and [give something back](https://graphile.org/sponsor/) to\nsupport us building more tools and kits for the Node, GraphQL and PostgreSQL\necosystems. We have made this project available under the simple and liberal MIT\nlicense to give you to a huge amount of freedom in how you use it, but this\nisn't possible without the help of our wonderful sponsors.\n\nWe need more people to join our sponsors so we can continue to bring about\nawesome projects like this. We'd love to spend more time on open source,\nbuilding tools that will save you and others even more time and money ─ please\nsponsor our open source efforts:\n\n### [Click here to find out more about sponsors and sponsorship.](https://www.graphile.org/sponsor/)\n\nAnd please give some love to our featured sponsors 🤩:\n\n<table><tr>\n<td align=\"center\"><a href=\"https://www.the-guild.dev/\"><img src=\"https://graphile.org/images/sponsors/theguild.png\" width=\"90\" height=\"90\" alt=\"The Guild\" /><br />The Guild</a> *</td>\n<td align=\"center\"><a href=\"https://gosteelhead.com/\"><img src=\"https://graphile.org/images/sponsors/steelhead.svg\" width=\"90\" height=\"90\" alt=\"Steelhead\" /><br />Steelhead</a> *</td>\n</tr></table>\n\n<em>\\* Sponsors the entire Graphile suite</em>\n\n<!-- SPONSORS_END -->\n\n## Table of contents\n\n- [Graphile Starter](#graphile-starter)\n  - [Take it for a spin!](#take-it-for-a-spin)\n  - [NOT FOR BEGINNERS](#not-for-beginners)\n  - [Purpose](#purpose)\n  - [Crowd-funded open-source software](#crowd-funded-open-source-software)\n    - [Click here to find out more about sponsors and sponsorship.](#click-here-to-find-out-more-about-sponsors-and-sponsorship)\n  - [Table of contents](#table-of-contents)\n  - [Features](#features)\n  - [Variants](#variants)\n  - [Prerequisites](#prerequisites)\n    - [Local development](#local-development)\n    - [Docker development](#docker-development)\n  - [Getting started](#getting-started)\n  - [Running](#running)\n  - [Making it yours](#making-it-yours)\n  - [Docker development](#docker-development-1)\n  - [Building the production docker image](#building-the-production-docker-image)\n  - [Production build for local mode](#production-build-for-local-mode)\n  - [Deploying to Heroku](#deploying-to-heroku)\n  - [Cleanup](#cleanup)\n  - [Custom packages](#custom-packages)\n  - [MIT License](#mit-license)\n\n## Features\n\nGraphile Starter is a full-stack [GraphQL](https://graphql.org/learn/) and\n[React](https://reactjs.org/) project, with server-side rendering (SSR) and\nrouting thanks to [Next.js](https://nextjs.org/). The backend is a beautiful\npairing of Node.js and PostgreSQL running on Express.js, enabled by\n[PostGraphile](https://www.graphile.org/postgraphile/) in library mode. The\nfrontend uses the [AntD](https://ant.design/) design framework to accelerate\ndevelopment. The entire stack is written in TypeScript, with auto-generated\nGraphQL types and operations thanks to\n[graphql-code-generator](https://github.com/dotansimha/graphql-code-generator).\n\nThere are four tenets to Graphile Starter:\n\n- Speedy development\n- Batteries included\n- Type safety\n- Best practices\n\nGraphile Starter is easy to start and everything is pre-configured as much as\npossible.\n\n**Speedy development**: hot reloading, easy debugging, Graphile's\n[idempotent migration system](https://github.com/graphile/migrate),\n[job queue](/TECHNICAL_DECISIONS.md#job-queue) and server middleware ready to\nuse; not to mention deep integration with VSCode should you use that editor:\nplugin recommendations, pre-configured settings, ESLint and Prettier integration\nand debugging profiles\n\n**Batteries included**: full user system and OAuth, AntD design framework, Jest\nand [Cypress end-to-end](/TECHNICAL_DECISIONS.md#cypress-e2e-tests) testing,\nsecurity, email templating and transport, pre-configured linting and code\nformatting, deployment instructions, and more\n\n**Type safety**: pre-configured type checking, strongly typed throughout with\nTypeScript\n\n**Best practices**: React, GraphQL, PostGraphile, Node, Jest and Cypress best\npractices\n\nSee [TECHNICAL_DECISIONS.md](TECHNICAL_DECISIONS.md) for a more detailed list of\nfeatures included and the technical decisions behind them.\n\n## Variants\n\nSince this is a highly opinionated starter; community members may have slightly\ndifferent opinions and may choose to maintain forks of this project that apply\ntheir own opinions. A few of these are listed below; if you maintain a fork of\nthis project please make a note at the top of your own README, and add it to\nthis list:\n\n- [Vue 3 + Vite SSR variant](https://github.com/xvaara/graphile-starter-vite-ssr-vue3-apollo) -\n  replaces Next.js with Vue and Vite SSR\n- [Nuxt.js variant](https://github.com/JoeSchr/graphile-starter) - replaces\n  Next.js for Vue users\n- [Create React App variant](https://github.com/alexk111/graphile-starter-cra) -\n  replaces Next.js for apps without Server Side Rendering\n- [Remix variant](https://github.com/fnimick/graphile-starter-remix-or-sveltekit) -\n  replaces Next.js with Remix\n- [Sveltekit variant](https://github.com/fnimick/graphile-starter-remix-or-sveltekit/tree/sveltekit) -\n  replaces Next.js with Sveltekit\n\n**VARIANTS ARE NOT OFFICIALLY SUPPORTED** and may become out of date or\nunmaintained over time. If you have issues with variants, please submit issues\nor PRs to the projects in question, not to this project.\n\n## Prerequisites\n\nYou can either work with this project locally (directly on your machine) or use\na pre-configured Docker environment. We'll differentiate this in the README with\na table like this one:\n\n| Local mode                      | OR  | Docker mode                              |\n| ------------------------------- | :-: | ---------------------------------------- |\n| _command for local development_ | or  | _command for docker-compose development_ |\n\n**Be careful not to mix and match Docker-mode vs local-mode for development.**\nYou should make a choice and stick to it. (Developing locally but deploying with\n`production.Docker` is absolutely fine.)\n\n**IMPORTANT**: If you choose the Docker mode, be sure to read\n[docker/README.","default_branch":"main","files":294,"tree":[".devcontainer/devcontainer.json",".dockerignore",".editorconfig",".env.ci",".eslintignore",".eslintrc.js",".gitattributes",".github/workflows/cypress.yml",".github/workflows/nodejs.yml",".github/workflows/pgrita.yml",".github/workflows/production-docker.yml",".github/workflows/test-docker.js",".github/workflows/windows-nodejs.yml",".gitignore",".vscode/README.md",".vscode/extensions.json",".vscode/launch.json",".vscode/settings.json",".vscode/spellright.dict",".yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs",".yarn/plugins/@yarnpkg/plugin-typescript.cjs",".yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs",".yarn/releases/yarn-3.4.1.cjs",".yarnrc.yml","@app/README.md","@app/__tests__/README.md","@app/__tests__/helpers.ts","@app/client/.babelrc","@app/client/README.md","@app/client/babel.config.js","@app/client/jest.config.js","@app/client/package.json","@app/client/src/graphql/AcceptOrganizationInvite.graphql","@app/client/src/graphql/AddEmail.graphql","@app/client/src/graphql/ChangePassword.graphql","@app/client/src/graphql/ConfirmAccountDeletion.graphql","@app/client/src/graphql/CreateOrganization.graphql","@app/client/src/graphql/CurrentUserAuthentications.graphql","@app/client/src/graphql/CurrentUserUpdated.graphql","@app/client/src/graphql/DeleteEmail.graphql","@app/client/src/graphql/DeleteOrganization.graphql","@app/client/src/graphql/EmailsForm_User.graphql","@app/client/src/graphql/EmailsForm_UserEmail.graphql","@app/client/src/graphql/ForgotPassword.graphql","@app/client/src/graphql/InvitationDetail.graphql","@app/client/src/graphql/InviteToOrganization.graphql","@app/client/src/graphql/Login.graphql","@app/client/src/graphql/Logout.graphql","@app/client/src/graphql/MakeEmailPrimary.graphql","@app/client/src/graphql/OrganizationBySlug.graphql","@app/client/src/graphql/OrganizationMembers.graphql","@app/client/src/graphql/OrganizationPage.graphql","@app/client/src/graphql/OrganizationPage_Query.graphql","@app/client/src/graphql/ProfileSettingsForm_User.graphql","@app/client/src/graphql/Register.graphql","@app/client/src/graphql/RemoveFromOrganization.graphql","@app/client/src/graphql/RequestAccountDeletion.graphql","@app/client/src/graphql/ResendEmailVerification.graphql","@app/client/src/graphql/ResetPassword.graphql","@app/client/src/graphql/SettingsEmails.graphql","@app/client/src/graphql/SettingsPassword.graphql","@app/client/src/graphql/SettingsProfile.graphql","@app/client/src/graphql/Shared.graphql","@app/client/src/graphql/SharedLayout_Query.graphql","@app/client/src/graphql/TransferOrganizationBillingContact.graphql","@app/client/src/graphql/TransferOrganizationOwnership.graphql","@app/client/src/graphql/UnlinkUserAuthentication.graphql","@app/client/src/graphql/UpdateOrganization.graphql","@app/client/src/graphql/UpdateUser.graphql","@app/client/src/graphql/VerifyEmail.graphql","@app/client/src/next-env.d.ts","@app/client/src/next.config.js","@app/client/src/pages/_app.tsx","@app/client/src/pages/_document.tsx","@app/client/src/pages/_error.tsx","@app/client/src/pages/create-organization/index.tsx","@app/client/src/pages/forgot.tsx","@app/client/src/pages/index.tsx","@app/client/src/pages/invitations/accept.tsx","@app/client/src/pages/login.tsx","@app/client/src/pages/o/[slug]/index.tsx","@app/client/src/pages/o/[slug]/settings/delete.tsx","@app/client/src/pages/o/[slug]/settings/index.tsx","@app/client/src/pages/o/[slug]/settings/members.tsx","@app/client/src/pages/o/index.tsx","@app/client/src/pages/register.tsx","@app/client/src/pages/reset.tsx","@app/client/src/pages/settings/accounts.tsx","@app/client/src/pages/settings/delete.tsx","@app/client/src/pages/settings/emails.tsx","@app/client/src/pages/settings/index.tsx","@app/client/src/pages/settings/security.tsx","@app/client/src/pages/verify.tsx","@app/client/src/styles.css","@app/client/src/tsconfig.json","@app/components/README.md","@app/components/babel.config.js","@app/components/jest.config.js","@app/components/package.json","@app/components/src/ButtonLink.tsx","@app/components/src/ErrorAlert.tsx","@app/components/src/ErrorOccurred.tsx","@app/components/src/FourOhFour.tsx","@app/components/src/OrganizationSettingsLayout.tsx","@app/components/src/PasswordStrength.tsx","@app/components/src/Redirect.tsx","@app/components/src/SettingsLayout.tsx","@app/components/src/SharedLayout.tsx","@app/components/src/SocialLoginOptions.tsx","@app/components/src/SpinPadded.tsx","@app/components/src/StandardWidth.tsx","@app/components/src/Text.tsx","@app/components/src/Warn.tsx","@app/components/src/index.tsx","@app/components/src/organizationHooks.tsx","@app/components/tsconfig.json","@app/config/README.md","@app/config/babel.config.js","@app/config/env.js","@app/config/extra.js","@app/config/jest.config.js","@app/config/package.json","@app/config/src/index.ts","@app/config/tsconfig.json","@app/db/.gmrc","@app/db/CONVENTIONS.md","@app/db/README.md","@app/db/__tests__/.jest.watch.hack.json","@app/db/__tests__/README.md","@app/db/__tests__/app_private/functions/link_or_register_user.test.ts","@app/db/__tests__/app_private/functions/login.test.ts","@app/db/__tests__/app_private/functions/really_create_user.test.ts","@app/db/__tests__/app_public/functions/change_password.test.ts","@app/db/__tests__/app_public/functions/confirm_account_deletion.test.ts","@app/db/__tests__/app_public/functions/forgot_password.test.ts","@app/db/__tests__/app_public/functions/invite_to_organization.test.ts","@app/db/__tests__/app_public/functions/logout.test.ts","@app/db/__tests__/app_public/functions/reset_password.test.ts","@app/db/__tests__/app_public/tables/user_emails.test.ts","@app/db/__tests__/helpers.ts","@app/db/__tests__/jest.watch.hack.ts","@app/db/babel.config.js","@app/db/jest.config.js","@app/db/migrations/README.md","@app/db/migrations/afterReset.sql","@app/db/migrations/committed/000001.sql","@app/db/migrations/current/1-current.sql","@app/db/package.json","@app/db/scripts/dump-db.js","@app/db/scripts/test-seed.js","@app/db/scripts/wipe-if-demo","@app/e2e/README.md","@app/e2e/babel.config.js","@app/e2e/cypress.config.js","@app/e2e/cypress/e2e/homepage.cy.ts","@app/e2e/cypress/e2e/login.cy.ts","@app/e2e/cypress/e2e/manage_emails.cy.ts","@app/e2e/cypress/e2e/organization_create.cy.ts","@app/e2e/cypress/e2e/organization_page.cy.ts","@app/e2e/cypress/e2e/register_account.cy.ts","@app/e2e/cypress/e2e/subscriptions.cy.ts","@app/e2e/cypress/e2e/verify_email.cy.ts","@app/e2e/cypress/fixtures/example.json","@app/e2e/cypress/support/commands.ts","@app/e2e/cypress/support/e2e.js","@app/e2e/cypress/tsconfig.json","@app/e2e/jest.config.js","@app/e2e/package.json","@app/graphql/README.md","@app/graphql/babel.config.js","@app/graphql/codegen.yml","@app/graphql/jest.config.js","@app/graphql/package.json","@app/graphql/tsconfig.json","@app/lib/README.md","@app/lib/babel.config.js","@app/lib/jest.config.js","@app/lib/package.json","@app/lib/src/GraphileApolloLink.client.ts","@app/lib/src/GraphileApolloLink.ts","@app/lib/src/errors.ts","@app/lib/src/forms.ts","@app/lib/src/index.tsx","@app/lib/src/passwords.ts","@app/lib/src/withApollo.tsx","@app/lib/tsconfig.json","@app/server/README.md","@app/server/__tests__/helpers.ts","@app/server/__tests__/mutations/__snapshots__/register.test.ts.snap","@app/server/__tests__/mutations/register.test.ts","@app/server/__tests__/queries/__snapshots__/currentUser.test.ts.snap","@app/server/__tests__/queries/currentUser.test.ts","@app/server/babel.config.js","@app/server/error.html","@app/server/jest.config.js","@app/server/package.json","@app/server/postgraphile.tags.jsonc","@app/server/public/favicon.ico","@app/server/scripts/schema-export.ts","@app/server/src/.eslintrc.js","@app/server/src/app.ts","@app/server/src/cloudflare.ts","@app/server/src/fs.ts","@app/server/src/graphile.config.ts","@app/server/src/index.ts","@app/server/src/middleware/index.ts","@app/server/src/middleware/installCSRFProtection.ts","@app/server/src/middleware/installCypressServerCommand.ts","@app/server/src/middleware/installDatabasePools.ts","@app/server/src/middleware/installErrorHandler.ts","@app/server/src/middleware/installForceSSL.ts","@app/server/src/middleware/installHelmet.ts","@app/server/src/middleware/installLogging.ts","@app/server/src/middleware/installPassport.ts","@app/server/src/middleware/installPassportStrategy.ts","@app/server/src/middleware/installPostGraphile.ts","@app/server/src/middleware/installSSR.ts","@app/server/src/middleware/installSameOrigin.ts","@app/server/src/middleware/installSession.ts","@app/server/src/middleware/installSharedStatic.ts","@app/server/src/middleware/installWorkerUtils.ts","@app/server/src/plugins/Orders.ts","@app/server/src/plugins/PassportLoginPlugin.ts","@app/server/src/plugins/PrimaryKeyMutationsOnlyPlugin.ts","@app/server/src/plugins/RemoveQueryQueryPlugin.ts","@app/server/src/plugins/SubscriptionsPlugin.ts","@app/server/src/shutdownActions.ts","@app/server/src/utils/handleErrors.ts","@app/server/src/utils/index.ts","@app/server/tsconfig.json","@app/worker/README.md","@app/worker/babel.config.js","@app/worker/crontab","@app/worker/jest.config.js","@app/worker/package.json","@app/worker/src/fs.ts","@app/worker/src/tasks/organization_invitations__send_invite.ts","@app/worker/src/tasks/send_email.ts","@app/worker/src/tasks/user__audit.ts","@app/worker/src/tasks/user__forgot_password.ts","@app/worker/src/tasks/user__forgot_password_unregistered_email.ts","@app/worker/src/tasks/user__send_delete_account_email.ts","@app/worker/src/tasks/user_emails__send_verification.ts","@app/worker/src/transport.ts","@app/worker/templates/account_activity.mjml","@app/worker/templates/delete_account.mjml","@app/worker/templates/organization_invite.mjml","@app/worker/templates/password_reset.mjml","@app/worker/templates/password_reset_unregistered.mjml","@app/worker/templates/verify_email.mjml","@app/worker/tsconfig.json","CONTRIBUTING.md","Dockerfile","GRAPHILE_STARTER_LICENSE.md","LICENSE.md","Procfile","README.md","SPONSORS.md","TECHNICAL_DECISIONS.md","apollo.config.js","babel.config.js","data/README.md","data/amazon-rds-ca-cert.pem","data/schema.graphql","data/schema.sql","docker-compose.yml","docker/README.md","docker/package.json","docker/scripts/clean-volumes.js","docker/scripts/copy-local-config-and-ssh-creds.sh","docker/scripts/lsfix.sh","docker/scripts/yarn-setup.js","docker/setup.sh","dockerctl","docs/error_codes.md","docs/production_todo.md","heroku-setup.template","jest.config.base.js","jest.config.js","package.json","production.Dockerfile","scripts/_setup_utils.js","scripts/clean.js","scripts/delete-env-file.js","scripts/lib/dotenv.js","scripts/lib/random.js","scripts/lib/run.js","scripts/run-docker-with-env.js","scripts/setup_db.js","scripts/setup_env.js","scripts/start.js","scripts/test.js","tsconfig.json","yarn.lock"],"storefront":"/r/graphile","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/graphile/starter/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}