{"id":13725964,"url":"https://github.com/the-road-to-graphql/fullstack-apollo-express-postgresql-boilerplate","last_synced_at":"2025-05-16T10:05:47.390Z","repository":{"id":39897869,"uuid":"132398652","full_name":"the-road-to-graphql/fullstack-apollo-express-postgresql-boilerplate","owner":"the-road-to-graphql","description":"💥 A sophisticated GraphQL with Apollo, Express and PostgreSQL boilerplate project.","archived":false,"fork":false,"pushed_at":"2020-06-12T08:43:37.000Z","size":3075,"stargazers_count":1204,"open_issues_count":44,"forks_count":261,"subscribers_count":25,"default_branch":"master","last_synced_at":"2025-05-16T10:04:41.985Z","etag":null,"topics":["apollo-client","apollo-server","apollo-server-express","apollographql","authentication","authorization","boilerplate","fullstack","postgres","postgresql","postgresql-boilerplate","postgresql-database","react","react-apollo","react-apollo-graphql","reactjs","starter-kit"],"latest_commit_sha":null,"homepage":"https://roadtoreact.com","language":"JavaScript","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/the-road-to-graphql.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"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":"rwieruch","patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null}},"created_at":"2018-05-07T02:50:31.000Z","updated_at":"2025-04-14T19:43:51.000Z","dependencies_parsed_at":"2022-09-23T00:12:05.979Z","dependency_job_id":null,"html_url":"https://github.com/the-road-to-graphql/fullstack-apollo-express-postgresql-boilerplate","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/the-road-to-graphql%2Ffullstack-apollo-express-postgresql-boilerplate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/the-road-to-graphql%2Ffullstack-apollo-express-postgresql-boilerplate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/the-road-to-graphql%2Ffullstack-apollo-express-postgresql-boilerplate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/the-road-to-graphql%2Ffullstack-apollo-express-postgresql-boilerplate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/the-road-to-graphql","download_url":"https://codeload.github.com/the-road-to-graphql/fullstack-apollo-express-postgresql-boilerplate/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254509476,"owners_count":22082891,"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":["apollo-client","apollo-server","apollo-server-express","apollographql","authentication","authorization","boilerplate","fullstack","postgres","postgresql","postgresql-boilerplate","postgresql-database","react","react-apollo","react-apollo-graphql","reactjs","starter-kit"],"created_at":"2024-08-03T01:02:44.167Z","updated_at":"2025-05-16T10:05:47.261Z","avatar_url":"https://github.com/the-road-to-graphql.png","language":"JavaScript","funding_links":["https://github.com/sponsors/rwieruch"],"categories":["HarmonyOS","JavaScript","📦 Legacy \u0026 Inactive Projects"],"sub_categories":["Windows Manager"],"readme":"# fullstack-apollo-express-postgresql-boilerplate\n\n[![Build Status](https://travis-ci.org/the-road-to-graphql/fullstack-apollo-express-postgresql-boilerplate.svg?branch=master)](https://travis-ci.org/the-road-to-graphql/fullstack-apollo-express-postgresql-boilerplate) [![Slack](https://slack-the-road-to-learn-react.wieruch.com/badge.svg)](https://slack-the-road-to-learn-react.wieruch.com/) [![Greenkeeper badge](https://badges.greenkeeper.io/the-road-to-graphql/fullstack-apollo-express-postgresql-boilerplate.svg)](https://greenkeeper.io/)\n\nA full-fledged Apollo Server with Apollo Client starter project with React and Express. [Read more about it in this tutorial to build it yourself](https://www.robinwieruch.de/graphql-apollo-server-tutorial/).\n\n**Family of universal fullstack repositories:**\n\nServer Applications:\n\n* [Node.js with Express + MongoDB](https://github.com/the-road-to-graphql/fullstack-apollo-express-mongodb-boilerplate)\n* [Node.js with Express + PostgreSQL](https://github.com/the-road-to-graphql/fullstack-apollo-express-postgresql-boilerplate)\n\nClient Applications:\n\n* [React Client](https://github.com/the-road-to-graphql/fullstack-apollo-react-boilerplate)\n* [React Native Client](https://github.com/morenoh149/fullstack-apollo-react-native-boilerplate)\n\n## Features of Client + Server\n\n* React (create-react-app) with Apollo Client\n  * Queries, Mutations, Subscriptions\n* Node.js with Express and Apollo Server\n  * cursor-based Pagination\n* PostgreSQL Database with Sequelize\n  * entities: users, messages\n* Authentication\n  * powered by JWT and local storage\n  * Sign Up, Sign In, Sign Out\n* Authorization\n  * protected endpoint (e.g. verify valid session)\n  * protected resolvers (e.g. e.g. session-based, role-based)\n  * protected routes (e.g. session-based, role-based)\n* performance optimizations\n  * example of using Facebook's dataloader\n* E2E testing\n\n## Installation\n\n* `git clone git@github.com:the-road-to-graphql/fullstack-apollo-express-postgresql-boilerplate.git`\n* `cd fullstack-apollo-express-postgresql-boilerplate`\n* `touch .env`\n* `npm install`\n* fill out *.env file* (see below)\n* start PostgreSQL database\n* `npm start`\n* visit `http://localhost:8000` for GraphQL playground\n\n#### .env file\n\nSince this boilerplate project is using PostgreSQL, you have to install it for your machine and get a database up and running. You find everything for the set up over here: [Setup PostgreSQL with Sequelize in Express Tutorial](https://www.robinwieruch.de/postgres-express-setup-tutorial). After you have created a database and a database user, you can fill out the environment variables in the *server/.env* file.\n\n```\nDATABASE=mydatabase\n\nDATABASE_USER=postgres\nDATABASE_PASSWORD=postgres\n\nSECRET=asdlplplfwfwefwekwself.2342.dawasdq\n```\n\nThe `SECRET` is just a random string for your authentication. Keep all these information secure by adding the *.env* file to your *.gitignore* file. No third-party should have access to this information.\n\n#### Testing\n\n* adjust `test:run-server` npm script with `TEST_DATABASE` environment variable in package.json to match your testing database name\n  * to match it from package.json: `createdb mytestdatabase` with psql\n* one terminal: npm run test:run-server\n* second terminal: npm run test:execute-test\n\n## Want to learn more about React + GraphQL + Apollo?\n\n* Don't miss [upcoming Tutorials and Courses](https://www.getrevue.co/profile/rwieruch)\n* Check out current [React Courses](https://roadtoreact.com)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthe-road-to-graphql%2Ffullstack-apollo-express-postgresql-boilerplate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthe-road-to-graphql%2Ffullstack-apollo-express-postgresql-boilerplate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthe-road-to-graphql%2Ffullstack-apollo-express-postgresql-boilerplate/lists"}