├── .eslintrc.js ├── .github ├── FUNDING.yml └── ISSUE_TEMPLATE │ ├── bug_report.md │ └── feature_request.md ├── .gitignore ├── .npmrc ├── .prettierignore ├── .vscode ├── extensions.json ├── launch.json └── settings.json ├── LICENSE ├── README.md ├── img └── amity-logo.svg ├── lerna.json ├── package.json ├── packages ├── babel-plugin-expo-cfs-dotenv │ ├── LICENSE │ ├── package.json │ ├── src │ │ └── index.ts │ └── tsconfig.json ├── cfs-dotenv │ ├── LICENSE │ ├── config.js │ ├── package.json │ ├── src │ │ └── index.ts │ └── tsconfig.json ├── cfs-expo-auth0 │ ├── LICENSE │ ├── README.md │ ├── package.json │ ├── src │ │ └── index.tsx │ └── tsconfig.json ├── cfs-pulumi-auth0 │ ├── .eslintrc.js │ ├── LICENSE │ ├── package.json │ ├── src │ │ └── index.ts │ └── tsconfig.json ├── cfs-pulumi-aws │ ├── .eslintrc.js │ ├── LICENSE │ ├── package.json │ ├── src │ │ ├── common.ts │ │ ├── components │ │ │ ├── certificate.ts │ │ │ ├── fargate.ts │ │ │ ├── rds.ts │ │ │ └── staticWebsite.ts │ │ ├── index.ts │ │ ├── providers │ │ │ ├── invalidateCloudfront.ts │ │ │ └── syncWeb.ts │ │ └── utils.ts │ ├── tsconfig.json │ └── typings │ │ └── folder-hash │ │ └── index.d.ts ├── cfs-pulumi-expo │ ├── .eslintrc.js │ ├── LICENSE │ ├── package.json │ ├── src │ │ └── index.ts │ ├── tsconfig.json │ └── typings │ │ └── folder-hash │ │ └── index.d.ts ├── cfs-template-apollo-server-express-auth0 │ ├── .dockerignore │ ├── .eslintrc.js │ ├── .github │ │ └── workflows │ │ │ ├── pull_request.yml │ │ │ ├── push.yml │ │ │ └── push_master.yml │ ├── .prettierignore │ ├── .pulumi │ │ └── ci.json │ ├── .vscode │ │ ├── extensions.json │ │ ├── launch.json │ │ └── settings.json │ ├── .watchmanconfig │ ├── README.md │ ├── codegen.yml │ ├── docker-compose.yaml │ ├── gitignore │ ├── package.json │ ├── packages │ │ ├── common │ │ │ ├── package.json │ │ │ ├── src │ │ │ │ ├── graphql │ │ │ │ │ ├── __generated__ │ │ │ │ │ │ └── index.ts │ │ │ │ │ ├── todos.graphql │ │ │ │ │ ├── useCreateTodo.ts │ │ │ │ │ └── useDeleteTodo.ts │ │ │ │ └── index.ts │ │ │ └── tsconfig.json │ │ ├── mobile │ │ │ ├── .env.development │ │ │ ├── .expo-shared │ │ │ │ └── assets.json │ │ │ ├── App.tsx │ │ │ ├── README.md │ │ │ ├── __generated__ │ │ │ │ └── AppEntry.js │ │ │ ├── app.json │ │ │ ├── assets │ │ │ │ ├── favicon.png │ │ │ │ ├── icon.png │ │ │ │ └── splash.png │ │ │ ├── babel.config.js │ │ │ ├── gitignore │ │ │ ├── metro.config.js │ │ │ ├── package.json │ │ │ ├── src │ │ │ │ ├── components │ │ │ │ │ ├── CreateTodo.tsx │ │ │ │ │ ├── DrawerContent.tsx │ │ │ │ │ ├── Header.tsx │ │ │ │ │ └── Todo.tsx │ │ │ │ ├── containers │ │ │ │ │ ├── About.test.tsx │ │ │ │ │ ├── About.tsx │ │ │ │ │ ├── Navigator.tsx │ │ │ │ │ ├── SignIn.tsx │ │ │ │ │ ├── Todos.test.tsx │ │ │ │ │ └── Todos.tsx │ │ │ │ ├── setupTests.ts │ │ │ │ └── utils │ │ │ │ │ ├── getApolloClient.ts │ │ │ │ │ ├── testMocks.ts │ │ │ │ │ └── types.ts │ │ │ └── tsconfig.json │ │ ├── pulumi-aws │ │ │ ├── .eslintrc.js │ │ │ ├── Pulumi.development.yaml │ │ │ ├── Pulumi.production.yaml │ │ │ ├── Pulumi.yaml │ │ │ ├── index.ts │ │ │ ├── package.json │ │ │ └── tsconfig.json │ │ ├── server │ │ │ ├── .env.development │ │ │ ├── Dockerfile │ │ │ ├── README.md │ │ │ ├── ormconfig.js │ │ │ ├── package.json │ │ │ ├── src │ │ │ │ ├── __snapshots__ │ │ │ │ │ └── getResolvers.test.ts.snap │ │ │ │ ├── entity │ │ │ │ │ └── Todo.ts │ │ │ │ ├── getResolvers.test.ts │ │ │ │ ├── getResolvers.ts │ │ │ │ ├── graphql │ │ │ │ │ ├── __generated__ │ │ │ │ │ │ └── index.ts │ │ │ │ │ └── schema.ts │ │ │ │ └── index.ts │ │ │ ├── tsconfig.build.json │ │ │ └── tsconfig.json │ │ └── web │ │ │ ├── .env │ │ │ ├── .env.development │ │ │ ├── README.md │ │ │ ├── package.json │ │ │ ├── public │ │ │ ├── favicon.ico │ │ │ ├── index.html │ │ │ ├── logo192.png │ │ │ ├── logo512.png │ │ │ ├── manifest.json │ │ │ └── robots.txt │ │ │ ├── src │ │ │ ├── App.test.tsx │ │ │ ├── App.tsx │ │ │ ├── components │ │ │ │ ├── CreateTodo.tsx │ │ │ │ ├── Header.tsx │ │ │ │ ├── PrivateRoute.tsx │ │ │ │ ├── Sidebar.tsx │ │ │ │ └── Todo.tsx │ │ │ ├── containers │ │ │ │ ├── About.test.tsx │ │ │ │ ├── About.tsx │ │ │ │ ├── Todos.test.tsx │ │ │ │ └── Todos.tsx │ │ │ ├── index.css │ │ │ ├── index.tsx │ │ │ ├── react-app-env.d.ts │ │ │ ├── reportWebVitals.ts │ │ │ ├── setupTests.ts │ │ │ └── utils │ │ │ │ └── getApolloClient.ts │ │ │ └── tsconfig.json │ ├── postgres │ │ └── .env.development │ ├── template.DEVELOPMENT.md │ ├── template.PRODUCTION.md │ ├── template.README.md │ ├── template.package.json │ └── tsconfig.json ├── cfs-template-apollo-server-express-no-auth │ ├── .eslintrc.js │ ├── .github │ │ └── workflows │ │ │ ├── pull_request.yml │ │ │ ├── push.yml │ │ │ └── push_master.yml │ ├── .prettierignore │ ├── .pulumi │ │ └── ci.json │ ├── .vscode │ │ ├── extensions.json │ │ ├── launch.json │ │ └── settings.json │ ├── .watchmanconfig │ ├── README.md │ ├── codegen.yml │ ├── docker-compose.yaml │ ├── gitignore │ ├── package.json │ ├── packages │ │ ├── common │ │ │ ├── package.json │ │ │ ├── src │ │ │ │ ├── graphql │ │ │ │ │ ├── __generated__ │ │ │ │ │ │ └── index.ts │ │ │ │ │ ├── todos.graphql │ │ │ │ │ ├── useCreateTodo.ts │ │ │ │ │ └── useDeleteTodo.ts │ │ │ │ └── index.ts │ │ │ └── tsconfig.json │ │ ├── mobile │ │ │ ├── .expo-shared │ │ │ │ └── assets.json │ │ │ ├── App.tsx │ │ │ ├── README.md │ │ │ ├── __generated__ │ │ │ │ └── AppEntry.js │ │ │ ├── app.json │ │ │ ├── assets │ │ │ │ ├── favicon.png │ │ │ │ ├── icon.png │ │ │ │ └── splash.png │ │ │ ├── babel.config.js │ │ │ ├── gitignore │ │ │ ├── metro.config.js │ │ │ ├── package.json │ │ │ ├── src │ │ │ │ ├── components │ │ │ │ │ ├── CreateTodo.tsx │ │ │ │ │ ├── Header.tsx │ │ │ │ │ └── Todo.tsx │ │ │ │ ├── containers │ │ │ │ │ ├── About.test.tsx │ │ │ │ │ ├── About.tsx │ │ │ │ │ ├── Todos.test.tsx │ │ │ │ │ └── Todos.tsx │ │ │ │ ├── setupTests.ts │ │ │ │ └── utils │ │ │ │ │ ├── apolloClient.ts │ │ │ │ │ ├── testMocks.ts │ │ │ │ │ └── types.ts │ │ │ └── tsconfig.json │ │ ├── pulumi-aws │ │ │ ├── .eslintrc.js │ │ │ ├── Pulumi.production.yaml │ │ │ ├── Pulumi.yaml │ │ │ ├── index.ts │ │ │ ├── package.json │ │ │ └── tsconfig.json │ │ ├── server │ │ │ ├── .dockerignore │ │ │ ├── .env.development │ │ │ ├── Dockerfile │ │ │ ├── README.md │ │ │ ├── ormconfig.js │ │ │ ├── package.json │ │ │ ├── src │ │ │ │ ├── __snapshots__ │ │ │ │ │ └── getResolvers.test.ts.snap │ │ │ │ ├── entity │ │ │ │ │ └── Todo.ts │ │ │ │ ├── getResolvers.test.ts │ │ │ │ ├── getResolvers.ts │ │ │ │ ├── graphql │ │ │ │ │ ├── __generated__ │ │ │ │ │ │ └── index.ts │ │ │ │ │ └── schema.ts │ │ │ │ └── index.ts │ │ │ ├── tsconfig.build.json │ │ │ └── tsconfig.json │ │ └── web │ │ │ ├── .env │ │ │ ├── .env.development │ │ │ ├── README.md │ │ │ ├── package.json │ │ │ ├── public │ │ │ ├── favicon.ico │ │ │ ├── index.html │ │ │ ├── logo192.png │ │ │ ├── logo512.png │ │ │ ├── manifest.json │ │ │ └── robots.txt │ │ │ ├── src │ │ │ ├── App.test.tsx │ │ │ ├── App.tsx │ │ │ ├── components │ │ │ │ ├── CreateTodo.tsx │ │ │ │ ├── Header.tsx │ │ │ │ ├── Sidebar.tsx │ │ │ │ └── Todo.tsx │ │ │ ├── containers │ │ │ │ ├── About.test.tsx │ │ │ │ ├── About.tsx │ │ │ │ ├── Todos.test.tsx │ │ │ │ └── Todos.tsx │ │ │ ├── index.css │ │ │ ├── index.tsx │ │ │ ├── react-app-env.d.ts │ │ │ ├── reportWebVitals.ts │ │ │ └── setupTests.ts │ │ │ └── tsconfig.json │ ├── postgres │ │ └── .env.development │ ├── template.DEVELOPMENT.md │ ├── template.PRODUCTION.md │ ├── template.README.md │ ├── template.package.json │ └── tsconfig.json ├── cfs-template-hasura-auth0 │ ├── .eslintrc.js │ ├── .github │ │ └── workflows │ │ │ ├── pull_request.yml │ │ │ ├── push.yml │ │ │ └── push_master.yml │ ├── .prettierignore │ ├── .pulumi │ │ └── ci.json │ ├── .vscode │ │ ├── extensions.json │ │ ├── launch.json │ │ └── settings.json │ ├── .watchmanconfig │ ├── README.md │ ├── codegen.yml │ ├── docker-compose.yaml │ ├── gitignore │ ├── hasura │ │ ├── .env.development │ │ ├── Dockerfile │ │ ├── README.md │ │ ├── config.yaml │ │ ├── metadata │ │ │ ├── actions.graphql │ │ │ ├── actions.yaml │ │ │ ├── allow_list.yaml │ │ │ ├── functions.yaml │ │ │ ├── query_collections.yaml │ │ │ ├── remote_schemas.yaml │ │ │ ├── tables.yaml │ │ │ └── version.yaml │ │ └── migrations │ │ │ ├── 1590186473974_create_table_public_todos │ │ │ ├── down.sql │ │ │ └── up.sql │ │ │ └── 1590213038516_alter_table_public_todos_add_column_uid │ │ │ ├── down.sql │ │ │ └── up.sql │ ├── package.json │ ├── packages │ │ ├── common │ │ │ ├── package.json │ │ │ ├── src │ │ │ │ ├── graphql │ │ │ │ │ ├── __generated__ │ │ │ │ │ │ └── index.ts │ │ │ │ │ ├── todos.graphql │ │ │ │ │ ├── useCreateTodo.ts │ │ │ │ │ └── useDeleteTodo.ts │ │ │ │ └── index.ts │ │ │ └── tsconfig.json │ │ ├── mobile │ │ │ ├── .env.development │ │ │ ├── .expo-shared │ │ │ │ └── assets.json │ │ │ ├── App.tsx │ │ │ ├── README.md │ │ │ ├── __generated__ │ │ │ │ └── AppEntry.js │ │ │ ├── app.json │ │ │ ├── assets │ │ │ │ ├── favicon.png │ │ │ │ ├── icon.png │ │ │ │ └── splash.png │ │ │ ├── babel.config.js │ │ │ ├── gitignore │ │ │ ├── metro.config.js │ │ │ ├── package.json │ │ │ ├── src │ │ │ │ ├── components │ │ │ │ │ ├── CreateTodo.tsx │ │ │ │ │ ├── DrawerContent.tsx │ │ │ │ │ ├── Header.tsx │ │ │ │ │ └── Todo.tsx │ │ │ │ ├── containers │ │ │ │ │ ├── About.test.tsx │ │ │ │ │ ├── About.tsx │ │ │ │ │ ├── Navigator.tsx │ │ │ │ │ ├── SignIn.tsx │ │ │ │ │ ├── Todos.test.tsx │ │ │ │ │ └── Todos.tsx │ │ │ │ ├── setupTests.ts │ │ │ │ └── utils │ │ │ │ │ ├── getApolloClient.ts │ │ │ │ │ ├── testMocks.ts │ │ │ │ │ └── types.ts │ │ │ └── tsconfig.json │ │ ├── pulumi-aws │ │ │ ├── .eslintrc.js │ │ │ ├── Pulumi.development.yaml │ │ │ ├── Pulumi.production.yaml │ │ │ ├── Pulumi.yaml │ │ │ ├── auth0-rules │ │ │ │ └── hasuraAccessToken.js │ │ │ ├── index.ts │ │ │ ├── package.json │ │ │ └── tsconfig.json │ │ └── web │ │ │ ├── .env │ │ │ ├── .env.development │ │ │ ├── README.md │ │ │ ├── package.json │ │ │ ├── public │ │ │ ├── favicon.ico │ │ │ ├── index.html │ │ │ ├── logo192.png │ │ │ ├── logo512.png │ │ │ ├── manifest.json │ │ │ └── robots.txt │ │ │ ├── src │ │ │ ├── App.test.tsx │ │ │ ├── App.tsx │ │ │ ├── components │ │ │ │ ├── CreateTodo.tsx │ │ │ │ ├── Header.tsx │ │ │ │ ├── PrivateRoute.tsx │ │ │ │ ├── Sidebar.tsx │ │ │ │ └── Todo.tsx │ │ │ ├── containers │ │ │ │ ├── About.test.tsx │ │ │ │ ├── About.tsx │ │ │ │ ├── Todos.test.tsx │ │ │ │ └── Todos.tsx │ │ │ ├── index.css │ │ │ ├── index.tsx │ │ │ ├── react-app-env.d.ts │ │ │ ├── reportWebVitals.ts │ │ │ ├── setupTests.ts │ │ │ └── utils │ │ │ │ └── getApolloClient.ts │ │ │ └── tsconfig.json │ ├── postgres │ │ └── .env.development │ ├── template.DEVELOPMENT.md │ ├── template.PRODUCTION.md │ ├── template.README.md │ ├── template.package.json │ └── tsconfig.json ├── cfs-template-hasura-no-auth │ ├── .eslintrc.js │ ├── .github │ │ └── workflows │ │ │ ├── pull_request.yml │ │ │ ├── push.yml │ │ │ └── push_master.yml │ ├── .prettierignore │ ├── .pulumi │ │ └── ci.json │ ├── .vscode │ │ ├── extensions.json │ │ ├── launch.json │ │ └── settings.json │ ├── .watchmanconfig │ ├── README.md │ ├── codegen.yml │ ├── docker-compose.yaml │ ├── gitignore │ ├── hasura │ │ ├── .env.development │ │ ├── Dockerfile │ │ ├── README.md │ │ ├── config.yaml │ │ ├── metadata │ │ │ ├── actions.graphql │ │ │ ├── actions.yaml │ │ │ ├── allow_list.yaml │ │ │ ├── functions.yaml │ │ │ ├── query_collections.yaml │ │ │ ├── remote_schemas.yaml │ │ │ ├── tables.yaml │ │ │ └── version.yaml │ │ └── migrations │ │ │ └── 1590186473974_create_table_public_todos │ │ │ ├── down.sql │ │ │ └── up.sql │ ├── package.json │ ├── packages │ │ ├── common │ │ │ ├── package.json │ │ │ ├── src │ │ │ │ ├── graphql │ │ │ │ │ ├── __generated__ │ │ │ │ │ │ └── index.ts │ │ │ │ │ ├── todos.graphql │ │ │ │ │ ├── useCreateTodo.ts │ │ │ │ │ └── useDeleteTodo.ts │ │ │ │ └── index.ts │ │ │ └── tsconfig.json │ │ ├── mobile │ │ │ ├── .expo-shared │ │ │ │ └── assets.json │ │ │ ├── App.tsx │ │ │ ├── README.md │ │ │ ├── __generated__ │ │ │ │ └── AppEntry.js │ │ │ ├── app.json │ │ │ ├── assets │ │ │ │ ├── favicon.png │ │ │ │ ├── icon.png │ │ │ │ └── splash.png │ │ │ ├── babel.config.js │ │ │ ├── gitignore │ │ │ ├── metro.config.js │ │ │ ├── package.json │ │ │ ├── src │ │ │ │ ├── components │ │ │ │ │ ├── CreateTodo.tsx │ │ │ │ │ ├── Header.tsx │ │ │ │ │ └── Todo.tsx │ │ │ │ ├── containers │ │ │ │ │ ├── About.test.tsx │ │ │ │ │ ├── About.tsx │ │ │ │ │ ├── Todos.test.tsx │ │ │ │ │ └── Todos.tsx │ │ │ │ ├── setupTests.ts │ │ │ │ └── utils │ │ │ │ │ ├── apolloClient.ts │ │ │ │ │ ├── testMocks.ts │ │ │ │ │ └── types.ts │ │ │ └── tsconfig.json │ │ ├── pulumi-aws │ │ │ ├── .eslintrc.js │ │ │ ├── Pulumi.production.yaml │ │ │ ├── Pulumi.yaml │ │ │ ├── index.ts │ │ │ ├── package.json │ │ │ └── tsconfig.json │ │ └── web │ │ │ ├── .env │ │ │ ├── .env.development │ │ │ ├── README.md │ │ │ ├── package.json │ │ │ ├── public │ │ │ ├── favicon.ico │ │ │ ├── index.html │ │ │ ├── logo192.png │ │ │ ├── logo512.png │ │ │ ├── manifest.json │ │ │ └── robots.txt │ │ │ ├── src │ │ │ ├── App.test.tsx │ │ │ ├── App.tsx │ │ │ ├── components │ │ │ │ ├── CreateTodo.tsx │ │ │ │ ├── Header.tsx │ │ │ │ ├── Sidebar.tsx │ │ │ │ └── Todo.tsx │ │ │ ├── containers │ │ │ │ ├── About.test.tsx │ │ │ │ ├── About.tsx │ │ │ │ ├── Todos.test.tsx │ │ │ │ └── Todos.tsx │ │ │ ├── index.css │ │ │ ├── index.tsx │ │ │ ├── react-app-env.d.ts │ │ │ ├── reportWebVitals.ts │ │ │ └── setupTests.ts │ │ │ └── tsconfig.json │ ├── postgres │ │ └── .env.development │ ├── template.DEVELOPMENT.md │ ├── template.PRODUCTION.md │ ├── template.README.md │ ├── template.package.json │ └── tsconfig.json ├── create-full-stack │ ├── LICENSE │ ├── README.md │ ├── package.json │ ├── src │ │ ├── constants.ts │ │ ├── copyTemplate.ts │ │ ├── createReactAppUtils.ts │ │ ├── index.ts │ │ └── utils.ts │ └── tsconfig.json ├── docusaurus │ ├── .gitignore │ ├── README.md │ ├── babel.config.js │ ├── blog │ │ ├── 2019-05-15-rule_them_all.md │ │ └── 2020-10-07-create_full_stack_story.md │ ├── docs │ │ ├── auth.md │ │ ├── available_scripts.md │ │ ├── backend.md │ │ ├── cicd.md │ │ ├── cloud.md │ │ ├── configuration.md │ │ ├── folder_structure.md │ │ ├── getting_started.md │ │ ├── libraries_and_frameworks.md │ │ ├── migrations.md │ │ ├── mobile.md │ │ ├── troubleshooting.md │ │ ├── tutorial_apollo_server_express.md │ │ ├── tutorial_hasura.md │ │ ├── web.md │ │ └── why.md │ ├── docusaurus.config.js │ ├── package.json │ ├── sidebars.js │ ├── src │ │ ├── css │ │ │ └── custom.css │ │ └── pages │ │ │ ├── index.tsx │ │ │ └── styles.module.css │ ├── static │ │ ├── .nojekyll │ │ ├── CNAME │ │ ├── img │ │ │ ├── add_date_mobile.png │ │ │ ├── add_date_web.png │ │ │ ├── apollo.svg │ │ │ ├── arrow_drop_down-24px.svg │ │ │ ├── auth0.svg │ │ │ ├── aws.svg │ │ │ ├── block-24px.svg │ │ │ ├── expo.svg │ │ │ ├── favicon.ico │ │ │ ├── framework.svg │ │ │ ├── github.svg │ │ │ ├── hasura.svg │ │ │ ├── hasura_add_date.png │ │ │ ├── hasura_permissions_insert_date.png │ │ │ ├── hasura_permissions_select_date.png │ │ │ ├── logo.svg │ │ │ ├── mobile1.png │ │ │ ├── mobile2.png │ │ │ ├── react.svg │ │ │ ├── readme │ │ │ │ ├── README.md │ │ │ │ ├── auth0_api_identifier.png │ │ │ │ ├── auth0_api_offline_access.png │ │ │ │ ├── auth0_api_settings.png │ │ │ │ ├── auth0_create_api.png │ │ │ │ ├── auth0_create_application.png │ │ │ │ ├── auth0_create_rule.png │ │ │ │ ├── auth0_m2m.png │ │ │ │ ├── auth0_m2m_scopes.png │ │ │ │ ├── auth0_m2m_settings.png │ │ │ │ ├── auth0_native.png │ │ │ │ ├── auth0_native_refresh_token.png │ │ │ │ ├── auth0_native_settings.png │ │ │ │ ├── auth0_native_urls.png │ │ │ │ ├── auth0_rule.png │ │ │ │ ├── auth0_rule_select.png │ │ │ │ ├── auth0_signup.png │ │ │ │ ├── auth0_spa.png │ │ │ │ ├── auth0_spa_settings.png │ │ │ │ ├── auth0_spa_urls.png │ │ │ │ ├── auth0_tenant.png │ │ │ │ ├── auth0_universal_login.png │ │ │ │ ├── aws_access_key.png │ │ │ │ ├── github_secrets.png │ │ │ │ └── pulumi_access_token.png │ │ │ ├── rocket.svg │ │ │ ├── typescript.svg │ │ │ ├── typescript_comparison.png │ │ │ ├── web1.png │ │ │ └── web2.png │ │ └── pdf │ │ │ └── typestudy.pdf │ └── tsconfig.json └── eslint-config-create-full-stack │ ├── LICENSE │ ├── README.md │ ├── index.js │ ├── package.json │ └── tsconfig.json ├── tsconfig.json └── yarn.lock /.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | extends: "eslint-config-create-full-stack", 3 | rules: { 4 | "unicorn/no-process-exit": "off", 5 | "no-console": "off", 6 | }, 7 | }; 8 | -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | github: tiagob 2 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Describe the bug** 11 | A clear and concise description of what the bug is. 12 | 13 | **To Reproduce** 14 | Steps to reproduce the behavior: 15 | 1. Go to '...' 16 | 2. Click on '....' 17 | 3. Scroll down to '....' 18 | 4. See error 19 | 20 | **Expected behavior** 21 | A clear and concise description of what you expected to happen. 22 | 23 | **Desktop (please complete the following information):** 24 | - OS: [e.g. iOS] 25 | - Browser [e.g. chrome, safari] 26 | - Version [e.g. 22] 27 | 28 | **Additional context** 29 | Add any other context about the problem here. 30 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an idea for this project 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Is your feature request related to a problem? Please describe.** 11 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] 12 | 13 | **Describe the solution you'd like** 14 | A clear and concise description of what you want to happen. 15 | 16 | **Describe alternatives you've considered** 17 | A clear and concise description of any alternative solutions or features you've considered. 18 | 19 | **Additional context** 20 | Add any other context or screenshots about the feature request here. 21 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | node_modules 5 | .pnp 6 | .pnp.js 7 | 8 | # testing 9 | coverage 10 | 11 | # production 12 | build 13 | 14 | # misc 15 | .DS_Store 16 | .env.local 17 | .env.development.local 18 | .env.test.local 19 | .env.production.local 20 | 21 | npm-debug.log* 22 | yarn-debug.log* 23 | yarn-error.log* 24 | 25 | # lerna, lerna-changelog 26 | lerna-debug.log 27 | /.changelog 28 | 29 | # templates 30 | packages/create-full-stack/templates/**/yarn.lock 31 | -------------------------------------------------------------------------------- /.npmrc: -------------------------------------------------------------------------------- 1 | scripts-prepend-node-path=true 2 | -------------------------------------------------------------------------------- /.prettierignore: -------------------------------------------------------------------------------- 1 | build 2 | 3 | # generated hasura metadata 4 | **/hasura/metadata 5 | -------------------------------------------------------------------------------- /.vscode/extensions.json: -------------------------------------------------------------------------------- 1 | { 2 | "recommendations": [ 3 | "dbaeumer.vscode-eslint", 4 | "esbenp.prettier-vscode", 5 | "ms-azuretools.vscode-docker", 6 | "streetsidesoftware.code-spell-checker" 7 | ] 8 | } 9 | -------------------------------------------------------------------------------- /.vscode/launch.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "0.2.0", 3 | "configurations": [ 4 | { 5 | "type": "node", 6 | "request": "attach", 7 | "name": "Attach by Process ID", 8 | "processId": "${command:PickProcess}", 9 | "protocol": "inspector" 10 | } 11 | ] 12 | } 13 | -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "editor.defaultFormatter": "esbenp.prettier-vscode", 3 | "editor.formatOnSave": true, 4 | "editor.codeActionsOnSave": { 5 | "source.fixAll": true 6 | }, 7 | "editor.tabSize": 2, 8 | "cSpell.words": [ 9 | "awsx", 10 | "fargate", 11 | "hasura", 12 | "postgres", 13 | "postgresql", 14 | "pulumi", 15 | "typeorm" 16 | ] 17 | } 18 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 Tiago 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /lerna.json: -------------------------------------------------------------------------------- 1 | { 2 | "packages": ["packages/*"], 3 | "npmClient": "yarn", 4 | "useWorkspaces": true, 5 | "version": "independent", 6 | "changelog": { 7 | "repo": "tiagob/create-full-stack", 8 | "labels": { 9 | "tag: new feature": ":rocket: New Feature", 10 | "tag: breaking change": ":boom: Breaking Change", 11 | "tag: bug fix": ":bug: Bug Fix", 12 | "tag: enhancement": ":nail_care: Enhancement", 13 | "tag: documentation": ":memo: Documentation", 14 | "tag: internal": ":house: Internal", 15 | "tag: underlying tools": ":hammer: Underlying Tools" 16 | }, 17 | "cacheDir": ".changelog" 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "0.1.0", 3 | "private": true, 4 | "workspaces": [ 5 | "packages/*" 6 | ], 7 | "scripts": { 8 | "changelog": "lerna-changelog", 9 | "lerna:changed": "lerna changed", 10 | "lerna:publish": "lerna publish", 11 | "lerna:version": "lerna version", 12 | "lint": "eslint packages/create-full-stack/src/**/*.ts --fix", 13 | "prettier": "prettier --write ." 14 | }, 15 | "husky": { 16 | "hooks": { 17 | "pre-commit": "lint-staged" 18 | } 19 | }, 20 | "lint-staged": { 21 | "*.{js,ts,tsx,graphql,json,md,yaml,yml,html,css}": "prettier --write", 22 | "src/**.{ts,tsx}": "eslint --fix" 23 | }, 24 | "devDependencies": { 25 | "@babel/core": "*", 26 | "@unimodules/core": "~5.5.0", 27 | "expo-application": "~2.3.0", 28 | "expo-auth-session": "~2.0.0", 29 | "husky": "^4.3.0", 30 | "lerna": "^3.22.1", 31 | "lerna-changelog": "^1.0.1", 32 | "lint-staged": "^10.3.0", 33 | "react": "~16.13.1", 34 | "react-native": "https://github.com/expo/react-native/archive/sdk-39.0.2.tar.gz" 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /packages/babel-plugin-expo-cfs-dotenv/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 Tiago 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /packages/babel-plugin-expo-cfs-dotenv/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "babel-plugin-expo-cfs-dotenv", 3 | "version": "0.1.4", 4 | "description": "Babel plugin for dotenv in Expo mobile apps in Create Full Stack", 5 | "bugs": { 6 | "url": "https://github.com/tiagob/create-full-stack/issues" 7 | }, 8 | "repository": { 9 | "type": "git", 10 | "url": "https://github.com/tiagob/create-full-stack.git", 11 | "directory": "packages/babel-plugin-expo-cfs-dotenv" 12 | }, 13 | "license": "MIT", 14 | "main": "build/index.js", 15 | "typings": "build/index.d.ts", 16 | "scripts": { 17 | "build": "tsc", 18 | "prepublishOnly": "yarn build" 19 | }, 20 | "dependencies": { 21 | "@babel/traverse": "^7.10.5", 22 | "@babel/types": "^7.10.5", 23 | "cfs-dotenv": "^0.1.7" 24 | }, 25 | "devDependencies": { 26 | "@types/babel__traverse": "^7.0.13" 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /packages/babel-plugin-expo-cfs-dotenv/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | // File paths are relative to the containing tsconfig.json file location 4 | // https://github.com/Microsoft/TypeScript/issues/24851 5 | "outDir": "build" 6 | }, 7 | "extends": "../../tsconfig" 8 | } 9 | -------------------------------------------------------------------------------- /packages/cfs-dotenv/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 Tiago 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /packages/cfs-dotenv/config.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line func-names 2 | (function () { 3 | // eslint-disable-next-line global-require 4 | require("./build").config(); 5 | })(); 6 | -------------------------------------------------------------------------------- /packages/cfs-dotenv/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "cfs-dotenv", 3 | "version": "0.1.7", 4 | "description": "Load dotenv files like CRA in Create Full Stack.", 5 | "bugs": { 6 | "url": "https://github.com/tiagob/create-full-stack/issues" 7 | }, 8 | "repository": { 9 | "type": "git", 10 | "url": "https://github.com/tiagob/create-full-stack.git", 11 | "directory": "packages/cfs-dotenv" 12 | }, 13 | "license": "MIT", 14 | "main": "build/index.js", 15 | "typings": "build/index.d.ts", 16 | "scripts": { 17 | "build": "tsc", 18 | "prepublishOnly": "yarn build" 19 | }, 20 | "dependencies": { 21 | "dotenv": "^8.2.0", 22 | "dotenv-expand": "^5.1.0" 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /packages/cfs-dotenv/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | // File paths are relative to the containing tsconfig.json file location 4 | // https://github.com/Microsoft/TypeScript/issues/24851 5 | "outDir": "build" 6 | }, 7 | "extends": "../../tsconfig" 8 | } 9 | -------------------------------------------------------------------------------- /packages/cfs-expo-auth0/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 Tiago 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /packages/cfs-expo-auth0/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "cfs-expo-auth0", 3 | "version": "0.2.0", 4 | "description": "Library for Auth0 React context for Expo in Create Full Stack.", 5 | "bugs": { 6 | "url": "https://github.com/tiagob/create-full-stack/issues" 7 | }, 8 | "repository": { 9 | "type": "git", 10 | "url": "https://github.com/tiagob/create-full-stack.git", 11 | "directory": "packages/cfs-expo-auth0" 12 | }, 13 | "license": "MIT", 14 | "main": "build/index.js", 15 | "typings": "build/index.d.ts", 16 | "scripts": { 17 | "build": "tsc", 18 | "prepublishOnly": "yarn build" 19 | }, 20 | "devDependencies": { 21 | "@types/react": "~16.9.49", 22 | "@types/react-native": "~0.63.2", 23 | "typescript": "^4.0.2" 24 | }, 25 | "peerDependencies": { 26 | "expo": ">= 38", 27 | "expo-auth-session": ">= 1.4", 28 | "react": "*", 29 | "react-native": "*" 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /packages/cfs-expo-auth0/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | // File paths are relative to the containing tsconfig.json file location 4 | // https://github.com/Microsoft/TypeScript/issues/24851 5 | "outDir": "build" 6 | }, 7 | "extends": "../../tsconfig" 8 | } 9 | -------------------------------------------------------------------------------- /packages/cfs-pulumi-auth0/.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | extends: "eslint-config-create-full-stack", 3 | rules: { 4 | "no-new": "off", 5 | "no-console": "off", 6 | }, 7 | }; 8 | -------------------------------------------------------------------------------- /packages/cfs-pulumi-auth0/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 Tiago 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /packages/cfs-pulumi-auth0/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "cfs-pulumi-auth0", 3 | "version": "0.1.2", 4 | "description": "Library for Pulumi Auth0 resources in Create Full Stack.", 5 | "bugs": { 6 | "url": "https://github.com/tiagob/create-full-stack/issues" 7 | }, 8 | "repository": { 9 | "type": "git", 10 | "url": "https://github.com/tiagob/create-full-stack.git", 11 | "directory": "packages/cfs-pulumi-auth0" 12 | }, 13 | "license": "MIT", 14 | "main": "build/index.js", 15 | "typings": "build/index.d.ts", 16 | "scripts": { 17 | "build": "tsc", 18 | "prepublishOnly": "yarn build" 19 | }, 20 | "dependencies": { 21 | "@pulumi/auth0": "^1.2.0", 22 | "@pulumi/pulumi": "^2.11.2" 23 | }, 24 | "devDependencies": { 25 | "@types/node": "^10.0.0" 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /packages/cfs-pulumi-auth0/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | // File paths are relative to the containing tsconfig.json file location 4 | // https://github.com/Microsoft/TypeScript/issues/24851 5 | "outDir": "build" 6 | }, 7 | "extends": "../../tsconfig" 8 | } 9 | -------------------------------------------------------------------------------- /packages/cfs-pulumi-aws/.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | extends: "eslint-config-create-full-stack", 3 | rules: { 4 | "no-new": "off", 5 | "no-console": "off", 6 | }, 7 | }; 8 | -------------------------------------------------------------------------------- /packages/cfs-pulumi-aws/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 Tiago 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /packages/cfs-pulumi-aws/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "cfs-pulumi-aws", 3 | "version": "0.1.4", 4 | "description": "Library for Pulumi AWS resources in Create Full Stack.", 5 | "bugs": { 6 | "url": "https://github.com/tiagob/create-full-stack/issues" 7 | }, 8 | "repository": { 9 | "type": "git", 10 | "url": "https://github.com/tiagob/create-full-stack.git", 11 | "directory": "packages/cfs-pulumi-aws" 12 | }, 13 | "license": "MIT", 14 | "main": "build/index.js", 15 | "typings": "build/index.d.ts", 16 | "scripts": { 17 | "build": "tsc", 18 | "prepublishOnly": "yarn build" 19 | }, 20 | "dependencies": { 21 | "@pulumi/aws": "^3.5.0", 22 | "@pulumi/awsx": "^0.22.0", 23 | "@pulumi/pulumi": "^2.11.2", 24 | "aws-sdk": "^2.749.0", 25 | "cross-spawn": "^7.0.3", 26 | "fast-deep-equal": "^3.1.3", 27 | "folder-hash": "^3.3.3", 28 | "mime": "^2.4.6", 29 | "yarn": "^1.22.5" 30 | }, 31 | "devDependencies": { 32 | "@types/cross-spawn": "^6.0.2", 33 | "@types/mime": "^2.0.2", 34 | "@types/node": "^10.0.0" 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /packages/cfs-pulumi-aws/src/common.ts: -------------------------------------------------------------------------------- 1 | import * as pulumi from "@pulumi/pulumi"; 2 | 3 | export type Env = 4 | | { 5 | [key: string]: pulumi.Output | string | undefined; 6 | } 7 | | undefined; 8 | 9 | export type InputEnv = pulumi.Input< 10 | | { 11 | [key: string]: pulumi.Input | string | undefined; 12 | } 13 | | undefined 14 | >; 15 | -------------------------------------------------------------------------------- /packages/cfs-pulumi-aws/src/index.ts: -------------------------------------------------------------------------------- 1 | // ComponentResources 2 | export { default as Certificate } from "./components/certificate"; 3 | export { default as Fargate } from "./components/fargate"; 4 | export { default as Rds } from "./components/rds"; 5 | export { default as StaticWebsite } from "./components/staticWebsite"; 6 | 7 | // DynamicResources 8 | export { InvalidateCloudfront } from "./providers/invalidateCloudfront"; 9 | export { SyncWeb } from "./providers/syncWeb"; 10 | 11 | // Miscellaneous 12 | export * from "./utils"; 13 | -------------------------------------------------------------------------------- /packages/cfs-pulumi-aws/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | // File paths are relative to the containing tsconfig.json file location 4 | // https://github.com/Microsoft/TypeScript/issues/24851 5 | "outDir": "build", 6 | // Explicitly include custom third-party type declarations in ./typings 7 | // Fixes issue with `pulumi up` 8 | // error TS7016: Could not find a declaration file for module 'folder-hash' 9 | "typeRoots": ["./node_modules/@types", "./typings"] 10 | }, 11 | "extends": "../../tsconfig" 12 | } 13 | -------------------------------------------------------------------------------- /packages/cfs-pulumi-aws/typings/folder-hash/index.d.ts: -------------------------------------------------------------------------------- 1 | declare module "folder-hash" { 2 | // https://github.com/marc136/node-folder-hash#parameters-for-the-hashelement-function 3 | export function hashElement(name: string): Promise<{ hash: string }>; 4 | } 5 | -------------------------------------------------------------------------------- /packages/cfs-pulumi-expo/.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | extends: "eslint-config-create-full-stack", 3 | rules: { 4 | "no-new": "off", 5 | "no-console": "off", 6 | }, 7 | }; 8 | -------------------------------------------------------------------------------- /packages/cfs-pulumi-expo/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 Tiago 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /packages/cfs-pulumi-expo/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "cfs-pulumi-expo", 3 | "version": "0.1.2", 4 | "description": "Library for Pulumi Expo resources in Create Full Stack.", 5 | "bugs": { 6 | "url": "https://github.com/tiagob/create-full-stack/issues" 7 | }, 8 | "repository": { 9 | "type": "git", 10 | "url": "https://github.com/tiagob/create-full-stack.git", 11 | "directory": "packages/cfs-pulumi-expo" 12 | }, 13 | "license": "MIT", 14 | "main": "build/index.js", 15 | "typings": "build/index.d.ts", 16 | "scripts": { 17 | "build": "tsc", 18 | "prepublishOnly": "yarn build" 19 | }, 20 | "dependencies": { 21 | "@babel/core": "^7.11.6", 22 | "@expo/config": "^3.3.0", 23 | "@expo/xdl": "^58.0.3", 24 | "@pulumi/pulumi": "^2.11.2", 25 | "fast-deep-equal": "^3.1.3", 26 | "folder-hash": "^3.3.3" 27 | }, 28 | "devDependencies": { 29 | "@types/node": "^10.0.0" 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /packages/cfs-pulumi-expo/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | // File paths are relative to the containing tsconfig.json file location 4 | // https://github.com/Microsoft/TypeScript/issues/24851 5 | "outDir": "build", 6 | // Explicitly include custom third-party type declarations in ./typings 7 | // Fixes issue with `pulumi up` 8 | // error TS7016: Could not find a declaration file for module 'folder-hash' 9 | "typeRoots": ["./node_modules/@types", "./typings"] 10 | }, 11 | "extends": "../../tsconfig" 12 | } 13 | -------------------------------------------------------------------------------- /packages/cfs-pulumi-expo/typings/folder-hash/index.d.ts: -------------------------------------------------------------------------------- 1 | declare module "folder-hash" { 2 | // https://github.com/marc136/node-folder-hash#parameters-for-the-hashelement-function 3 | export function hashElement(name: string): Promise<{ hash: string }>; 4 | } 5 | -------------------------------------------------------------------------------- /packages/cfs-template-apollo-server-express-auth0/.dockerignore: -------------------------------------------------------------------------------- 1 | # Adapted from gitignore 2 | 3 | # dependencies 4 | node_modules 5 | .pnp 6 | .pnp.js 7 | 8 | # testing 9 | coverage 10 | 11 | # misc 12 | .DS_Store 13 | .env.local 14 | .env.development.local 15 | .env.test.local 16 | .env.production.local 17 | 18 | npm-debug.log* 19 | yarn-debug.log* 20 | yarn-error.log* 21 | 22 | # packages 23 | packages/pulumi-aws 24 | packages/mobile 25 | packages/web 26 | packages/common 27 | -------------------------------------------------------------------------------- /packages/cfs-template-apollo-server-express-auth0/.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | extends: "eslint-config-create-full-stack", 3 | }; 4 | -------------------------------------------------------------------------------- /packages/cfs-template-apollo-server-express-auth0/.github/workflows/pull_request.yml: -------------------------------------------------------------------------------- 1 | # @remove-file-pulumi-aws 2 | on: 3 | - pull_request 4 | jobs: 5 | preview: 6 | name: Pulumi Preview CI 7 | runs-on: ubuntu-latest 8 | steps: 9 | - uses: actions/checkout@v2 10 | - uses: actions/setup-node@v1 11 | with: 12 | node-version: 12.x 13 | - run: yarn 14 | - run: yarn build 15 | - uses: docker://pulumi/actions 16 | with: 17 | args: preview 18 | env: 19 | AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} 20 | AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} 21 | PULUMI_ACCESS_TOKEN: ${{ secrets.PULUMI_ACCESS_TOKEN }} 22 | PULUMI_CI: pr 23 | PULUMI_ROOT: packages/pulumi-aws 24 | # Yarn is required for workspaces 25 | USE_YARN: true 26 | -------------------------------------------------------------------------------- /packages/cfs-template-apollo-server-express-auth0/.github/workflows/push.yml: -------------------------------------------------------------------------------- 1 | on: 2 | - push 3 | jobs: 4 | test: 5 | name: Node.js CI 6 | runs-on: ubuntu-latest 7 | steps: 8 | - uses: actions/checkout@v2 9 | - uses: actions/setup-node@v1 10 | with: 11 | node-version: 12.x 12 | - run: yarn 13 | - run: yarn build 14 | - run: yarn test 15 | env: 16 | CI: true 17 | -------------------------------------------------------------------------------- /packages/cfs-template-apollo-server-express-auth0/.github/workflows/push_master.yml: -------------------------------------------------------------------------------- 1 | # @remove-file-pulumi-aws 2 | on: 3 | push: 4 | branches: 5 | - master 6 | jobs: 7 | up: 8 | name: Pulumi Update CD 9 | runs-on: ubuntu-latest 10 | steps: 11 | - uses: actions/checkout@v2 12 | - uses: actions/setup-node@v1 13 | with: 14 | node-version: 12.x 15 | - run: yarn 16 | - run: yarn build 17 | - uses: docker://pulumi/actions 18 | with: 19 | args: up --yes 20 | env: 21 | AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} 22 | AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} 23 | PULUMI_ACCESS_TOKEN: ${{ secrets.PULUMI_ACCESS_TOKEN }} 24 | PULUMI_CI: up 25 | PULUMI_ROOT: packages/pulumi-aws 26 | # Yarn is required for workspaces 27 | USE_YARN: true 28 | -------------------------------------------------------------------------------- /packages/cfs-template-apollo-server-express-auth0/.prettierignore: -------------------------------------------------------------------------------- 1 | build/ 2 | .expo/ 3 | -------------------------------------------------------------------------------- /packages/cfs-template-apollo-server-express-auth0/.pulumi/ci.json: -------------------------------------------------------------------------------- 1 | { 2 | "master": "production" 3 | } 4 | -------------------------------------------------------------------------------- /packages/cfs-template-apollo-server-express-auth0/.vscode/extensions.json: -------------------------------------------------------------------------------- 1 | { 2 | "recommendations": [ 3 | "dbaeumer.vscode-eslint", 4 | "esbenp.prettier-vscode", 5 | "ms-azuretools.vscode-docker", 6 | "streetsidesoftware.code-spell-checker" 7 | ] 8 | } 9 | -------------------------------------------------------------------------------- /packages/cfs-template-apollo-server-express-auth0/.vscode/launch.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "0.2.0", 3 | "configurations": [ 4 | { 5 | "type": "node", 6 | "request": "attach", 7 | "name": "Attach by Process ID", 8 | "processId": "${command:PickProcess}", 9 | "protocol": "inspector" 10 | } 11 | ] 12 | } 13 | -------------------------------------------------------------------------------- /packages/cfs-template-apollo-server-express-auth0/.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "editor.defaultFormatter": "esbenp.prettier-vscode", 3 | "editor.formatOnSave": true, 4 | "editor.codeActionsOnSave": { 5 | "source.fixAll": true 6 | }, 7 | "editor.tabSize": 2 8 | } 9 | -------------------------------------------------------------------------------- /packages/cfs-template-apollo-server-express-auth0/.watchmanconfig: -------------------------------------------------------------------------------- 1 | {} 2 | -------------------------------------------------------------------------------- /packages/cfs-template-apollo-server-express-auth0/README.md: -------------------------------------------------------------------------------- 1 | # cfs-template-apollo-server-express-auth0 2 | 3 | This is the official apollo-server-express Auth0 template for Create Full Stack. 4 | 5 | For more information, please refer to: 6 | 7 | - [Getting Started](https://create-full-stack.com/docs) – How to create a new full stack. 8 | - [User Guide](https://create-full-stack.com) – How to develop apps bootstrapped with Create Full Stack. 9 | -------------------------------------------------------------------------------- /packages/cfs-template-apollo-server-express-auth0/codegen.yml: -------------------------------------------------------------------------------- 1 | schema: packages/server/src/graphql/schema.ts 2 | hooks: 3 | afterOneFileWrite: 4 | - prettier --write 5 | - eslint --fix 6 | generates: 7 | packages/server/src/graphql/__generated__/index.ts: 8 | plugins: 9 | - typescript 10 | - typescript-resolvers 11 | config: 12 | useIndexSignature: true 13 | namingConvention: 14 | typeNames: pascal-case#pascalCase 15 | transformUnderscore: true 16 | # Use undefined instead of null when a field isn't set. 17 | maybeValue: T | undefined 18 | packages/common/src/graphql/__generated__/index.ts: 19 | documents: packages/common/src/graphql/*.graphql 20 | plugins: 21 | - typescript 22 | - typescript-operations 23 | - typescript-react-apollo 24 | config: 25 | namingConvention: 26 | typeNames: pascal-case#pascalCase 27 | transformUnderscore: true 28 | # Use undefined instead of null when a field isn't set. 29 | maybeValue: T | undefined 30 | -------------------------------------------------------------------------------- /packages/cfs-template-apollo-server-express-auth0/docker-compose.yaml: -------------------------------------------------------------------------------- 1 | version: "3.8" 2 | services: 3 | postgres: 4 | image: postgres:12 5 | restart: always 6 | ports: 7 | - "5432:5432" 8 | volumes: 9 | - db_data:/var/lib/postgresql/data 10 | env_file: "./postgres/.env.development" 11 | # 12 | # To debug packages/server/Dockerfile uncomment the "server" service below 13 | # Run `docker-compose up` to see something like the following output. 14 | # 15 | # ```bash 16 | # Step 21/22 : EXPOSE 8080 17 | # ---> Using cache 18 | # ---> 9e01378434d1 19 | # Step 22/22 : CMD ["yarn", "start-production"] 20 | # ---> Using cache 21 | # ---> 78e717e8d895 22 | # ``` 23 | # 24 | # Run `docker run --rm -it 9e01378434d1 sh` to start a container on a specific 25 | # image and run bash. 26 | # 27 | # server: 28 | # build: 29 | # context: . 30 | # dockerfile: packages/server/Dockerfile 31 | # restart: always 32 | # ports: 33 | # - "8080:8080" 34 | # depends_on: 35 | # - postgres 36 | # environment: 37 | # DATABASE_URL: postgres://postgres:postgrespassword@postgres:5432/postgres 38 | volumes: 39 | db_data: 40 | -------------------------------------------------------------------------------- /packages/cfs-template-apollo-server-express-auth0/gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | node_modules 5 | .pnp 6 | .pnp.js 7 | 8 | # testing 9 | coverage 10 | 11 | # production 12 | build 13 | 14 | # misc 15 | .DS_Store 16 | .env.local 17 | .env.development.local 18 | .env.test.local 19 | .env.production.local 20 | 21 | npm-debug.log* 22 | yarn-debug.log* 23 | yarn-error.log* 24 | -------------------------------------------------------------------------------- /packages/cfs-template-apollo-server-express-auth0/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "cfs-template-apollo-server-express-auth0", 3 | "version": "0.1.65", 4 | "description": "The apollo-server-express Auth0 template for Create Full Stack.", 5 | "bugs": { 6 | "url": "https://github.com/tiagob/create-full-stack/issues" 7 | }, 8 | "repository": { 9 | "type": "git", 10 | "url": "https://github.com/tiagob/create-full-stack.git", 11 | "directory": "packages/cfs-template-apollo-server-express-auth0" 12 | }, 13 | "license": "MIT" 14 | } 15 | -------------------------------------------------------------------------------- /packages/cfs-template-apollo-server-express-auth0/packages/common/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "common", 3 | "version": "0.1.0", 4 | "private": true, 5 | "main": "build/index.js", 6 | "typings": "build/index.d.ts", 7 | "scripts": { 8 | "build": "tsc", 9 | "watch": "tsc --watch" 10 | }, 11 | "dependencies": { 12 | "@apollo/client": "^3.1.5", 13 | "graphql": "^15.3.0", 14 | "react": "~16.13.1", 15 | "react-dom": "~16.13.1", 16 | "subscriptions-transport-ws": "^0.9.18" 17 | }, 18 | "devDependencies": { 19 | "@types/react": "^16.9.49", 20 | "typescript": "^4.0.2" 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /packages/cfs-template-apollo-server-express-auth0/packages/common/src/graphql/todos.graphql: -------------------------------------------------------------------------------- 1 | # If changes are made to this file or other `.graphql` files, you must generate 2 | # the TS types and React hooks for the Apollo clients with `yarn generate`. 3 | 4 | query Todos { 5 | todos { 6 | id 7 | name 8 | complete 9 | } 10 | } 11 | 12 | mutation CreateTodo($name: String!) { 13 | createTodo(name: $name) { 14 | id 15 | name 16 | complete 17 | } 18 | } 19 | 20 | mutation UpdateTodo($id: Int!, $complete: Boolean!) { 21 | updateTodo(id: $id, complete: $complete) { 22 | id 23 | name 24 | complete 25 | } 26 | } 27 | 28 | mutation DeleteTodo($id: Int!) { 29 | deleteTodo(id: $id) { 30 | id 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /packages/cfs-template-apollo-server-express-auth0/packages/common/src/graphql/useCreateTodo.ts: -------------------------------------------------------------------------------- 1 | import { 2 | TodosDocument, 3 | TodosQuery, 4 | TodosQueryVariables, 5 | useCreateTodoMutation, 6 | } from "./__generated__"; 7 | 8 | export default () => 9 | useCreateTodoMutation({ 10 | update: (cache, { data }) => { 11 | if (!data) { 12 | return; 13 | } 14 | const { createTodo } = data; 15 | const query = cache.readQuery({ 16 | query: TodosDocument, 17 | }); 18 | const todos = query?.todos || []; 19 | cache.writeQuery({ 20 | query: TodosDocument, 21 | data: { todos: todos.concat([createTodo]) }, 22 | }); 23 | }, 24 | }); 25 | -------------------------------------------------------------------------------- /packages/cfs-template-apollo-server-express-auth0/packages/common/src/graphql/useDeleteTodo.ts: -------------------------------------------------------------------------------- 1 | import { useDeleteTodoMutation } from "./__generated__"; 2 | 3 | export default () => 4 | useDeleteTodoMutation({ 5 | update: (cache, { data }) => { 6 | if (!data || !data.deleteTodo) { 7 | return; 8 | } 9 | const { deleteTodo } = data; 10 | cache.evict({ id: cache.identify(deleteTodo) }); 11 | }, 12 | }); 13 | -------------------------------------------------------------------------------- /packages/cfs-template-apollo-server-express-auth0/packages/common/src/index.ts: -------------------------------------------------------------------------------- 1 | export { default as useCreateTodo } from "./graphql/useCreateTodo"; 2 | export { default as useDeleteTodo } from "./graphql/useDeleteTodo"; 3 | 4 | export * from "./graphql/__generated__"; 5 | -------------------------------------------------------------------------------- /packages/cfs-template-apollo-server-express-auth0/packages/common/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | // File paths are relative to the containing tsconfig.json file location 4 | // https://github.com/Microsoft/TypeScript/issues/24851 5 | "outDir": "build" 6 | }, 7 | "extends": "../../tsconfig" 8 | } 9 | -------------------------------------------------------------------------------- /packages/cfs-template-apollo-server-express-auth0/packages/mobile/.env.development: -------------------------------------------------------------------------------- 1 | # Follow development.html or DEVELOPMENT.md instructions to fill in these fields 2 | AUTH0_AUDIENCE= 3 | AUTH0_DOMAIN= 4 | AUTH0_CLIENT_ID= 5 | -------------------------------------------------------------------------------- /packages/cfs-template-apollo-server-express-auth0/packages/mobile/.expo-shared/assets.json: -------------------------------------------------------------------------------- 1 | { 2 | "12bb71342c6255bbf50437ec8f4441c083f47cdb74bd89160c15e4f43e52a1cb": true, 3 | "40b842e832070c58deac6aa9e08fa459302ee3f9da492c7e77d93d2fbf4a56fd": true 4 | } 5 | -------------------------------------------------------------------------------- /packages/cfs-template-apollo-server-express-auth0/packages/mobile/README.md: -------------------------------------------------------------------------------- 1 | # Mobile 2 | 3 | An Expo [managed workflow](https://docs.expo.io/introduction/managed-vs-bare/#managed-workflow) for [react-native](https://reactnative.dev/). 4 | 5 | ## Run 6 | 7 | ```bash 8 | yarn start 9 | ``` 10 | 11 | Expo web is unsupported. If you need this, +1 [create-full-stack/issues/148](https://github.com/tiagob/create-full-stack/issues/148). 12 | -------------------------------------------------------------------------------- /packages/cfs-template-apollo-server-express-auth0/packages/mobile/__generated__/AppEntry.js: -------------------------------------------------------------------------------- 1 | // @generated by expo-yarn-workspaces 2 | 3 | import { registerRootComponent } from "expo"; 4 | import { activateKeepAwake } from "expo-keep-awake"; 5 | 6 | import App from "../App"; 7 | 8 | if (__DEV__) { 9 | activateKeepAwake(); 10 | } 11 | 12 | registerRootComponent(App); 13 | -------------------------------------------------------------------------------- /packages/cfs-template-apollo-server-express-auth0/packages/mobile/app.json: -------------------------------------------------------------------------------- 1 | { 2 | "expo": { 3 | "name": "", 4 | "slug": "", 5 | "version": "1.0.0", 6 | "orientation": "portrait", 7 | "icon": "./assets/icon.png", 8 | "splash": { 9 | "image": "./assets/splash.png", 10 | "resizeMode": "contain", 11 | "backgroundColor": "#ffffff" 12 | }, 13 | "updates": { 14 | "fallbackToCacheTimeout": 0 15 | }, 16 | "assetBundlePatterns": ["**/*"], 17 | "ios": { 18 | "supportsTablet": true 19 | }, 20 | "web": { 21 | "favicon": "./assets/favicon.png" 22 | }, 23 | "scheme": "" 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /packages/cfs-template-apollo-server-express-auth0/packages/mobile/assets/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tiagob/create-full-stack/94409eac51290b38c7a3a4dbb3f068430cfb9dd2/packages/cfs-template-apollo-server-express-auth0/packages/mobile/assets/favicon.png -------------------------------------------------------------------------------- /packages/cfs-template-apollo-server-express-auth0/packages/mobile/assets/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tiagob/create-full-stack/94409eac51290b38c7a3a4dbb3f068430cfb9dd2/packages/cfs-template-apollo-server-express-auth0/packages/mobile/assets/icon.png -------------------------------------------------------------------------------- /packages/cfs-template-apollo-server-express-auth0/packages/mobile/assets/splash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tiagob/create-full-stack/94409eac51290b38c7a3a4dbb3f068430cfb9dd2/packages/cfs-template-apollo-server-express-auth0/packages/mobile/assets/splash.png -------------------------------------------------------------------------------- /packages/cfs-template-apollo-server-express-auth0/packages/mobile/babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = function (api) { 2 | api.cache(true); 3 | return { 4 | presets: ["babel-preset-expo"], 5 | plugins: ["babel-plugin-expo-cfs-dotenv"], 6 | }; 7 | }; 8 | -------------------------------------------------------------------------------- /packages/cfs-template-apollo-server-express-auth0/packages/mobile/gitignore: -------------------------------------------------------------------------------- 1 | node_modules/**/* 2 | .expo/* 3 | npm-debug.* 4 | *.jks 5 | *.p8 6 | *.p12 7 | *.key 8 | *.mobileprovision 9 | *.orig.* 10 | web-build/ 11 | 12 | # macOS 13 | .DS_Store 14 | -------------------------------------------------------------------------------- /packages/cfs-template-apollo-server-express-auth0/packages/mobile/metro.config.js: -------------------------------------------------------------------------------- 1 | const { createMetroConfiguration } = require("expo-yarn-workspaces"); 2 | 3 | module.exports = createMetroConfiguration(__dirname); 4 | -------------------------------------------------------------------------------- /packages/cfs-template-apollo-server-express-auth0/packages/mobile/src/components/CreateTodo.tsx: -------------------------------------------------------------------------------- 1 | import { useCreateTodo } from "common"; 2 | import React, { useCallback, useState } from "react"; 3 | import { StyleSheet, View } from "react-native"; 4 | import { Icon, Input } from "react-native-elements"; 5 | 6 | const styles = StyleSheet.create({ 7 | root: { 8 | flexDirection: "row", 9 | marginLeft: 10, 10 | marginRight: 10, 11 | marginTop: 10, 12 | }, 13 | }); 14 | 15 | export default function CreateTodo() { 16 | const [name, setName] = useState(""); 17 | const [createTodo] = useCreateTodo(); 18 | 19 | const onSubmit = useCallback(() => { 20 | createTodo({ variables: { name } }); 21 | setName(""); 22 | }, [name, setName, createTodo]); 23 | 24 | return ( 25 | 26 | setName(text)} 30 | onSubmitEditing={onSubmit} 31 | rightIcon={ 32 | 33 | } 34 | /> 35 | 36 | ); 37 | } 38 | -------------------------------------------------------------------------------- /packages/cfs-template-apollo-server-express-auth0/packages/mobile/src/components/Header.tsx: -------------------------------------------------------------------------------- 1 | import { DrawerNavigationProp } from "@react-navigation/drawer"; 2 | import { useAuth0 } from "cfs-expo-auth0"; 3 | import React from "react"; 4 | import { Platform } from "react-native"; 5 | import { Avatar, Header as ElementsHeader } from "react-native-elements"; 6 | 7 | import { RootStackParamList } from "../utils/types"; 8 | 9 | interface Props { 10 | navigation: DrawerNavigationProp< 11 | RootStackParamList, 12 | "Todos" | "About" | "SignIn" 13 | >; 14 | } 15 | 16 | export default function Header({ navigation }: Props) { 17 | const { user } = useAuth0(); 18 | return ( 19 | navigation.openDrawer()} 31 | /> 32 | } 33 | /> 34 | ); 35 | } 36 | -------------------------------------------------------------------------------- /packages/cfs-template-apollo-server-express-auth0/packages/mobile/src/containers/About.test.tsx: -------------------------------------------------------------------------------- 1 | import { render } from "@testing-library/react-native"; 2 | import React from "react"; 3 | 4 | import { navigation } from "../utils/testMocks"; 5 | import About from "./About"; 6 | 7 | it("renders github link", () => { 8 | const { getByText } = render(); 9 | const link = getByText(/go to github/i); 10 | expect(link).toBeTruthy(); 11 | }); 12 | -------------------------------------------------------------------------------- /packages/cfs-template-apollo-server-express-auth0/packages/mobile/src/containers/SignIn.tsx: -------------------------------------------------------------------------------- 1 | import { useAuth0 } from "cfs-expo-auth0"; 2 | import React from "react"; 3 | import { StatusBar, StyleSheet, View } from "react-native"; 4 | import { Button } from "react-native-elements"; 5 | 6 | const styles = StyleSheet.create({ 7 | root: { 8 | flex: 1, 9 | }, 10 | container: { 11 | flex: 1, 12 | alignItems: "center", 13 | justifyContent: "center", 14 | }, 15 | }); 16 | 17 | export default function SignIn() { 18 | const { request, login } = useAuth0(); 19 | 20 | return ( 21 | 22 | 23 | 24 | 26 | 27 | ); 28 | } 29 | -------------------------------------------------------------------------------- /packages/cfs-template-apollo-server-express-auth0/packages/web/src/containers/Todos.tsx: -------------------------------------------------------------------------------- 1 | import { List, makeStyles, Paper } from "@material-ui/core"; 2 | import { useTodosQuery } from "common"; 3 | import React from "react"; 4 | 5 | import CreateTodo from "../components/CreateTodo"; 6 | import Todo from "../components/Todo"; 7 | 8 | const useStyles = makeStyles(({ spacing }) => ({ 9 | root: { 10 | margin: spacing(3), 11 | padding: spacing(1), 12 | width: "80%", 13 | }, 14 | })); 15 | 16 | export default function Todos() { 17 | const classes = useStyles(); 18 | const { data } = useTodosQuery(); 19 | return ( 20 | 21 | 22 | 23 | {(data?.todos ? data.todos : []).map((todo) => ( 24 | 25 | ))} 26 | 27 | 28 | ); 29 | } 30 | -------------------------------------------------------------------------------- /packages/cfs-template-apollo-server-express-auth0/packages/web/src/index.css: -------------------------------------------------------------------------------- 1 | body { 2 | margin: 0; 3 | font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", 4 | "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", 5 | sans-serif; 6 | -webkit-font-smoothing: antialiased; 7 | -moz-osx-font-smoothing: grayscale; 8 | } 9 | 10 | code { 11 | font-family: source-code-pro, Menlo, Monaco, Consolas, "Courier New", 12 | monospace; 13 | } 14 | -------------------------------------------------------------------------------- /packages/cfs-template-apollo-server-express-auth0/packages/web/src/react-app-env.d.ts: -------------------------------------------------------------------------------- 1 | // / 2 | -------------------------------------------------------------------------------- /packages/cfs-template-apollo-server-express-auth0/packages/web/src/reportWebVitals.ts: -------------------------------------------------------------------------------- 1 | import { ReportHandler } from "web-vitals"; 2 | 3 | const reportWebVitals = (onPerfEntry?: ReportHandler) => { 4 | if (onPerfEntry && onPerfEntry instanceof Function) { 5 | // eslint-disable-next-line promise/catch-or-return, promise/always-return 6 | import("web-vitals").then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => { 7 | getCLS(onPerfEntry); 8 | getFID(onPerfEntry); 9 | getFCP(onPerfEntry); 10 | getLCP(onPerfEntry); 11 | getTTFB(onPerfEntry); 12 | }); 13 | } 14 | }; 15 | 16 | export default reportWebVitals; 17 | -------------------------------------------------------------------------------- /packages/cfs-template-apollo-server-express-auth0/packages/web/src/setupTests.ts: -------------------------------------------------------------------------------- 1 | // jest-dom adds custom jest matchers for asserting on DOM nodes. 2 | // allows you to do things like: 3 | // expect(element).toHaveTextContent(/react/i) 4 | // learn more: https://github.com/testing-library/jest-dom 5 | import "@testing-library/jest-dom"; 6 | 7 | // Fix "MutationObserver is not a constructor" 8 | // https://github.com/testing-library/react-testing-library/issues/662 9 | // Can likely remove with react-scripts v4 10 | window.MutationObserver = require("mutation-observer"); 11 | -------------------------------------------------------------------------------- /packages/cfs-template-apollo-server-express-auth0/packages/web/src/utils/getApolloClient.ts: -------------------------------------------------------------------------------- 1 | import { ApolloClient, createHttpLink, InMemoryCache } from "@apollo/client"; 2 | import { setContext } from "@apollo/client/link/context"; 3 | import { GetTokenSilentlyOptions } from "@auth0/auth0-spa-js"; 4 | 5 | const httpLink = createHttpLink({ uri: process.env.REACT_APP_GRAPHQL_URL }); 6 | 7 | export default function getApolloClient( 8 | getAccessTokenSilently: ( 9 | options?: GetTokenSilentlyOptions | undefined 10 | ) => Promise 11 | ) { 12 | const authLink = setContext(async (_, { headers }) => { 13 | const token = await getAccessTokenSilently(); 14 | if (!token) { 15 | return { headers }; 16 | } 17 | return { 18 | headers: { 19 | ...headers, 20 | authorization: `Bearer ${token}`, 21 | }, 22 | }; 23 | }); 24 | 25 | return new ApolloClient({ 26 | link: authLink.concat(httpLink), 27 | cache: new InMemoryCache(), 28 | }); 29 | } 30 | -------------------------------------------------------------------------------- /packages/cfs-template-apollo-server-express-auth0/packages/web/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | // Can't extend CRA tsconfig.json 3 | // https://github.com/facebook/create-react-app/issues/6269 4 | "compilerOptions": { 5 | "allowJs": false, 6 | "allowSyntheticDefaultImports": true, 7 | "esModuleInterop": true, 8 | "forceConsistentCasingInFileNames": true, 9 | "isolatedModules": true, 10 | "jsx": "react", 11 | "lib": ["DOM", "DOM.Iterable", "ESNext"], 12 | "module": "ESNext", 13 | "moduleResolution": "Node", 14 | "noEmit": true, 15 | "noFallthroughCasesInSwitch": true, 16 | "noImplicitAny": true, 17 | "preserveWatchOutput": true, 18 | "resolveJsonModule": true, 19 | "skipLibCheck": true, 20 | "strict": true, 21 | "target": "ES5" 22 | }, 23 | "include": ["src"] 24 | } 25 | -------------------------------------------------------------------------------- /packages/cfs-template-apollo-server-express-auth0/postgres/.env.development: -------------------------------------------------------------------------------- 1 | POSTGRES_PASSWORD=postgrespassword 2 | -------------------------------------------------------------------------------- /packages/cfs-template-apollo-server-express-auth0/template.README.md: -------------------------------------------------------------------------------- 1 | This project was bootstrapped with [Create Full Stack](https://github.com/tiagob/create-full-stack). 2 | 3 | - Get started with the [development guide]({DEVELOPMENT_FILENAME}) 4 | - Follow the [Apollo Server Express tutorial](https://create-full-stack.com/docs/tutorial_apollo_server_express) to update your full stack 5 | 6 | - Deploy to AWS with the [production guide]({PRODUCTION_FILENAME}) 7 | 8 | - Review the [Create Full Stack docs](https://create-full-stack.com/docs/) 9 | -------------------------------------------------------------------------------- /packages/cfs-template-apollo-server-express-no-auth/.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | extends: "eslint-config-create-full-stack", 3 | }; 4 | -------------------------------------------------------------------------------- /packages/cfs-template-apollo-server-express-no-auth/.github/workflows/pull_request.yml: -------------------------------------------------------------------------------- 1 | # @remove-file-pulumi-aws 2 | on: 3 | - pull_request 4 | jobs: 5 | preview: 6 | name: Pulumi Preview CI 7 | runs-on: ubuntu-latest 8 | steps: 9 | - uses: actions/checkout@v2 10 | - uses: actions/setup-node@v1 11 | with: 12 | node-version: 12.x 13 | - run: yarn 14 | - run: yarn build 15 | - uses: docker://pulumi/actions 16 | with: 17 | args: preview 18 | env: 19 | AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} 20 | AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} 21 | PULUMI_ACCESS_TOKEN: ${{ secrets.PULUMI_ACCESS_TOKEN }} 22 | PULUMI_CI: pr 23 | PULUMI_ROOT: packages/pulumi-aws 24 | # Yarn is required for workspaces 25 | USE_YARN: true 26 | -------------------------------------------------------------------------------- /packages/cfs-template-apollo-server-express-no-auth/.github/workflows/push.yml: -------------------------------------------------------------------------------- 1 | on: 2 | - push 3 | jobs: 4 | test: 5 | name: Node.js CI 6 | runs-on: ubuntu-latest 7 | steps: 8 | - uses: actions/checkout@v2 9 | - uses: actions/setup-node@v1 10 | with: 11 | node-version: 12.x 12 | - run: yarn 13 | - run: yarn build 14 | - run: yarn test 15 | env: 16 | CI: true 17 | -------------------------------------------------------------------------------- /packages/cfs-template-apollo-server-express-no-auth/.github/workflows/push_master.yml: -------------------------------------------------------------------------------- 1 | # @remove-file-pulumi-aws 2 | on: 3 | push: 4 | branches: 5 | - master 6 | jobs: 7 | up: 8 | name: Pulumi Update CD 9 | runs-on: ubuntu-latest 10 | steps: 11 | - uses: actions/checkout@v2 12 | - uses: actions/setup-node@v1 13 | with: 14 | node-version: 12.x 15 | - run: yarn 16 | - run: yarn build 17 | - uses: docker://pulumi/actions 18 | with: 19 | args: up --yes 20 | env: 21 | AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} 22 | AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} 23 | PULUMI_ACCESS_TOKEN: ${{ secrets.PULUMI_ACCESS_TOKEN }} 24 | PULUMI_CI: up 25 | PULUMI_ROOT: packages/pulumi-aws 26 | # Yarn is required for workspaces 27 | USE_YARN: true 28 | -------------------------------------------------------------------------------- /packages/cfs-template-apollo-server-express-no-auth/.prettierignore: -------------------------------------------------------------------------------- 1 | build/ 2 | .expo/ 3 | -------------------------------------------------------------------------------- /packages/cfs-template-apollo-server-express-no-auth/.pulumi/ci.json: -------------------------------------------------------------------------------- 1 | { 2 | "master": "production" 3 | } 4 | -------------------------------------------------------------------------------- /packages/cfs-template-apollo-server-express-no-auth/.vscode/extensions.json: -------------------------------------------------------------------------------- 1 | { 2 | "recommendations": [ 3 | "dbaeumer.vscode-eslint", 4 | "esbenp.prettier-vscode", 5 | "ms-azuretools.vscode-docker", 6 | "streetsidesoftware.code-spell-checker" 7 | ] 8 | } 9 | -------------------------------------------------------------------------------- /packages/cfs-template-apollo-server-express-no-auth/.vscode/launch.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "0.2.0", 3 | "configurations": [ 4 | { 5 | "type": "node", 6 | "request": "attach", 7 | "name": "Attach by Process ID", 8 | "processId": "${command:PickProcess}", 9 | "protocol": "inspector" 10 | } 11 | ] 12 | } 13 | -------------------------------------------------------------------------------- /packages/cfs-template-apollo-server-express-no-auth/.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "editor.defaultFormatter": "esbenp.prettier-vscode", 3 | "editor.formatOnSave": true, 4 | "editor.codeActionsOnSave": { 5 | "source.fixAll": true 6 | }, 7 | "editor.tabSize": 2 8 | } 9 | -------------------------------------------------------------------------------- /packages/cfs-template-apollo-server-express-no-auth/.watchmanconfig: -------------------------------------------------------------------------------- 1 | {} 2 | -------------------------------------------------------------------------------- /packages/cfs-template-apollo-server-express-no-auth/README.md: -------------------------------------------------------------------------------- 1 | # cfs-template-apollo-server-express-no-auth 2 | 3 | This is the official apollo-server-express without auth template for Create Full Stack. 4 | 5 | For more information, please refer to: 6 | 7 | - [Getting Started](https://create-full-stack.com/docs) – How to create a new full stack. 8 | - [User Guide](https://create-full-stack.com) – How to develop apps bootstrapped with Create Full Stack. 9 | -------------------------------------------------------------------------------- /packages/cfs-template-apollo-server-express-no-auth/codegen.yml: -------------------------------------------------------------------------------- 1 | schema: packages/server/src/graphql/schema.ts 2 | hooks: 3 | afterOneFileWrite: 4 | - prettier --write 5 | - eslint --fix 6 | generates: 7 | packages/server/src/graphql/__generated__/index.ts: 8 | plugins: 9 | - typescript 10 | - typescript-resolvers 11 | config: 12 | useIndexSignature: true 13 | namingConvention: 14 | typeNames: pascal-case#pascalCase 15 | transformUnderscore: true 16 | # Use undefined instead of null when a field isn't set. 17 | maybeValue: T | undefined 18 | packages/common/src/graphql/__generated__/index.ts: 19 | documents: packages/common/src/graphql/*.graphql 20 | plugins: 21 | - typescript 22 | - typescript-operations 23 | - typescript-react-apollo 24 | config: 25 | namingConvention: 26 | typeNames: pascal-case#pascalCase 27 | transformUnderscore: true 28 | # Use undefined instead of null when a field isn't set. 29 | maybeValue: T | undefined 30 | -------------------------------------------------------------------------------- /packages/cfs-template-apollo-server-express-no-auth/docker-compose.yaml: -------------------------------------------------------------------------------- 1 | version: "3.8" 2 | services: 3 | postgres: 4 | image: postgres:12 5 | restart: always 6 | ports: 7 | - "5432:5432" 8 | volumes: 9 | - db_data:/var/lib/postgresql/data 10 | env_file: "./postgres/.env.development" 11 | # 12 | # To debug packages/server/Dockerfile uncomment the "server" service below 13 | # Run `docker-compose up` to see something like the following output. 14 | # 15 | # ```bash 16 | # Step 21/22 : EXPOSE 8080 17 | # ---> Using cache 18 | # ---> 9e01378434d1 19 | # Step 22/22 : CMD ["yarn", "start-production"] 20 | # ---> Using cache 21 | # ---> 78e717e8d895 22 | # ``` 23 | # 24 | # Run `docker run --rm -it 9e01378434d1 sh` to start a container on a specific 25 | # image and run bash. 26 | # 27 | # server: 28 | # build: 29 | # context: . 30 | # dockerfile: packages/server/Dockerfile 31 | # restart: always 32 | # ports: 33 | # - "8080:8080" 34 | # depends_on: 35 | # - postgres 36 | # environment: 37 | # DATABASE_URL: postgres://postgres:postgrespassword@postgres:5432/postgres 38 | volumes: 39 | db_data: 40 | -------------------------------------------------------------------------------- /packages/cfs-template-apollo-server-express-no-auth/gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | node_modules 5 | .pnp 6 | .pnp.js 7 | 8 | # testing 9 | coverage 10 | 11 | # production 12 | build 13 | 14 | # misc 15 | .DS_Store 16 | .env.local 17 | .env.development.local 18 | .env.test.local 19 | .env.production.local 20 | 21 | npm-debug.log* 22 | yarn-debug.log* 23 | yarn-error.log* 24 | -------------------------------------------------------------------------------- /packages/cfs-template-apollo-server-express-no-auth/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "cfs-template-apollo-server-express-no-auth", 3 | "version": "0.1.62", 4 | "description": "The apollo-server-express without auth template for Create Full Stack.", 5 | "bugs": { 6 | "url": "https://github.com/tiagob/create-full-stack/issues" 7 | }, 8 | "repository": { 9 | "type": "git", 10 | "url": "https://github.com/tiagob/create-full-stack.git", 11 | "directory": "packages/cfs-template-apollo-server-express-no-auth" 12 | }, 13 | "license": "MIT" 14 | } 15 | -------------------------------------------------------------------------------- /packages/cfs-template-apollo-server-express-no-auth/packages/common/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "common", 3 | "version": "0.1.0", 4 | "private": true, 5 | "main": "build/index.js", 6 | "typings": "build/index.d.ts", 7 | "scripts": { 8 | "build": "tsc", 9 | "watch": "tsc --watch" 10 | }, 11 | "dependencies": { 12 | "@apollo/client": "^3.1.5", 13 | "graphql": "^15.3.0", 14 | "react": "~16.13.1", 15 | "react-dom": "~16.13.1", 16 | "subscriptions-transport-ws": "^0.9.18" 17 | }, 18 | "devDependencies": { 19 | "@types/react": "^16.9.49", 20 | "typescript": "^4.0.2" 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /packages/cfs-template-apollo-server-express-no-auth/packages/common/src/graphql/todos.graphql: -------------------------------------------------------------------------------- 1 | # If changes are made to this file or other `.graphql` files, you must generate 2 | # the TS types and React hooks for the Apollo clients with `yarn generate`. 3 | 4 | query Todos { 5 | todos { 6 | id 7 | name 8 | complete 9 | } 10 | } 11 | 12 | mutation CreateTodo($name: String!) { 13 | createTodo(name: $name) { 14 | id 15 | name 16 | complete 17 | } 18 | } 19 | 20 | mutation UpdateTodo($id: Int!, $complete: Boolean!) { 21 | updateTodo(id: $id, complete: $complete) { 22 | id 23 | name 24 | complete 25 | } 26 | } 27 | 28 | mutation DeleteTodo($id: Int!) { 29 | deleteTodo(id: $id) { 30 | id 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /packages/cfs-template-apollo-server-express-no-auth/packages/common/src/graphql/useCreateTodo.ts: -------------------------------------------------------------------------------- 1 | import { 2 | TodosDocument, 3 | TodosQuery, 4 | TodosQueryVariables, 5 | useCreateTodoMutation, 6 | } from "./__generated__"; 7 | 8 | export default () => 9 | useCreateTodoMutation({ 10 | update: (cache, { data }) => { 11 | if (!data) { 12 | return; 13 | } 14 | const { createTodo } = data; 15 | const query = cache.readQuery({ 16 | query: TodosDocument, 17 | }); 18 | const todos = query?.todos || []; 19 | cache.writeQuery({ 20 | query: TodosDocument, 21 | data: { todos: todos.concat([createTodo]) }, 22 | }); 23 | }, 24 | }); 25 | -------------------------------------------------------------------------------- /packages/cfs-template-apollo-server-express-no-auth/packages/common/src/graphql/useDeleteTodo.ts: -------------------------------------------------------------------------------- 1 | import { useDeleteTodoMutation } from "./__generated__"; 2 | 3 | export default () => 4 | useDeleteTodoMutation({ 5 | update: (cache, { data }) => { 6 | if (!data || !data.deleteTodo) { 7 | return; 8 | } 9 | const { deleteTodo } = data; 10 | cache.evict({ id: cache.identify(deleteTodo) }); 11 | }, 12 | }); 13 | -------------------------------------------------------------------------------- /packages/cfs-template-apollo-server-express-no-auth/packages/common/src/index.ts: -------------------------------------------------------------------------------- 1 | export { default as useCreateTodo } from "./graphql/useCreateTodo"; 2 | export { default as useDeleteTodo } from "./graphql/useDeleteTodo"; 3 | 4 | export * from "./graphql/__generated__"; 5 | -------------------------------------------------------------------------------- /packages/cfs-template-apollo-server-express-no-auth/packages/common/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | // File paths are relative to the containing tsconfig.json file location 4 | // https://github.com/Microsoft/TypeScript/issues/24851 5 | "outDir": "build" 6 | }, 7 | "extends": "../../tsconfig" 8 | } 9 | -------------------------------------------------------------------------------- /packages/cfs-template-apollo-server-express-no-auth/packages/mobile/.expo-shared/assets.json: -------------------------------------------------------------------------------- 1 | { 2 | "12bb71342c6255bbf50437ec8f4441c083f47cdb74bd89160c15e4f43e52a1cb": true, 3 | "40b842e832070c58deac6aa9e08fa459302ee3f9da492c7e77d93d2fbf4a56fd": true 4 | } 5 | -------------------------------------------------------------------------------- /packages/cfs-template-apollo-server-express-no-auth/packages/mobile/README.md: -------------------------------------------------------------------------------- 1 | # Mobile 2 | 3 | An Expo [managed workflow](https://docs.expo.io/introduction/managed-vs-bare/#managed-workflow) for [react-native](https://reactnative.dev/). 4 | 5 | ## Run 6 | 7 | ```bash 8 | yarn start 9 | ``` 10 | 11 | Expo web is unsupported. If you need this, +1 [create-full-stack/issues/148](https://github.com/tiagob/create-full-stack/issues/148). 12 | -------------------------------------------------------------------------------- /packages/cfs-template-apollo-server-express-no-auth/packages/mobile/__generated__/AppEntry.js: -------------------------------------------------------------------------------- 1 | // @generated by expo-yarn-workspaces 2 | 3 | import { registerRootComponent } from "expo"; 4 | import { activateKeepAwake } from "expo-keep-awake"; 5 | 6 | import App from "../App"; 7 | 8 | if (__DEV__) { 9 | activateKeepAwake(); 10 | } 11 | 12 | registerRootComponent(App); 13 | -------------------------------------------------------------------------------- /packages/cfs-template-apollo-server-express-no-auth/packages/mobile/app.json: -------------------------------------------------------------------------------- 1 | { 2 | "expo": { 3 | "name": "", 4 | "slug": "", 5 | "version": "1.0.0", 6 | "orientation": "portrait", 7 | "icon": "./assets/icon.png", 8 | "splash": { 9 | "image": "./assets/splash.png", 10 | "resizeMode": "contain", 11 | "backgroundColor": "#ffffff" 12 | }, 13 | "updates": { 14 | "fallbackToCacheTimeout": 0 15 | }, 16 | "assetBundlePatterns": ["**/*"], 17 | "ios": { 18 | "supportsTablet": true 19 | }, 20 | "web": { 21 | "favicon": "./assets/favicon.png" 22 | }, 23 | "scheme": "" 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /packages/cfs-template-apollo-server-express-no-auth/packages/mobile/assets/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tiagob/create-full-stack/94409eac51290b38c7a3a4dbb3f068430cfb9dd2/packages/cfs-template-apollo-server-express-no-auth/packages/mobile/assets/favicon.png -------------------------------------------------------------------------------- /packages/cfs-template-apollo-server-express-no-auth/packages/mobile/assets/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tiagob/create-full-stack/94409eac51290b38c7a3a4dbb3f068430cfb9dd2/packages/cfs-template-apollo-server-express-no-auth/packages/mobile/assets/icon.png -------------------------------------------------------------------------------- /packages/cfs-template-apollo-server-express-no-auth/packages/mobile/assets/splash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tiagob/create-full-stack/94409eac51290b38c7a3a4dbb3f068430cfb9dd2/packages/cfs-template-apollo-server-express-no-auth/packages/mobile/assets/splash.png -------------------------------------------------------------------------------- /packages/cfs-template-apollo-server-express-no-auth/packages/mobile/babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = function (api) { 2 | api.cache(true); 3 | return { 4 | presets: ["babel-preset-expo"], 5 | plugins: ["babel-plugin-expo-cfs-dotenv"], 6 | }; 7 | }; 8 | -------------------------------------------------------------------------------- /packages/cfs-template-apollo-server-express-no-auth/packages/mobile/gitignore: -------------------------------------------------------------------------------- 1 | node_modules/**/* 2 | .expo/* 3 | npm-debug.* 4 | *.jks 5 | *.p8 6 | *.p12 7 | *.key 8 | *.mobileprovision 9 | *.orig.* 10 | web-build/ 11 | 12 | # macOS 13 | .DS_Store 14 | -------------------------------------------------------------------------------- /packages/cfs-template-apollo-server-express-no-auth/packages/mobile/metro.config.js: -------------------------------------------------------------------------------- 1 | const { createMetroConfiguration } = require("expo-yarn-workspaces"); 2 | 3 | module.exports = createMetroConfiguration(__dirname); 4 | -------------------------------------------------------------------------------- /packages/cfs-template-apollo-server-express-no-auth/packages/mobile/src/components/CreateTodo.tsx: -------------------------------------------------------------------------------- 1 | import { useCreateTodo } from "common"; 2 | import React, { useCallback, useState } from "react"; 3 | import { StyleSheet, View } from "react-native"; 4 | import { Icon, Input } from "react-native-elements"; 5 | 6 | const styles = StyleSheet.create({ 7 | root: { 8 | flexDirection: "row", 9 | marginLeft: 10, 10 | marginRight: 10, 11 | marginTop: 10, 12 | }, 13 | }); 14 | 15 | export default function CreateTodo() { 16 | const [name, setName] = useState(""); 17 | const [createTodo] = useCreateTodo(); 18 | 19 | const onSubmit = useCallback(() => { 20 | createTodo({ variables: { name } }); 21 | setName(""); 22 | }, [name, setName, createTodo]); 23 | 24 | return ( 25 | 26 | setName(text)} 30 | onSubmitEditing={onSubmit} 31 | rightIcon={ 32 | 33 | } 34 | /> 35 | 36 | ); 37 | } 38 | -------------------------------------------------------------------------------- /packages/cfs-template-apollo-server-express-no-auth/packages/mobile/src/components/Header.tsx: -------------------------------------------------------------------------------- 1 | import { DrawerNavigationProp } from "@react-navigation/drawer"; 2 | import React from "react"; 3 | import { Platform } from "react-native"; 4 | import { Header as ElementsHeader, Icon } from "react-native-elements"; 5 | 6 | import { RootStackParamList } from "../utils/types"; 7 | 8 | interface Props { 9 | navigation: DrawerNavigationProp; 10 | } 11 | 12 | export default function Header({ navigation }: Props) { 13 | return ( 14 | navigation.openDrawer()} 23 | color="white" 24 | /> 25 | } 26 | /> 27 | ); 28 | } 29 | -------------------------------------------------------------------------------- /packages/cfs-template-apollo-server-express-no-auth/packages/mobile/src/containers/About.test.tsx: -------------------------------------------------------------------------------- 1 | import { render } from "@testing-library/react-native"; 2 | import React from "react"; 3 | 4 | import { navigation } from "../utils/testMocks"; 5 | import About from "./About"; 6 | 7 | it("renders github link", () => { 8 | const { getByText } = render(); 9 | const link = getByText(/go to github/i); 10 | expect(link).toBeTruthy(); 11 | }); 12 | -------------------------------------------------------------------------------- /packages/cfs-template-apollo-server-express-no-auth/packages/mobile/src/setupTests.ts: -------------------------------------------------------------------------------- 1 | // jest-native adds custom jest matchers for asserting on native elements. 2 | // allows you to do things like: 3 | // expect(element).toHaveProp("title", "ok") 4 | // learn more: https://github.com/testing-library/jest-native 5 | import "@testing-library/jest-native/extend-expect"; 6 | -------------------------------------------------------------------------------- /packages/cfs-template-apollo-server-express-no-auth/packages/mobile/src/utils/apolloClient.ts: -------------------------------------------------------------------------------- 1 | import { ApolloClient, InMemoryCache } from "@apollo/client"; 2 | import Constants from "expo-constants"; 3 | 4 | const { manifest } = Constants; 5 | const uri = 6 | manifest.debuggerHost && manifest.packagerOpts?.dev 7 | ? `http://${manifest.debuggerHost.split(`:`)[0]}:8080/graphql` 8 | : process.env.GRAPHQL_URL; 9 | 10 | export default new ApolloClient({ 11 | uri, 12 | cache: new InMemoryCache(), 13 | }); 14 | -------------------------------------------------------------------------------- /packages/cfs-template-apollo-server-express-no-auth/packages/mobile/src/utils/testMocks.ts: -------------------------------------------------------------------------------- 1 | export const navigation = { 2 | navigate: jest.fn(), 3 | dispatch: jest.fn(), 4 | reset: jest.fn(), 5 | goBack: jest.fn(), 6 | isFocused: jest.fn(), 7 | canGoBack: jest.fn(), 8 | dangerouslyGetParent: jest.fn(), 9 | dangerouslyGetState: jest.fn(), 10 | setParams: jest.fn(), 11 | setOptions: jest.fn(), 12 | addListener: jest.fn(), 13 | removeListener: jest.fn(), 14 | jumpTo: jest.fn(), 15 | openDrawer: jest.fn(), 16 | closeDrawer: jest.fn(), 17 | toggleDrawer: jest.fn(), 18 | }; 19 | -------------------------------------------------------------------------------- /packages/cfs-template-apollo-server-express-no-auth/packages/mobile/src/utils/types.ts: -------------------------------------------------------------------------------- 1 | export type RootStackParamList = { 2 | Todos: undefined; 3 | About: undefined; 4 | }; 5 | -------------------------------------------------------------------------------- /packages/cfs-template-apollo-server-express-no-auth/packages/mobile/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig" 3 | } 4 | -------------------------------------------------------------------------------- /packages/cfs-template-apollo-server-express-no-auth/packages/pulumi-aws/.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | extends: "eslint-config-create-full-stack", 3 | rules: { 4 | "no-new": "off", 5 | "no-console": "off", 6 | }, 7 | }; 8 | -------------------------------------------------------------------------------- /packages/cfs-template-apollo-server-express-no-auth/packages/pulumi-aws/Pulumi.production.yaml: -------------------------------------------------------------------------------- 1 | config: 2 | aws:region: us-east-1 3 | -------------------------------------------------------------------------------- /packages/cfs-template-apollo-server-express-no-auth/packages/pulumi-aws/Pulumi.yaml: -------------------------------------------------------------------------------- 1 | name: 2 | runtime: nodejs 3 | -------------------------------------------------------------------------------- /packages/cfs-template-apollo-server-express-no-auth/packages/pulumi-aws/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "pulumi-aws", 3 | "version": "0.1.0", 4 | "private": true, 5 | "dependencies": { 6 | "@pulumi/aws": "^3.5.0", 7 | "@pulumi/awsx": "^0.22.0", 8 | "@pulumi/pulumi": "^2.11.2", 9 | "cfs-pulumi-aws": "^0.1.0", 10 | "cfs-pulumi-expo": "^0.1.0" 11 | }, 12 | "devDependencies": { 13 | "@types/node": "^14.10.0" 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /packages/cfs-template-apollo-server-express-no-auth/packages/pulumi-aws/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig" 3 | } 4 | -------------------------------------------------------------------------------- /packages/cfs-template-apollo-server-express-no-auth/packages/server/.dockerignore: -------------------------------------------------------------------------------- 1 | # Adapted from gitignore 2 | 3 | # dependencies 4 | node_modules 5 | .pnp 6 | .pnp.js 7 | 8 | # testing 9 | coverage 10 | 11 | # misc 12 | .DS_Store 13 | .env.local 14 | .env.development.local 15 | .env.test.local 16 | .env.production.local 17 | 18 | npm-debug.log* 19 | yarn-debug.log* 20 | yarn-error.log* 21 | 22 | # packages 23 | packages/pulumi-aws 24 | packages/mobile 25 | packages/web 26 | packages/common 27 | -------------------------------------------------------------------------------- /packages/cfs-template-apollo-server-express-no-auth/packages/server/.env.development: -------------------------------------------------------------------------------- 1 | DATABASE_URL=postgres://postgres:postgrespassword@localhost:5432/postgres 2 | -------------------------------------------------------------------------------- /packages/cfs-template-apollo-server-express-no-auth/packages/server/README.md: -------------------------------------------------------------------------------- 1 | # Server 2 | 3 | ## Run 4 | 5 | ```bash 6 | yarn start 7 | ``` 8 | 9 | ### Migrations 10 | 11 | ```bash 12 | cd packages/server 13 | yarn typeorm 14 | ``` 15 | 16 | References 17 | 18 | - https://typeorm.io/#/migrations 19 | -------------------------------------------------------------------------------- /packages/cfs-template-apollo-server-express-no-auth/packages/server/ormconfig.js: -------------------------------------------------------------------------------- 1 | // Load configuration from .env files. 2 | // Required for TypeORM CLI commands, `yarn typeorm`. 3 | require("cfs-dotenv").config(); 4 | 5 | module.exports = { 6 | type: "postgres", 7 | url: process.env.DATABASE_URL, 8 | synchronize: true, 9 | logging: false, 10 | entities: ["build/entity/**/*.js"], 11 | migrations: ["build/migration/**/*.js"], 12 | subscribers: ["build/subscriber/**/*.js"], 13 | cli: { 14 | entitiesDir: "src/entity", 15 | migrationsDir: "src/migration", 16 | subscribersDir: "src/subscriber", 17 | }, 18 | }; 19 | -------------------------------------------------------------------------------- /packages/cfs-template-apollo-server-express-no-auth/packages/server/src/entity/Todo.ts: -------------------------------------------------------------------------------- 1 | import { Column, Entity, PrimaryGeneratedColumn } from "typeorm"; 2 | 3 | @Entity({ name: "todos" }) 4 | export class Todo { 5 | @PrimaryGeneratedColumn() 6 | id!: number; 7 | 8 | @Column() 9 | name!: string; 10 | 11 | @Column() 12 | complete!: boolean; 13 | } 14 | -------------------------------------------------------------------------------- /packages/cfs-template-apollo-server-express-no-auth/packages/server/src/getResolvers.ts: -------------------------------------------------------------------------------- 1 | import { Connection } from "typeorm"; 2 | 3 | import { Todo } from "./entity/Todo"; 4 | import { 5 | MutationCreateTodoArgs, 6 | MutationDeleteTodoArgs, 7 | MutationUpdateTodoArgs, 8 | Resolvers, 9 | } from "./graphql/__generated__"; 10 | 11 | export default function getResolvers(connection: Connection): Resolvers { 12 | const todoRepository = connection.getRepository(Todo); 13 | return { 14 | Query: { 15 | todos: () => todoRepository.find(), 16 | }, 17 | Mutation: { 18 | createTodo: (_, args: MutationCreateTodoArgs) => 19 | todoRepository.save({ complete: false, ...args }), 20 | updateTodo: async (_, { id, ...args }: MutationUpdateTodoArgs) => { 21 | await todoRepository.update(id, args); 22 | return todoRepository.findOne(id); 23 | }, 24 | deleteTodo: async (_, { id }: MutationDeleteTodoArgs) => { 25 | const todo = await todoRepository.findOne(id); 26 | await todoRepository.delete(id); 27 | return todo; 28 | }, 29 | }, 30 | }; 31 | } 32 | -------------------------------------------------------------------------------- /packages/cfs-template-apollo-server-express-no-auth/packages/server/src/graphql/schema.ts: -------------------------------------------------------------------------------- 1 | import { gql } from "apollo-server-express"; 2 | 3 | // If changes are made to the schema, you must generate the TS types and React 4 | // hooks for the Apollo clients and server with `yarn generate`. 5 | 6 | export default gql` 7 | type Todo { 8 | id: Int! 9 | name: String! 10 | complete: Boolean! 11 | } 12 | 13 | type Query { 14 | todos: [Todo!]! 15 | } 16 | 17 | type Mutation { 18 | createTodo(name: String!): Todo! 19 | updateTodo(id: Int!, name: String, complete: Boolean): Todo 20 | deleteTodo(id: Int!): Todo 21 | } 22 | `; 23 | -------------------------------------------------------------------------------- /packages/cfs-template-apollo-server-express-no-auth/packages/server/tsconfig.build.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig", 3 | "exclude": ["**/build/", "**/*.test.ts"] 4 | } 5 | -------------------------------------------------------------------------------- /packages/cfs-template-apollo-server-express-no-auth/packages/server/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | // File paths are relative to the containing tsconfig.json file location 4 | // https://github.com/Microsoft/TypeScript/issues/24851 5 | "outDir": "build", 6 | "emitDecoratorMetadata": true, 7 | "experimentalDecorators": true 8 | }, 9 | "extends": "../../tsconfig" 10 | } 11 | -------------------------------------------------------------------------------- /packages/cfs-template-apollo-server-express-no-auth/packages/web/.env: -------------------------------------------------------------------------------- 1 | EXTEND_ESLINT=true 2 | -------------------------------------------------------------------------------- /packages/cfs-template-apollo-server-express-no-auth/packages/web/.env.development: -------------------------------------------------------------------------------- 1 | REACT_APP_GRAPHQL_URL=http://localhost:8080/graphql 2 | -------------------------------------------------------------------------------- /packages/cfs-template-apollo-server-express-no-auth/packages/web/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tiagob/create-full-stack/94409eac51290b38c7a3a4dbb3f068430cfb9dd2/packages/cfs-template-apollo-server-express-no-auth/packages/web/public/favicon.ico -------------------------------------------------------------------------------- /packages/cfs-template-apollo-server-express-no-auth/packages/web/public/logo192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tiagob/create-full-stack/94409eac51290b38c7a3a4dbb3f068430cfb9dd2/packages/cfs-template-apollo-server-express-no-auth/packages/web/public/logo192.png -------------------------------------------------------------------------------- /packages/cfs-template-apollo-server-express-no-auth/packages/web/public/logo512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tiagob/create-full-stack/94409eac51290b38c7a3a4dbb3f068430cfb9dd2/packages/cfs-template-apollo-server-express-no-auth/packages/web/public/logo512.png -------------------------------------------------------------------------------- /packages/cfs-template-apollo-server-express-no-auth/packages/web/public/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "short_name": "React App", 3 | "name": "Create React App Sample", 4 | "icons": [ 5 | { 6 | "src": "favicon.ico", 7 | "sizes": "64x64 32x32 24x24 16x16", 8 | "type": "image/x-icon" 9 | }, 10 | { 11 | "src": "logo192.png", 12 | "type": "image/png", 13 | "sizes": "192x192" 14 | }, 15 | { 16 | "src": "logo512.png", 17 | "type": "image/png", 18 | "sizes": "512x512" 19 | } 20 | ], 21 | "start_url": ".", 22 | "display": "standalone", 23 | "theme_color": "#000000", 24 | "background_color": "#ffffff" 25 | } 26 | -------------------------------------------------------------------------------- /packages/cfs-template-apollo-server-express-no-auth/packages/web/public/robots.txt: -------------------------------------------------------------------------------- 1 | # https://www.robotstxt.org/robotstxt.html 2 | User-agent: * 3 | Disallow: 4 | -------------------------------------------------------------------------------- /packages/cfs-template-apollo-server-express-no-auth/packages/web/src/App.test.tsx: -------------------------------------------------------------------------------- 1 | import { render } from "@testing-library/react"; 2 | import React from "react"; 3 | 4 | import App from "./App"; 5 | 6 | it("renders header", () => { 7 | const { getByLabelText } = render(); 8 | const header = getByLabelText(/menu/i); 9 | expect(header).toBeInTheDocument(); 10 | }); 11 | -------------------------------------------------------------------------------- /packages/cfs-template-apollo-server-express-no-auth/packages/web/src/components/Header.tsx: -------------------------------------------------------------------------------- 1 | import { IconButton, makeStyles, Toolbar } from "@material-ui/core"; 2 | import AppBar from "@material-ui/core/AppBar"; 3 | import { grey } from "@material-ui/core/colors"; 4 | import MenuIcon from "@material-ui/icons/Menu"; 5 | import React from "react"; 6 | 7 | const useStyles = makeStyles({ 8 | toolbar: { 9 | display: "flex", 10 | justifyContent: "space-between", 11 | }, 12 | infoIcon: { 13 | color: grey[100], 14 | }, 15 | }); 16 | 17 | interface Props { 18 | openDrawer: () => void; 19 | } 20 | 21 | export default function Header({ openDrawer }: Props) { 22 | const classes = useStyles(); 23 | return ( 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | ); 32 | } 33 | -------------------------------------------------------------------------------- /packages/cfs-template-apollo-server-express-no-auth/packages/web/src/containers/About.test.tsx: -------------------------------------------------------------------------------- 1 | import { render } from "@testing-library/react"; 2 | import React from "react"; 3 | 4 | import About from "./About"; 5 | 6 | it("renders github link", () => { 7 | const { getByText } = render(); 8 | const link = getByText(/go to github/i); 9 | expect(link).toBeInTheDocument(); 10 | }); 11 | -------------------------------------------------------------------------------- /packages/cfs-template-apollo-server-express-no-auth/packages/web/src/containers/About.tsx: -------------------------------------------------------------------------------- 1 | import { Button, makeStyles } from "@material-ui/core"; 2 | import React from "react"; 3 | 4 | const useStyles = makeStyles({ 5 | root: { 6 | flex: 1, 7 | display: "flex", 8 | flexDirection: "column", 9 | justifyContent: "center", 10 | alignItems: "center", 11 | }, 12 | }); 13 | 14 | export default function About() { 15 | const classes = useStyles(); 16 | return ( 17 |
18 | 26 |
27 | ); 28 | } 29 | -------------------------------------------------------------------------------- /packages/cfs-template-apollo-server-express-no-auth/packages/web/src/containers/Todos.tsx: -------------------------------------------------------------------------------- 1 | import { List, makeStyles, Paper } from "@material-ui/core"; 2 | import { useTodosQuery } from "common"; 3 | import React from "react"; 4 | 5 | import CreateTodo from "../components/CreateTodo"; 6 | import Todo from "../components/Todo"; 7 | 8 | const useStyles = makeStyles(({ spacing }) => ({ 9 | root: { 10 | margin: spacing(3), 11 | padding: spacing(1), 12 | width: "80%", 13 | }, 14 | })); 15 | 16 | export default function Todos() { 17 | const classes = useStyles(); 18 | const { data } = useTodosQuery(); 19 | return ( 20 | 21 | 22 | 23 | {(data?.todos ? data.todos : []).map((todo) => ( 24 | 25 | ))} 26 | 27 | 28 | ); 29 | } 30 | -------------------------------------------------------------------------------- /packages/cfs-template-apollo-server-express-no-auth/packages/web/src/index.css: -------------------------------------------------------------------------------- 1 | body { 2 | margin: 0; 3 | font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", 4 | "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", 5 | sans-serif; 6 | -webkit-font-smoothing: antialiased; 7 | -moz-osx-font-smoothing: grayscale; 8 | } 9 | 10 | code { 11 | font-family: source-code-pro, Menlo, Monaco, Consolas, "Courier New", 12 | monospace; 13 | } 14 | -------------------------------------------------------------------------------- /packages/cfs-template-apollo-server-express-no-auth/packages/web/src/index.tsx: -------------------------------------------------------------------------------- 1 | import "./index.css"; 2 | 3 | import React from "react"; 4 | import ReactDOM from "react-dom"; 5 | 6 | import App from "./App"; 7 | import reportWebVitals from "./reportWebVitals"; 8 | 9 | ReactDOM.render( 10 | 11 | 12 | , 13 | document.querySelector("#root") 14 | ); 15 | 16 | // If you want to start measuring performance in your app, pass a function 17 | // to log results (for example: reportWebVitals(console.log)) 18 | // or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals 19 | reportWebVitals(); 20 | -------------------------------------------------------------------------------- /packages/cfs-template-apollo-server-express-no-auth/packages/web/src/react-app-env.d.ts: -------------------------------------------------------------------------------- 1 | // / 2 | -------------------------------------------------------------------------------- /packages/cfs-template-apollo-server-express-no-auth/packages/web/src/reportWebVitals.ts: -------------------------------------------------------------------------------- 1 | import { ReportHandler } from "web-vitals"; 2 | 3 | const reportWebVitals = (onPerfEntry?: ReportHandler) => { 4 | if (onPerfEntry && onPerfEntry instanceof Function) { 5 | // eslint-disable-next-line promise/catch-or-return, promise/always-return 6 | import("web-vitals").then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => { 7 | getCLS(onPerfEntry); 8 | getFID(onPerfEntry); 9 | getFCP(onPerfEntry); 10 | getLCP(onPerfEntry); 11 | getTTFB(onPerfEntry); 12 | }); 13 | } 14 | }; 15 | 16 | export default reportWebVitals; 17 | -------------------------------------------------------------------------------- /packages/cfs-template-apollo-server-express-no-auth/packages/web/src/setupTests.ts: -------------------------------------------------------------------------------- 1 | // jest-dom adds custom jest matchers for asserting on DOM nodes. 2 | // allows you to do things like: 3 | // expect(element).toHaveTextContent(/react/i) 4 | // learn more: https://github.com/testing-library/jest-dom 5 | import "@testing-library/jest-dom"; 6 | 7 | // Fix "MutationObserver is not a constructor" 8 | // https://github.com/testing-library/react-testing-library/issues/662 9 | // Can likely remove with react-scripts v4 10 | window.MutationObserver = require("mutation-observer"); 11 | -------------------------------------------------------------------------------- /packages/cfs-template-apollo-server-express-no-auth/packages/web/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | // Can't extend CRA tsconfig.json 3 | // https://github.com/facebook/create-react-app/issues/6269 4 | "compilerOptions": { 5 | "allowJs": false, 6 | "allowSyntheticDefaultImports": true, 7 | "esModuleInterop": true, 8 | "forceConsistentCasingInFileNames": true, 9 | "isolatedModules": true, 10 | "jsx": "react", 11 | "lib": ["DOM", "DOM.Iterable", "ESNext"], 12 | "module": "ESNext", 13 | "moduleResolution": "Node", 14 | "noEmit": true, 15 | "noFallthroughCasesInSwitch": true, 16 | "noImplicitAny": true, 17 | "preserveWatchOutput": true, 18 | "resolveJsonModule": true, 19 | "skipLibCheck": true, 20 | "strict": true, 21 | "target": "ES5" 22 | }, 23 | "include": ["src"] 24 | } 25 | -------------------------------------------------------------------------------- /packages/cfs-template-apollo-server-express-no-auth/postgres/.env.development: -------------------------------------------------------------------------------- 1 | POSTGRES_PASSWORD=postgrespassword 2 | -------------------------------------------------------------------------------- /packages/cfs-template-apollo-server-express-no-auth/template.README.md: -------------------------------------------------------------------------------- 1 | This project was bootstrapped with [Create Full Stack](https://github.com/tiagob/create-full-stack). 2 | 3 | - Get started with the [development guide]({DEVELOPMENT_FILENAME}) 4 | - Follow the [Apollo Server Express tutorial](https://create-full-stack.com/docs/tutorial_apollo_server_express) to update your full stack 5 | - Review the [Create Full Stack docs](https://create-full-stack.com/docs/) 6 | 7 | - Deploy to AWS with the [production guide]({PRODUCTION_FILENAME}) 8 | 9 | -------------------------------------------------------------------------------- /packages/cfs-template-hasura-auth0/.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | extends: "eslint-config-create-full-stack", 3 | }; 4 | -------------------------------------------------------------------------------- /packages/cfs-template-hasura-auth0/.github/workflows/pull_request.yml: -------------------------------------------------------------------------------- 1 | # @remove-file-pulumi-aws 2 | on: 3 | - pull_request 4 | jobs: 5 | preview: 6 | name: Pulumi Preview CI 7 | runs-on: ubuntu-latest 8 | steps: 9 | - uses: actions/checkout@v2 10 | - uses: actions/setup-node@v1 11 | with: 12 | node-version: 12.x 13 | - run: yarn 14 | - run: yarn build 15 | - uses: docker://pulumi/actions 16 | with: 17 | args: preview 18 | env: 19 | AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} 20 | AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} 21 | PULUMI_ACCESS_TOKEN: ${{ secrets.PULUMI_ACCESS_TOKEN }} 22 | PULUMI_CI: pr 23 | PULUMI_ROOT: packages/pulumi-aws 24 | # Yarn is required for workspaces 25 | USE_YARN: true 26 | -------------------------------------------------------------------------------- /packages/cfs-template-hasura-auth0/.github/workflows/push.yml: -------------------------------------------------------------------------------- 1 | on: 2 | - push 3 | jobs: 4 | test: 5 | name: Node.js CI 6 | runs-on: ubuntu-latest 7 | steps: 8 | - uses: actions/checkout@v2 9 | - uses: actions/setup-node@v1 10 | with: 11 | node-version: 12.x 12 | - run: yarn 13 | - run: yarn build 14 | - run: yarn test 15 | env: 16 | CI: true 17 | -------------------------------------------------------------------------------- /packages/cfs-template-hasura-auth0/.github/workflows/push_master.yml: -------------------------------------------------------------------------------- 1 | # @remove-file-pulumi-aws 2 | on: 3 | push: 4 | branches: 5 | - master 6 | jobs: 7 | up: 8 | name: Pulumi Update CD 9 | runs-on: ubuntu-latest 10 | steps: 11 | - uses: actions/checkout@v2 12 | - uses: actions/setup-node@v1 13 | with: 14 | node-version: 12.x 15 | - run: yarn 16 | - run: yarn build 17 | - uses: docker://pulumi/actions 18 | with: 19 | args: up --yes 20 | env: 21 | AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} 22 | AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} 23 | PULUMI_ACCESS_TOKEN: ${{ secrets.PULUMI_ACCESS_TOKEN }} 24 | PULUMI_CI: up 25 | PULUMI_ROOT: packages/pulumi-aws 26 | # Yarn is required for workspaces 27 | USE_YARN: true 28 | -------------------------------------------------------------------------------- /packages/cfs-template-hasura-auth0/.prettierignore: -------------------------------------------------------------------------------- 1 | build/ 2 | .expo/ 3 | 4 | # generated hasura metadata 5 | hasura/metadata 6 | -------------------------------------------------------------------------------- /packages/cfs-template-hasura-auth0/.pulumi/ci.json: -------------------------------------------------------------------------------- 1 | { 2 | "master": "production" 3 | } 4 | -------------------------------------------------------------------------------- /packages/cfs-template-hasura-auth0/.vscode/extensions.json: -------------------------------------------------------------------------------- 1 | { 2 | "recommendations": [ 3 | "dbaeumer.vscode-eslint", 4 | "esbenp.prettier-vscode", 5 | "ms-azuretools.vscode-docker", 6 | "streetsidesoftware.code-spell-checker" 7 | ] 8 | } 9 | -------------------------------------------------------------------------------- /packages/cfs-template-hasura-auth0/.vscode/launch.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "0.2.0", 3 | "configurations": [] 4 | } 5 | -------------------------------------------------------------------------------- /packages/cfs-template-hasura-auth0/.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "editor.defaultFormatter": "esbenp.prettier-vscode", 3 | "editor.formatOnSave": true, 4 | "editor.codeActionsOnSave": { 5 | "source.fixAll": true 6 | }, 7 | "editor.tabSize": 2 8 | } 9 | -------------------------------------------------------------------------------- /packages/cfs-template-hasura-auth0/.watchmanconfig: -------------------------------------------------------------------------------- 1 | {} 2 | -------------------------------------------------------------------------------- /packages/cfs-template-hasura-auth0/README.md: -------------------------------------------------------------------------------- 1 | # cfs-template-hasura-auth0 2 | 3 | This is the official Hasura Auth0 template for Create Full Stack. 4 | 5 | For more information, please refer to: 6 | 7 | - [Getting Started](https://create-full-stack.com/docs) – How to create a new full stack. 8 | - [User Guide](https://create-full-stack.com) – How to develop apps bootstrapped with Create Full Stack. 9 | -------------------------------------------------------------------------------- /packages/cfs-template-hasura-auth0/codegen.yml: -------------------------------------------------------------------------------- 1 | schema: 2 | - "http://localhost:8080/v1/graphql": 3 | headers: 4 | x-hasura-admin-secret: myadminsecretkey 5 | hooks: 6 | afterOneFileWrite: 7 | - prettier --write 8 | - eslint --fix 9 | generates: 10 | packages/common/src/graphql/__generated__/index.ts: 11 | documents: packages/common/src/graphql/*.graphql 12 | plugins: 13 | - typescript 14 | - typescript-operations 15 | - typescript-react-apollo 16 | config: 17 | namingConvention: 18 | typeNames: pascal-case#pascalCase 19 | transformUnderscore: true 20 | # Use undefined instead of null when a field isn't set. 21 | maybeValue: T | undefined 22 | -------------------------------------------------------------------------------- /packages/cfs-template-hasura-auth0/docker-compose.yaml: -------------------------------------------------------------------------------- 1 | version: "3.8" 2 | services: 3 | postgres: 4 | image: postgres:12 5 | restart: always 6 | ports: 7 | - "5432:5432" 8 | volumes: 9 | - db_data:/var/lib/postgresql/data 10 | env_file: "./postgres/.env.development" 11 | graphql-engine: 12 | build: "./hasura" 13 | ports: 14 | - "8080:8080" 15 | depends_on: 16 | - "postgres" 17 | restart: always 18 | env_file: "./hasura/.env.development" 19 | # Include Hasura migrations and metadata every time `docker-compose up` is 20 | # run. 21 | # https://hasura.io/docs/1.0/graphql/core/migrations/advanced/auto-apply-migrations.html#applying-migrations 22 | volumes: 23 | - "./hasura/migrations:/hasura-migrations" 24 | - "./hasura/metadata:/hasura-metadata" 25 | volumes: 26 | db_data: 27 | -------------------------------------------------------------------------------- /packages/cfs-template-hasura-auth0/gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | node_modules 5 | .pnp 6 | .pnp.js 7 | 8 | # testing 9 | coverage 10 | 11 | # production 12 | build 13 | 14 | # misc 15 | .DS_Store 16 | .env.local 17 | .env.development.local 18 | .env.test.local 19 | .env.production.local 20 | 21 | npm-debug.log* 22 | yarn-debug.log* 23 | yarn-error.log* 24 | -------------------------------------------------------------------------------- /packages/cfs-template-hasura-auth0/hasura/.env.development: -------------------------------------------------------------------------------- 1 | HASURA_GRAPHQL_DATABASE_URL=postgres://postgres:postgrespassword@postgres:5432/postgres 2 | # Access the console via "hasura console" CLI to automate migration creation 3 | HASURA_GRAPHQL_ENABLE_CONSOLE=false 4 | HASURA_GRAPHQL_ENABLED_LOG_TYPES=startup, http-log, webhook-log, websocket-log, query-log 5 | HASURA_GRAPHQL_ADMIN_SECRET=myadminsecretkey 6 | # Follow development.html or DEVELOPMENT.md instructions to fill in these fields 7 | HASURA_GRAPHQL_JWT_SECRET= 8 | -------------------------------------------------------------------------------- /packages/cfs-template-hasura-auth0/hasura/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM hasura/graphql-engine:v1.3.2.cli-migrations-v2 2 | 3 | COPY ./migrations /hasura-migrations 4 | COPY ./metadata /hasura-metadata 5 | 6 | CMD graphql-engine serve 7 | -------------------------------------------------------------------------------- /packages/cfs-template-hasura-auth0/hasura/config.yaml: -------------------------------------------------------------------------------- 1 | version: 2 2 | endpoint: http://localhost:8080 3 | admin_secret: myadminsecretkey 4 | metadata_directory: metadata 5 | actions: 6 | kind: synchronous 7 | handler_webhook_baseurl: http://localhost:3000 8 | -------------------------------------------------------------------------------- /packages/cfs-template-hasura-auth0/hasura/metadata/actions.graphql: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /packages/cfs-template-hasura-auth0/hasura/metadata/actions.yaml: -------------------------------------------------------------------------------- 1 | actions: [] 2 | custom_types: 3 | enums: [] 4 | input_objects: [] 5 | objects: [] 6 | scalars: [] 7 | -------------------------------------------------------------------------------- /packages/cfs-template-hasura-auth0/hasura/metadata/allow_list.yaml: -------------------------------------------------------------------------------- 1 | [] 2 | -------------------------------------------------------------------------------- /packages/cfs-template-hasura-auth0/hasura/metadata/functions.yaml: -------------------------------------------------------------------------------- 1 | [] 2 | -------------------------------------------------------------------------------- /packages/cfs-template-hasura-auth0/hasura/metadata/query_collections.yaml: -------------------------------------------------------------------------------- 1 | [] 2 | -------------------------------------------------------------------------------- /packages/cfs-template-hasura-auth0/hasura/metadata/remote_schemas.yaml: -------------------------------------------------------------------------------- 1 | [] 2 | -------------------------------------------------------------------------------- /packages/cfs-template-hasura-auth0/hasura/metadata/tables.yaml: -------------------------------------------------------------------------------- 1 | - table: 2 | schema: public 3 | name: todos 4 | insert_permissions: 5 | - role: user 6 | permission: 7 | check: {} 8 | set: 9 | uid: x-hasura-User-Id 10 | columns: 11 | - complete 12 | - name 13 | backend_only: false 14 | select_permissions: 15 | - role: user 16 | permission: 17 | columns: 18 | - complete 19 | - id 20 | - name 21 | - uid 22 | filter: 23 | uid: 24 | _eq: X-Hasura-User-Id 25 | update_permissions: 26 | - role: user 27 | permission: 28 | columns: 29 | - complete 30 | - name 31 | filter: 32 | uid: 33 | _eq: X-Hasura-User-Id 34 | check: null 35 | delete_permissions: 36 | - role: user 37 | permission: 38 | filter: 39 | uid: 40 | _eq: X-Hasura-User-Id 41 | -------------------------------------------------------------------------------- /packages/cfs-template-hasura-auth0/hasura/metadata/version.yaml: -------------------------------------------------------------------------------- 1 | version: 2 2 | -------------------------------------------------------------------------------- /packages/cfs-template-hasura-auth0/hasura/migrations/1590186473974_create_table_public_todos/down.sql: -------------------------------------------------------------------------------- 1 | DROP TABLE "public"."todos"; 2 | -------------------------------------------------------------------------------- /packages/cfs-template-hasura-auth0/hasura/migrations/1590186473974_create_table_public_todos/up.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE "public"."todos"("id" serial NOT NULL, "name" text NOT NULL, "complete" boolean NOT NULL DEFAULT FALSE, PRIMARY KEY ("id") , UNIQUE ("id")); 2 | -------------------------------------------------------------------------------- /packages/cfs-template-hasura-auth0/hasura/migrations/1590213038516_alter_table_public_todos_add_column_uid/down.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE "public"."todos" DROP COLUMN "uid"; 2 | -------------------------------------------------------------------------------- /packages/cfs-template-hasura-auth0/hasura/migrations/1590213038516_alter_table_public_todos_add_column_uid/up.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE "public"."todos" ADD COLUMN "uid" text NULL; 2 | -------------------------------------------------------------------------------- /packages/cfs-template-hasura-auth0/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "cfs-template-hasura-auth0", 3 | "version": "0.1.65", 4 | "description": "The Hasura Auth0 template for Create Full Stack.", 5 | "bugs": { 6 | "url": "https://github.com/tiagob/create-full-stack/issues" 7 | }, 8 | "repository": { 9 | "type": "git", 10 | "url": "https://github.com/tiagob/create-full-stack.git", 11 | "directory": "packages/cfs-template-hasura-auth0" 12 | }, 13 | "license": "MIT" 14 | } 15 | -------------------------------------------------------------------------------- /packages/cfs-template-hasura-auth0/packages/common/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "common", 3 | "version": "0.1.0", 4 | "private": true, 5 | "main": "build/index.js", 6 | "typings": "build/index.d.ts", 7 | "scripts": { 8 | "build": "tsc", 9 | "watch": "tsc --watch" 10 | }, 11 | "dependencies": { 12 | "@apollo/client": "^3.1.5", 13 | "graphql": "^15.3.0", 14 | "react": "~16.13.1", 15 | "react-dom": "~16.13.1", 16 | "subscriptions-transport-ws": "^0.9.18" 17 | }, 18 | "devDependencies": { 19 | "@types/react": "^16.9.49", 20 | "typescript": "^4.0.2" 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /packages/cfs-template-hasura-auth0/packages/common/src/graphql/todos.graphql: -------------------------------------------------------------------------------- 1 | # If changes are made to this file or other `.graphql` files, you must generate 2 | # the TS types and React hooks for the Apollo clients with `yarn generate`. 3 | 4 | query Todos { 5 | todos { 6 | id 7 | name 8 | complete 9 | } 10 | } 11 | 12 | mutation CreateTodo($name: String!) { 13 | insert_todos(objects: { name: $name }) { 14 | returning { 15 | id 16 | name 17 | complete 18 | } 19 | } 20 | } 21 | 22 | mutation UpdateTodo($id: Int!, $complete: Boolean!) { 23 | update_todos(where: { id: { _eq: $id } }, _set: { complete: $complete }) { 24 | returning { 25 | id 26 | name 27 | complete 28 | } 29 | } 30 | } 31 | 32 | mutation DeleteTodo($id: Int!) { 33 | delete_todos(where: { id: { _eq: $id } }) { 34 | returning { 35 | id 36 | } 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /packages/cfs-template-hasura-auth0/packages/common/src/graphql/useCreateTodo.ts: -------------------------------------------------------------------------------- 1 | import { 2 | TodosDocument, 3 | TodosQuery, 4 | TodosQueryVariables, 5 | useCreateTodoMutation, 6 | } from "./__generated__"; 7 | 8 | export default () => 9 | useCreateTodoMutation({ 10 | update: (cache, { data }) => { 11 | if (!data || !data.insert_todos) { 12 | return; 13 | } 14 | const createTodo = data.insert_todos.returning; 15 | const query = cache.readQuery({ 16 | query: TodosDocument, 17 | }); 18 | const todos = query?.todos || []; 19 | cache.writeQuery({ 20 | query: TodosDocument, 21 | data: { todos: todos.concat(createTodo) }, 22 | }); 23 | }, 24 | }); 25 | -------------------------------------------------------------------------------- /packages/cfs-template-hasura-auth0/packages/common/src/graphql/useDeleteTodo.ts: -------------------------------------------------------------------------------- 1 | import { useDeleteTodoMutation } from "./__generated__"; 2 | 3 | export default () => 4 | useDeleteTodoMutation({ 5 | update: (cache, { data }) => { 6 | if (!data || !data.delete_todos) { 7 | return; 8 | } 9 | const deleteTodo = data.delete_todos.returning[0]; 10 | cache.evict({ id: cache.identify(deleteTodo) }); 11 | }, 12 | }); 13 | -------------------------------------------------------------------------------- /packages/cfs-template-hasura-auth0/packages/common/src/index.ts: -------------------------------------------------------------------------------- 1 | export { default as useCreateTodo } from "./graphql/useCreateTodo"; 2 | export { default as useDeleteTodo } from "./graphql/useDeleteTodo"; 3 | 4 | export * from "./graphql/__generated__"; 5 | -------------------------------------------------------------------------------- /packages/cfs-template-hasura-auth0/packages/common/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | // File paths are relative to the containing tsconfig.json file location 4 | // https://github.com/Microsoft/TypeScript/issues/24851 5 | "outDir": "build" 6 | }, 7 | "extends": "../../tsconfig" 8 | } 9 | -------------------------------------------------------------------------------- /packages/cfs-template-hasura-auth0/packages/mobile/.env.development: -------------------------------------------------------------------------------- 1 | # Follow development.html or DEVELOPMENT.md instructions to fill in these fields 2 | AUTH0_AUDIENCE= 3 | AUTH0_DOMAIN= 4 | AUTH0_CLIENT_ID= 5 | -------------------------------------------------------------------------------- /packages/cfs-template-hasura-auth0/packages/mobile/.expo-shared/assets.json: -------------------------------------------------------------------------------- 1 | { 2 | "12bb71342c6255bbf50437ec8f4441c083f47cdb74bd89160c15e4f43e52a1cb": true, 3 | "40b842e832070c58deac6aa9e08fa459302ee3f9da492c7e77d93d2fbf4a56fd": true 4 | } 5 | -------------------------------------------------------------------------------- /packages/cfs-template-hasura-auth0/packages/mobile/README.md: -------------------------------------------------------------------------------- 1 | # Mobile 2 | 3 | An Expo [managed workflow](https://docs.expo.io/introduction/managed-vs-bare/#managed-workflow) for [react-native](https://reactnative.dev/). 4 | 5 | ## Run 6 | 7 | ```bash 8 | yarn start 9 | ``` 10 | 11 | Expo web is unsupported. If you need this, +1 [create-full-stack/issues/148](https://github.com/tiagob/create-full-stack/issues/148). 12 | -------------------------------------------------------------------------------- /packages/cfs-template-hasura-auth0/packages/mobile/__generated__/AppEntry.js: -------------------------------------------------------------------------------- 1 | // @generated by expo-yarn-workspaces 2 | 3 | import { registerRootComponent } from "expo"; 4 | import { activateKeepAwake } from "expo-keep-awake"; 5 | 6 | import App from "../App"; 7 | 8 | if (__DEV__) { 9 | activateKeepAwake(); 10 | } 11 | 12 | registerRootComponent(App); 13 | -------------------------------------------------------------------------------- /packages/cfs-template-hasura-auth0/packages/mobile/app.json: -------------------------------------------------------------------------------- 1 | { 2 | "expo": { 3 | "name": "", 4 | "slug": "", 5 | "version": "1.0.0", 6 | "orientation": "portrait", 7 | "icon": "./assets/icon.png", 8 | "splash": { 9 | "image": "./assets/splash.png", 10 | "resizeMode": "contain", 11 | "backgroundColor": "#ffffff" 12 | }, 13 | "updates": { 14 | "fallbackToCacheTimeout": 0 15 | }, 16 | "assetBundlePatterns": ["**/*"], 17 | "ios": { 18 | "supportsTablet": true 19 | }, 20 | "web": { 21 | "favicon": "./assets/favicon.png" 22 | }, 23 | "scheme": "" 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /packages/cfs-template-hasura-auth0/packages/mobile/assets/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tiagob/create-full-stack/94409eac51290b38c7a3a4dbb3f068430cfb9dd2/packages/cfs-template-hasura-auth0/packages/mobile/assets/favicon.png -------------------------------------------------------------------------------- /packages/cfs-template-hasura-auth0/packages/mobile/assets/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tiagob/create-full-stack/94409eac51290b38c7a3a4dbb3f068430cfb9dd2/packages/cfs-template-hasura-auth0/packages/mobile/assets/icon.png -------------------------------------------------------------------------------- /packages/cfs-template-hasura-auth0/packages/mobile/assets/splash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tiagob/create-full-stack/94409eac51290b38c7a3a4dbb3f068430cfb9dd2/packages/cfs-template-hasura-auth0/packages/mobile/assets/splash.png -------------------------------------------------------------------------------- /packages/cfs-template-hasura-auth0/packages/mobile/babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = function (api) { 2 | api.cache(true); 3 | return { 4 | presets: ["babel-preset-expo"], 5 | plugins: ["babel-plugin-expo-cfs-dotenv"], 6 | }; 7 | }; 8 | -------------------------------------------------------------------------------- /packages/cfs-template-hasura-auth0/packages/mobile/gitignore: -------------------------------------------------------------------------------- 1 | node_modules/**/* 2 | .expo/* 3 | npm-debug.* 4 | *.jks 5 | *.p8 6 | *.p12 7 | *.key 8 | *.mobileprovision 9 | *.orig.* 10 | web-build/ 11 | 12 | # macOS 13 | .DS_Store 14 | -------------------------------------------------------------------------------- /packages/cfs-template-hasura-auth0/packages/mobile/metro.config.js: -------------------------------------------------------------------------------- 1 | const { createMetroConfiguration } = require("expo-yarn-workspaces"); 2 | 3 | module.exports = createMetroConfiguration(__dirname); 4 | -------------------------------------------------------------------------------- /packages/cfs-template-hasura-auth0/packages/mobile/src/components/CreateTodo.tsx: -------------------------------------------------------------------------------- 1 | import { useCreateTodo } from "common"; 2 | import React, { useCallback, useState } from "react"; 3 | import { StyleSheet, View } from "react-native"; 4 | import { Icon, Input } from "react-native-elements"; 5 | 6 | const styles = StyleSheet.create({ 7 | root: { 8 | flexDirection: "row", 9 | marginLeft: 10, 10 | marginRight: 10, 11 | marginTop: 10, 12 | }, 13 | }); 14 | 15 | export default function CreateTodo() { 16 | const [name, setName] = useState(""); 17 | const [createTodo] = useCreateTodo(); 18 | 19 | const onSubmit = useCallback(() => { 20 | createTodo({ variables: { name } }); 21 | setName(""); 22 | }, [name, setName, createTodo]); 23 | 24 | return ( 25 | 26 | setName(text)} 30 | onSubmitEditing={onSubmit} 31 | rightIcon={ 32 | 33 | } 34 | /> 35 | 36 | ); 37 | } 38 | -------------------------------------------------------------------------------- /packages/cfs-template-hasura-auth0/packages/mobile/src/components/Header.tsx: -------------------------------------------------------------------------------- 1 | import { DrawerNavigationProp } from "@react-navigation/drawer"; 2 | import { useAuth0 } from "cfs-expo-auth0"; 3 | import React from "react"; 4 | import { Platform } from "react-native"; 5 | import { Avatar, Header as ElementsHeader } from "react-native-elements"; 6 | 7 | import { RootStackParamList } from "../utils/types"; 8 | 9 | interface Props { 10 | navigation: DrawerNavigationProp< 11 | RootStackParamList, 12 | "Todos" | "About" | "SignIn" 13 | >; 14 | } 15 | 16 | export default function Header({ navigation }: Props) { 17 | const { user } = useAuth0(); 18 | return ( 19 | navigation.openDrawer()} 31 | /> 32 | } 33 | /> 34 | ); 35 | } 36 | -------------------------------------------------------------------------------- /packages/cfs-template-hasura-auth0/packages/mobile/src/containers/About.test.tsx: -------------------------------------------------------------------------------- 1 | import { render } from "@testing-library/react-native"; 2 | import React from "react"; 3 | 4 | import { navigation } from "../utils/testMocks"; 5 | import About from "./About"; 6 | 7 | it("renders github link", () => { 8 | const { getByText } = render(); 9 | const link = getByText(/go to github/i); 10 | expect(link).toBeTruthy(); 11 | }); 12 | -------------------------------------------------------------------------------- /packages/cfs-template-hasura-auth0/packages/mobile/src/containers/SignIn.tsx: -------------------------------------------------------------------------------- 1 | import { useAuth0 } from "cfs-expo-auth0"; 2 | import React from "react"; 3 | import { StatusBar, StyleSheet, View } from "react-native"; 4 | import { Button } from "react-native-elements"; 5 | 6 | const styles = StyleSheet.create({ 7 | root: { 8 | flex: 1, 9 | }, 10 | container: { 11 | flex: 1, 12 | alignItems: "center", 13 | justifyContent: "center", 14 | }, 15 | }); 16 | 17 | export default function SignIn() { 18 | const { request, login } = useAuth0(); 19 | 20 | return ( 21 | 22 | 23 | 24 | 26 | 27 | ); 28 | } 29 | -------------------------------------------------------------------------------- /packages/cfs-template-hasura-auth0/packages/web/src/containers/Todos.tsx: -------------------------------------------------------------------------------- 1 | import { List, makeStyles, Paper } from "@material-ui/core"; 2 | import { useTodosQuery } from "common"; 3 | import React from "react"; 4 | 5 | import CreateTodo from "../components/CreateTodo"; 6 | import Todo from "../components/Todo"; 7 | 8 | const useStyles = makeStyles(({ spacing }) => ({ 9 | root: { 10 | margin: spacing(3), 11 | padding: spacing(1), 12 | width: "80%", 13 | }, 14 | })); 15 | 16 | export default function Todos() { 17 | const classes = useStyles(); 18 | const { data } = useTodosQuery(); 19 | return ( 20 | 21 | 22 | 23 | {(data?.todos ? data.todos : []).map((todo) => ( 24 | 25 | ))} 26 | 27 | 28 | ); 29 | } 30 | -------------------------------------------------------------------------------- /packages/cfs-template-hasura-auth0/packages/web/src/index.css: -------------------------------------------------------------------------------- 1 | body { 2 | margin: 0; 3 | font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", 4 | "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", 5 | sans-serif; 6 | -webkit-font-smoothing: antialiased; 7 | -moz-osx-font-smoothing: grayscale; 8 | } 9 | 10 | code { 11 | font-family: source-code-pro, Menlo, Monaco, Consolas, "Courier New", 12 | monospace; 13 | } 14 | -------------------------------------------------------------------------------- /packages/cfs-template-hasura-auth0/packages/web/src/react-app-env.d.ts: -------------------------------------------------------------------------------- 1 | // / 2 | -------------------------------------------------------------------------------- /packages/cfs-template-hasura-auth0/packages/web/src/reportWebVitals.ts: -------------------------------------------------------------------------------- 1 | import { ReportHandler } from "web-vitals"; 2 | 3 | const reportWebVitals = (onPerfEntry?: ReportHandler) => { 4 | if (onPerfEntry && onPerfEntry instanceof Function) { 5 | // eslint-disable-next-line promise/catch-or-return, promise/always-return 6 | import("web-vitals").then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => { 7 | getCLS(onPerfEntry); 8 | getFID(onPerfEntry); 9 | getFCP(onPerfEntry); 10 | getLCP(onPerfEntry); 11 | getTTFB(onPerfEntry); 12 | }); 13 | } 14 | }; 15 | 16 | export default reportWebVitals; 17 | -------------------------------------------------------------------------------- /packages/cfs-template-hasura-auth0/packages/web/src/setupTests.ts: -------------------------------------------------------------------------------- 1 | // jest-dom adds custom jest matchers for asserting on DOM nodes. 2 | // allows you to do things like: 3 | // expect(element).toHaveTextContent(/react/i) 4 | // learn more: https://github.com/testing-library/jest-dom 5 | import "@testing-library/jest-dom"; 6 | 7 | // Fix "MutationObserver is not a constructor" 8 | // https://github.com/testing-library/react-testing-library/issues/662 9 | // Can likely remove with react-scripts v4 10 | window.MutationObserver = require("mutation-observer"); 11 | -------------------------------------------------------------------------------- /packages/cfs-template-hasura-auth0/packages/web/src/utils/getApolloClient.ts: -------------------------------------------------------------------------------- 1 | import { ApolloClient, createHttpLink, InMemoryCache } from "@apollo/client"; 2 | import { setContext } from "@apollo/client/link/context"; 3 | import { GetTokenSilentlyOptions } from "@auth0/auth0-spa-js"; 4 | 5 | const httpLink = createHttpLink({ uri: process.env.REACT_APP_GRAPHQL_URL }); 6 | 7 | export default function getApolloClient( 8 | getAccessTokenSilently: ( 9 | options?: GetTokenSilentlyOptions | undefined 10 | ) => Promise 11 | ) { 12 | const authLink = setContext(async (_, { headers }) => { 13 | const token = await getAccessTokenSilently(); 14 | if (!token) { 15 | return { headers }; 16 | } 17 | return { 18 | headers: { 19 | ...headers, 20 | authorization: `Bearer ${token}`, 21 | }, 22 | }; 23 | }); 24 | 25 | return new ApolloClient({ 26 | link: authLink.concat(httpLink), 27 | cache: new InMemoryCache(), 28 | }); 29 | } 30 | -------------------------------------------------------------------------------- /packages/cfs-template-hasura-auth0/packages/web/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | // Can't extend CRA tsconfig.json 3 | // https://github.com/facebook/create-react-app/issues/6269 4 | "compilerOptions": { 5 | "allowJs": false, 6 | "allowSyntheticDefaultImports": true, 7 | "esModuleInterop": true, 8 | "forceConsistentCasingInFileNames": true, 9 | "isolatedModules": true, 10 | "jsx": "react", 11 | "lib": ["DOM", "DOM.Iterable", "ESNext"], 12 | "module": "ESNext", 13 | "moduleResolution": "Node", 14 | "noEmit": true, 15 | "noFallthroughCasesInSwitch": true, 16 | "noImplicitAny": true, 17 | "preserveWatchOutput": true, 18 | "resolveJsonModule": true, 19 | "skipLibCheck": true, 20 | "strict": true, 21 | "target": "ES5" 22 | }, 23 | "include": ["src"] 24 | } 25 | -------------------------------------------------------------------------------- /packages/cfs-template-hasura-auth0/postgres/.env.development: -------------------------------------------------------------------------------- 1 | POSTGRES_PASSWORD=postgrespassword 2 | -------------------------------------------------------------------------------- /packages/cfs-template-hasura-auth0/template.README.md: -------------------------------------------------------------------------------- 1 | This project was bootstrapped with [Create Full Stack](https://github.com/tiagob/create-full-stack). 2 | 3 | - Get started with the [development guide]({DEVELOPMENT_FILENAME}) 4 | - Follow the [Hasura tutorial](https://create-full-stack.com/docs/tutorial_hasura) to update your full stack 5 | - Review the [Create Full Stack docs](https://create-full-stack.com/docs/) 6 | 7 | - Deploy to AWS with the [production guide]({PRODUCTION_FILENAME}) 8 | 9 | -------------------------------------------------------------------------------- /packages/cfs-template-hasura-no-auth/.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | extends: "eslint-config-create-full-stack", 3 | }; 4 | -------------------------------------------------------------------------------- /packages/cfs-template-hasura-no-auth/.github/workflows/pull_request.yml: -------------------------------------------------------------------------------- 1 | # @remove-file-pulumi-aws 2 | on: 3 | - pull_request 4 | jobs: 5 | preview: 6 | name: Pulumi Preview CI 7 | runs-on: ubuntu-latest 8 | steps: 9 | - uses: actions/checkout@v2 10 | - uses: actions/setup-node@v1 11 | with: 12 | node-version: 12.x 13 | - run: yarn 14 | - run: yarn build 15 | - uses: docker://pulumi/actions 16 | with: 17 | args: preview 18 | env: 19 | AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} 20 | AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} 21 | PULUMI_ACCESS_TOKEN: ${{ secrets.PULUMI_ACCESS_TOKEN }} 22 | PULUMI_CI: pr 23 | PULUMI_ROOT: packages/pulumi-aws 24 | # Yarn is required for workspaces 25 | USE_YARN: true 26 | -------------------------------------------------------------------------------- /packages/cfs-template-hasura-no-auth/.github/workflows/push.yml: -------------------------------------------------------------------------------- 1 | on: 2 | - push 3 | jobs: 4 | test: 5 | name: Node.js CI 6 | runs-on: ubuntu-latest 7 | steps: 8 | - uses: actions/checkout@v2 9 | - uses: actions/setup-node@v1 10 | with: 11 | node-version: 12.x 12 | - run: yarn 13 | - run: yarn build 14 | - run: yarn test 15 | env: 16 | CI: true 17 | -------------------------------------------------------------------------------- /packages/cfs-template-hasura-no-auth/.github/workflows/push_master.yml: -------------------------------------------------------------------------------- 1 | # @remove-file-pulumi-aws 2 | on: 3 | push: 4 | branches: 5 | - master 6 | jobs: 7 | up: 8 | name: Pulumi Update CD 9 | runs-on: ubuntu-latest 10 | steps: 11 | - uses: actions/checkout@v2 12 | - uses: actions/setup-node@v1 13 | with: 14 | node-version: 12.x 15 | - run: yarn 16 | - run: yarn build 17 | - uses: docker://pulumi/actions 18 | with: 19 | args: up --yes 20 | env: 21 | AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} 22 | AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} 23 | PULUMI_ACCESS_TOKEN: ${{ secrets.PULUMI_ACCESS_TOKEN }} 24 | PULUMI_CI: up 25 | PULUMI_ROOT: packages/pulumi-aws 26 | # Yarn is required for workspaces 27 | USE_YARN: true 28 | -------------------------------------------------------------------------------- /packages/cfs-template-hasura-no-auth/.prettierignore: -------------------------------------------------------------------------------- 1 | build/ 2 | .expo/ 3 | 4 | # generated hasura metadata 5 | hasura/metadata 6 | -------------------------------------------------------------------------------- /packages/cfs-template-hasura-no-auth/.pulumi/ci.json: -------------------------------------------------------------------------------- 1 | { 2 | "master": "production" 3 | } 4 | -------------------------------------------------------------------------------- /packages/cfs-template-hasura-no-auth/.vscode/extensions.json: -------------------------------------------------------------------------------- 1 | { 2 | "recommendations": [ 3 | "dbaeumer.vscode-eslint", 4 | "esbenp.prettier-vscode", 5 | "ms-azuretools.vscode-docker", 6 | "streetsidesoftware.code-spell-checker" 7 | ] 8 | } 9 | -------------------------------------------------------------------------------- /packages/cfs-template-hasura-no-auth/.vscode/launch.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "0.2.0", 3 | "configurations": [] 4 | } 5 | -------------------------------------------------------------------------------- /packages/cfs-template-hasura-no-auth/.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "editor.defaultFormatter": "esbenp.prettier-vscode", 3 | "editor.formatOnSave": true, 4 | "editor.codeActionsOnSave": { 5 | "source.fixAll": true 6 | }, 7 | "editor.tabSize": 2 8 | } 9 | -------------------------------------------------------------------------------- /packages/cfs-template-hasura-no-auth/.watchmanconfig: -------------------------------------------------------------------------------- 1 | {} 2 | -------------------------------------------------------------------------------- /packages/cfs-template-hasura-no-auth/README.md: -------------------------------------------------------------------------------- 1 | # cfs-template-hasura-no-auth 2 | 3 | This is the official Hasura without auth template for Create Full Stack. 4 | 5 | For more information, please refer to: 6 | 7 | - [Getting Started](https://create-full-stack.com/docs) – How to create a new full stack. 8 | - [User Guide](https://create-full-stack.com) – How to develop apps bootstrapped with Create Full Stack. 9 | -------------------------------------------------------------------------------- /packages/cfs-template-hasura-no-auth/codegen.yml: -------------------------------------------------------------------------------- 1 | schema: 2 | - "http://localhost:8080/v1/graphql": 3 | headers: 4 | x-hasura-admin-secret: myadminsecretkey 5 | hooks: 6 | afterOneFileWrite: 7 | - prettier --write 8 | - eslint --fix 9 | generates: 10 | packages/common/src/graphql/__generated__/index.ts: 11 | documents: packages/common/src/graphql/*.graphql 12 | plugins: 13 | - typescript 14 | - typescript-operations 15 | - typescript-react-apollo 16 | config: 17 | namingConvention: 18 | typeNames: pascal-case#pascalCase 19 | transformUnderscore: true 20 | # Use undefined instead of null when a field isn't set. 21 | maybeValue: T | undefined 22 | -------------------------------------------------------------------------------- /packages/cfs-template-hasura-no-auth/docker-compose.yaml: -------------------------------------------------------------------------------- 1 | version: "3.8" 2 | services: 3 | postgres: 4 | image: postgres:12 5 | restart: always 6 | ports: 7 | - "5432:5432" 8 | volumes: 9 | - db_data:/var/lib/postgresql/data 10 | env_file: "./postgres/.env.development" 11 | graphql-engine: 12 | build: "./hasura" 13 | ports: 14 | - "8080:8080" 15 | depends_on: 16 | - "postgres" 17 | restart: always 18 | env_file: "./hasura/.env.development" 19 | # Include Hasura migrations and metadata every time `docker-compose up` is 20 | # run. 21 | # https://hasura.io/docs/1.0/graphql/core/migrations/advanced/auto-apply-migrations.html#applying-migrations 22 | volumes: 23 | - "./hasura/migrations:/hasura-migrations" 24 | - "./hasura/metadata:/hasura-metadata" 25 | volumes: 26 | db_data: 27 | -------------------------------------------------------------------------------- /packages/cfs-template-hasura-no-auth/gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | node_modules 5 | .pnp 6 | .pnp.js 7 | 8 | # testing 9 | coverage 10 | 11 | # production 12 | build 13 | 14 | # misc 15 | .DS_Store 16 | .env.local 17 | .env.development.local 18 | .env.test.local 19 | .env.production.local 20 | 21 | npm-debug.log* 22 | yarn-debug.log* 23 | yarn-error.log* 24 | -------------------------------------------------------------------------------- /packages/cfs-template-hasura-no-auth/hasura/.env.development: -------------------------------------------------------------------------------- 1 | HASURA_GRAPHQL_DATABASE_URL=postgres://postgres:postgrespassword@postgres:5432/postgres 2 | # Access the console via "hasura console" CLI to automate migration creation 3 | HASURA_GRAPHQL_ENABLE_CONSOLE=false 4 | HASURA_GRAPHQL_ENABLED_LOG_TYPES=startup, http-log, webhook-log, websocket-log, query-log 5 | HASURA_GRAPHQL_ADMIN_SECRET=myadminsecretkey 6 | HASURA_GRAPHQL_UNAUTHORIZED_ROLE=anonymous 7 | -------------------------------------------------------------------------------- /packages/cfs-template-hasura-no-auth/hasura/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM hasura/graphql-engine:v1.3.2.cli-migrations-v2 2 | 3 | COPY ./migrations /hasura-migrations 4 | COPY ./metadata /hasura-metadata 5 | 6 | CMD graphql-engine serve 7 | -------------------------------------------------------------------------------- /packages/cfs-template-hasura-no-auth/hasura/config.yaml: -------------------------------------------------------------------------------- 1 | version: 2 2 | endpoint: http://localhost:8080 3 | admin_secret: myadminsecretkey 4 | metadata_directory: metadata 5 | actions: 6 | kind: synchronous 7 | handler_webhook_baseurl: http://localhost:3000 8 | -------------------------------------------------------------------------------- /packages/cfs-template-hasura-no-auth/hasura/metadata/actions.graphql: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /packages/cfs-template-hasura-no-auth/hasura/metadata/actions.yaml: -------------------------------------------------------------------------------- 1 | actions: [] 2 | custom_types: 3 | enums: [] 4 | input_objects: [] 5 | objects: [] 6 | scalars: [] 7 | -------------------------------------------------------------------------------- /packages/cfs-template-hasura-no-auth/hasura/metadata/allow_list.yaml: -------------------------------------------------------------------------------- 1 | [] 2 | -------------------------------------------------------------------------------- /packages/cfs-template-hasura-no-auth/hasura/metadata/functions.yaml: -------------------------------------------------------------------------------- 1 | [] 2 | -------------------------------------------------------------------------------- /packages/cfs-template-hasura-no-auth/hasura/metadata/query_collections.yaml: -------------------------------------------------------------------------------- 1 | [] 2 | -------------------------------------------------------------------------------- /packages/cfs-template-hasura-no-auth/hasura/metadata/remote_schemas.yaml: -------------------------------------------------------------------------------- 1 | [] 2 | -------------------------------------------------------------------------------- /packages/cfs-template-hasura-no-auth/hasura/metadata/tables.yaml: -------------------------------------------------------------------------------- 1 | - table: 2 | schema: public 3 | name: todos 4 | insert_permissions: 5 | - role: anonymous 6 | permission: 7 | check: {} 8 | columns: 9 | - complete 10 | - name 11 | backend_only: false 12 | select_permissions: 13 | - role: anonymous 14 | permission: 15 | columns: 16 | - complete 17 | - id 18 | - name 19 | filter: {} 20 | update_permissions: 21 | - role: anonymous 22 | permission: 23 | columns: 24 | - complete 25 | - name 26 | filter: {} 27 | check: null 28 | delete_permissions: 29 | - role: anonymous 30 | permission: 31 | filter: {} 32 | -------------------------------------------------------------------------------- /packages/cfs-template-hasura-no-auth/hasura/metadata/version.yaml: -------------------------------------------------------------------------------- 1 | version: 2 2 | -------------------------------------------------------------------------------- /packages/cfs-template-hasura-no-auth/hasura/migrations/1590186473974_create_table_public_todos/down.sql: -------------------------------------------------------------------------------- 1 | DROP TABLE "public"."todos"; 2 | -------------------------------------------------------------------------------- /packages/cfs-template-hasura-no-auth/hasura/migrations/1590186473974_create_table_public_todos/up.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE "public"."todos"("id" serial NOT NULL, "name" text NOT NULL, "complete" boolean NOT NULL DEFAULT FALSE, PRIMARY KEY ("id") , UNIQUE ("id")); 2 | -------------------------------------------------------------------------------- /packages/cfs-template-hasura-no-auth/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "cfs-template-hasura-no-auth", 3 | "version": "0.1.61", 4 | "description": "The Hasura without auth template for Create Full Stack.", 5 | "bugs": { 6 | "url": "https://github.com/tiagob/create-full-stack/issues" 7 | }, 8 | "repository": { 9 | "type": "git", 10 | "url": "https://github.com/tiagob/create-full-stack.git", 11 | "directory": "packages/cfs-template-hasura-no-auth" 12 | }, 13 | "license": "MIT" 14 | } 15 | -------------------------------------------------------------------------------- /packages/cfs-template-hasura-no-auth/packages/common/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "common", 3 | "version": "0.1.0", 4 | "private": true, 5 | "main": "build/index.js", 6 | "typings": "build/index.d.ts", 7 | "scripts": { 8 | "build": "tsc", 9 | "watch": "tsc --watch" 10 | }, 11 | "dependencies": { 12 | "@apollo/client": "^3.1.5", 13 | "graphql": "^15.3.0", 14 | "react": "~16.13.1", 15 | "react-dom": "~16.13.1", 16 | "subscriptions-transport-ws": "^0.9.18" 17 | }, 18 | "devDependencies": { 19 | "@types/react": "^16.9.49", 20 | "typescript": "^4.0.2" 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /packages/cfs-template-hasura-no-auth/packages/common/src/graphql/todos.graphql: -------------------------------------------------------------------------------- 1 | # If changes are made to this file or other `.graphql` files, you must generate 2 | # the TS types and React hooks for the Apollo clients with `yarn generate`. 3 | 4 | query Todos { 5 | todos { 6 | id 7 | name 8 | complete 9 | } 10 | } 11 | 12 | mutation CreateTodo($name: String!) { 13 | insert_todos(objects: { name: $name }) { 14 | returning { 15 | id 16 | name 17 | complete 18 | } 19 | } 20 | } 21 | 22 | mutation UpdateTodo($id: Int!, $complete: Boolean!) { 23 | update_todos(where: { id: { _eq: $id } }, _set: { complete: $complete }) { 24 | returning { 25 | id 26 | name 27 | complete 28 | } 29 | } 30 | } 31 | 32 | mutation DeleteTodo($id: Int!) { 33 | delete_todos(where: { id: { _eq: $id } }) { 34 | returning { 35 | id 36 | } 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /packages/cfs-template-hasura-no-auth/packages/common/src/graphql/useCreateTodo.ts: -------------------------------------------------------------------------------- 1 | import { 2 | TodosDocument, 3 | TodosQuery, 4 | TodosQueryVariables, 5 | useCreateTodoMutation, 6 | } from "./__generated__"; 7 | 8 | export default () => 9 | useCreateTodoMutation({ 10 | update: (cache, { data }) => { 11 | if (!data || !data.insert_todos) { 12 | return; 13 | } 14 | const createTodo = data.insert_todos.returning; 15 | const query = cache.readQuery({ 16 | query: TodosDocument, 17 | }); 18 | const todos = query?.todos || []; 19 | cache.writeQuery({ 20 | query: TodosDocument, 21 | data: { todos: todos.concat(createTodo) }, 22 | }); 23 | }, 24 | }); 25 | -------------------------------------------------------------------------------- /packages/cfs-template-hasura-no-auth/packages/common/src/graphql/useDeleteTodo.ts: -------------------------------------------------------------------------------- 1 | import { useDeleteTodoMutation } from "./__generated__"; 2 | 3 | export default () => 4 | useDeleteTodoMutation({ 5 | update: (cache, { data }) => { 6 | if (!data || !data.delete_todos) { 7 | return; 8 | } 9 | const deleteTodo = data.delete_todos.returning[0]; 10 | cache.evict({ id: cache.identify(deleteTodo) }); 11 | }, 12 | }); 13 | -------------------------------------------------------------------------------- /packages/cfs-template-hasura-no-auth/packages/common/src/index.ts: -------------------------------------------------------------------------------- 1 | export { default as useCreateTodo } from "./graphql/useCreateTodo"; 2 | export { default as useDeleteTodo } from "./graphql/useDeleteTodo"; 3 | 4 | export * from "./graphql/__generated__"; 5 | -------------------------------------------------------------------------------- /packages/cfs-template-hasura-no-auth/packages/common/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | // File paths are relative to the containing tsconfig.json file location 4 | // https://github.com/Microsoft/TypeScript/issues/24851 5 | "outDir": "build" 6 | }, 7 | "extends": "../../tsconfig" 8 | } 9 | -------------------------------------------------------------------------------- /packages/cfs-template-hasura-no-auth/packages/mobile/.expo-shared/assets.json: -------------------------------------------------------------------------------- 1 | { 2 | "12bb71342c6255bbf50437ec8f4441c083f47cdb74bd89160c15e4f43e52a1cb": true, 3 | "40b842e832070c58deac6aa9e08fa459302ee3f9da492c7e77d93d2fbf4a56fd": true 4 | } 5 | -------------------------------------------------------------------------------- /packages/cfs-template-hasura-no-auth/packages/mobile/README.md: -------------------------------------------------------------------------------- 1 | # Mobile 2 | 3 | An Expo [managed workflow](https://docs.expo.io/introduction/managed-vs-bare/#managed-workflow) for [react-native](https://reactnative.dev/). 4 | 5 | ## Run 6 | 7 | ```bash 8 | yarn start 9 | ``` 10 | 11 | Expo web is unsupported. If you need this, +1 [create-full-stack/issues/148](https://github.com/tiagob/create-full-stack/issues/148). 12 | -------------------------------------------------------------------------------- /packages/cfs-template-hasura-no-auth/packages/mobile/__generated__/AppEntry.js: -------------------------------------------------------------------------------- 1 | // @generated by expo-yarn-workspaces 2 | 3 | import { registerRootComponent } from "expo"; 4 | import { activateKeepAwake } from "expo-keep-awake"; 5 | 6 | import App from "../App"; 7 | 8 | if (__DEV__) { 9 | activateKeepAwake(); 10 | } 11 | 12 | registerRootComponent(App); 13 | -------------------------------------------------------------------------------- /packages/cfs-template-hasura-no-auth/packages/mobile/app.json: -------------------------------------------------------------------------------- 1 | { 2 | "expo": { 3 | "name": "", 4 | "slug": "", 5 | "version": "1.0.0", 6 | "orientation": "portrait", 7 | "icon": "./assets/icon.png", 8 | "splash": { 9 | "image": "./assets/splash.png", 10 | "resizeMode": "contain", 11 | "backgroundColor": "#ffffff" 12 | }, 13 | "updates": { 14 | "fallbackToCacheTimeout": 0 15 | }, 16 | "assetBundlePatterns": ["**/*"], 17 | "ios": { 18 | "supportsTablet": true 19 | }, 20 | "web": { 21 | "favicon": "./assets/favicon.png" 22 | }, 23 | "scheme": "" 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /packages/cfs-template-hasura-no-auth/packages/mobile/assets/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tiagob/create-full-stack/94409eac51290b38c7a3a4dbb3f068430cfb9dd2/packages/cfs-template-hasura-no-auth/packages/mobile/assets/favicon.png -------------------------------------------------------------------------------- /packages/cfs-template-hasura-no-auth/packages/mobile/assets/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tiagob/create-full-stack/94409eac51290b38c7a3a4dbb3f068430cfb9dd2/packages/cfs-template-hasura-no-auth/packages/mobile/assets/icon.png -------------------------------------------------------------------------------- /packages/cfs-template-hasura-no-auth/packages/mobile/assets/splash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tiagob/create-full-stack/94409eac51290b38c7a3a4dbb3f068430cfb9dd2/packages/cfs-template-hasura-no-auth/packages/mobile/assets/splash.png -------------------------------------------------------------------------------- /packages/cfs-template-hasura-no-auth/packages/mobile/babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = function (api) { 2 | api.cache(true); 3 | return { 4 | presets: ["babel-preset-expo"], 5 | plugins: ["babel-plugin-expo-cfs-dotenv"], 6 | }; 7 | }; 8 | -------------------------------------------------------------------------------- /packages/cfs-template-hasura-no-auth/packages/mobile/gitignore: -------------------------------------------------------------------------------- 1 | node_modules/**/* 2 | .expo/* 3 | npm-debug.* 4 | *.jks 5 | *.p8 6 | *.p12 7 | *.key 8 | *.mobileprovision 9 | *.orig.* 10 | web-build/ 11 | 12 | # macOS 13 | .DS_Store 14 | -------------------------------------------------------------------------------- /packages/cfs-template-hasura-no-auth/packages/mobile/metro.config.js: -------------------------------------------------------------------------------- 1 | const { createMetroConfiguration } = require("expo-yarn-workspaces"); 2 | 3 | module.exports = createMetroConfiguration(__dirname); 4 | -------------------------------------------------------------------------------- /packages/cfs-template-hasura-no-auth/packages/mobile/src/components/CreateTodo.tsx: -------------------------------------------------------------------------------- 1 | import { useCreateTodo } from "common"; 2 | import React, { useCallback, useState } from "react"; 3 | import { StyleSheet, View } from "react-native"; 4 | import { Icon, Input } from "react-native-elements"; 5 | 6 | const styles = StyleSheet.create({ 7 | root: { 8 | flexDirection: "row", 9 | marginLeft: 10, 10 | marginRight: 10, 11 | marginTop: 10, 12 | }, 13 | }); 14 | 15 | export default function CreateTodo() { 16 | const [name, setName] = useState(""); 17 | const [createTodo] = useCreateTodo(); 18 | 19 | const onSubmit = useCallback(() => { 20 | createTodo({ variables: { name } }); 21 | setName(""); 22 | }, [name, setName, createTodo]); 23 | 24 | return ( 25 | 26 | setName(text)} 30 | onSubmitEditing={onSubmit} 31 | rightIcon={ 32 | 33 | } 34 | /> 35 | 36 | ); 37 | } 38 | -------------------------------------------------------------------------------- /packages/cfs-template-hasura-no-auth/packages/mobile/src/components/Header.tsx: -------------------------------------------------------------------------------- 1 | import { DrawerNavigationProp } from "@react-navigation/drawer"; 2 | import React from "react"; 3 | import { Platform } from "react-native"; 4 | import { Header as ElementsHeader, Icon } from "react-native-elements"; 5 | 6 | import { RootStackParamList } from "../utils/types"; 7 | 8 | interface Props { 9 | navigation: DrawerNavigationProp; 10 | } 11 | 12 | export default function Header({ navigation }: Props) { 13 | return ( 14 | navigation.openDrawer()} 23 | color="white" 24 | /> 25 | } 26 | /> 27 | ); 28 | } 29 | -------------------------------------------------------------------------------- /packages/cfs-template-hasura-no-auth/packages/mobile/src/containers/About.test.tsx: -------------------------------------------------------------------------------- 1 | import { render } from "@testing-library/react-native"; 2 | import React from "react"; 3 | 4 | import { navigation } from "../utils/testMocks"; 5 | import About from "./About"; 6 | 7 | it("renders github link", () => { 8 | const { getByText } = render(); 9 | const link = getByText(/go to github/i); 10 | expect(link).toBeTruthy(); 11 | }); 12 | -------------------------------------------------------------------------------- /packages/cfs-template-hasura-no-auth/packages/mobile/src/setupTests.ts: -------------------------------------------------------------------------------- 1 | // jest-native adds custom jest matchers for asserting on native elements. 2 | // allows you to do things like: 3 | // expect(element).toHaveProp("title", "ok") 4 | // learn more: https://github.com/testing-library/jest-native 5 | import "@testing-library/jest-native/extend-expect"; 6 | -------------------------------------------------------------------------------- /packages/cfs-template-hasura-no-auth/packages/mobile/src/utils/apolloClient.ts: -------------------------------------------------------------------------------- 1 | import { ApolloClient, InMemoryCache } from "@apollo/client"; 2 | import Constants from "expo-constants"; 3 | 4 | const { manifest } = Constants; 5 | const uri = 6 | manifest.debuggerHost && manifest.packagerOpts?.dev 7 | ? `http://${manifest.debuggerHost.split(`:`)[0]}:8080/v1/graphql` 8 | : process.env.GRAPHQL_URL; 9 | 10 | export default new ApolloClient({ 11 | uri, 12 | cache: new InMemoryCache(), 13 | }); 14 | -------------------------------------------------------------------------------- /packages/cfs-template-hasura-no-auth/packages/mobile/src/utils/testMocks.ts: -------------------------------------------------------------------------------- 1 | export const navigation = { 2 | navigate: jest.fn(), 3 | dispatch: jest.fn(), 4 | reset: jest.fn(), 5 | goBack: jest.fn(), 6 | isFocused: jest.fn(), 7 | canGoBack: jest.fn(), 8 | dangerouslyGetParent: jest.fn(), 9 | dangerouslyGetState: jest.fn(), 10 | setParams: jest.fn(), 11 | setOptions: jest.fn(), 12 | addListener: jest.fn(), 13 | removeListener: jest.fn(), 14 | jumpTo: jest.fn(), 15 | openDrawer: jest.fn(), 16 | closeDrawer: jest.fn(), 17 | toggleDrawer: jest.fn(), 18 | }; 19 | -------------------------------------------------------------------------------- /packages/cfs-template-hasura-no-auth/packages/mobile/src/utils/types.ts: -------------------------------------------------------------------------------- 1 | export type RootStackParamList = { 2 | Todos: undefined; 3 | About: undefined; 4 | }; 5 | -------------------------------------------------------------------------------- /packages/cfs-template-hasura-no-auth/packages/mobile/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig" 3 | } 4 | -------------------------------------------------------------------------------- /packages/cfs-template-hasura-no-auth/packages/pulumi-aws/.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | extends: "eslint-config-create-full-stack", 3 | rules: { 4 | "no-new": "off", 5 | "no-console": "off", 6 | }, 7 | }; 8 | -------------------------------------------------------------------------------- /packages/cfs-template-hasura-no-auth/packages/pulumi-aws/Pulumi.production.yaml: -------------------------------------------------------------------------------- 1 | config: 2 | aws:region: us-east-1 3 | -------------------------------------------------------------------------------- /packages/cfs-template-hasura-no-auth/packages/pulumi-aws/Pulumi.yaml: -------------------------------------------------------------------------------- 1 | name: 2 | runtime: nodejs 3 | -------------------------------------------------------------------------------- /packages/cfs-template-hasura-no-auth/packages/pulumi-aws/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "pulumi-aws", 3 | "version": "0.1.0", 4 | "private": true, 5 | "dependencies": { 6 | "@pulumi/aws": "^3.5.0", 7 | "@pulumi/awsx": "^0.22.0", 8 | "@pulumi/pulumi": "^2.11.2", 9 | "cfs-pulumi-aws": "^0.1.0", 10 | "cfs-pulumi-expo": "^0.1.0" 11 | }, 12 | "devDependencies": { 13 | "@types/node": "^14.10.0" 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /packages/cfs-template-hasura-no-auth/packages/pulumi-aws/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig" 3 | } 4 | -------------------------------------------------------------------------------- /packages/cfs-template-hasura-no-auth/packages/web/.env: -------------------------------------------------------------------------------- 1 | EXTEND_ESLINT=true 2 | -------------------------------------------------------------------------------- /packages/cfs-template-hasura-no-auth/packages/web/.env.development: -------------------------------------------------------------------------------- 1 | REACT_APP_GRAPHQL_URL=http://localhost:8080/v1/graphql 2 | -------------------------------------------------------------------------------- /packages/cfs-template-hasura-no-auth/packages/web/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tiagob/create-full-stack/94409eac51290b38c7a3a4dbb3f068430cfb9dd2/packages/cfs-template-hasura-no-auth/packages/web/public/favicon.ico -------------------------------------------------------------------------------- /packages/cfs-template-hasura-no-auth/packages/web/public/logo192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tiagob/create-full-stack/94409eac51290b38c7a3a4dbb3f068430cfb9dd2/packages/cfs-template-hasura-no-auth/packages/web/public/logo192.png -------------------------------------------------------------------------------- /packages/cfs-template-hasura-no-auth/packages/web/public/logo512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tiagob/create-full-stack/94409eac51290b38c7a3a4dbb3f068430cfb9dd2/packages/cfs-template-hasura-no-auth/packages/web/public/logo512.png -------------------------------------------------------------------------------- /packages/cfs-template-hasura-no-auth/packages/web/public/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "short_name": "React App", 3 | "name": "Create React App Sample", 4 | "icons": [ 5 | { 6 | "src": "favicon.ico", 7 | "sizes": "64x64 32x32 24x24 16x16", 8 | "type": "image/x-icon" 9 | }, 10 | { 11 | "src": "logo192.png", 12 | "type": "image/png", 13 | "sizes": "192x192" 14 | }, 15 | { 16 | "src": "logo512.png", 17 | "type": "image/png", 18 | "sizes": "512x512" 19 | } 20 | ], 21 | "start_url": ".", 22 | "display": "standalone", 23 | "theme_color": "#000000", 24 | "background_color": "#ffffff" 25 | } 26 | -------------------------------------------------------------------------------- /packages/cfs-template-hasura-no-auth/packages/web/public/robots.txt: -------------------------------------------------------------------------------- 1 | # https://www.robotstxt.org/robotstxt.html 2 | User-agent: * 3 | Disallow: 4 | -------------------------------------------------------------------------------- /packages/cfs-template-hasura-no-auth/packages/web/src/App.test.tsx: -------------------------------------------------------------------------------- 1 | import { render } from "@testing-library/react"; 2 | import React from "react"; 3 | 4 | import App from "./App"; 5 | 6 | it("renders header", () => { 7 | const { getByLabelText } = render(); 8 | const header = getByLabelText(/menu/i); 9 | expect(header).toBeInTheDocument(); 10 | }); 11 | -------------------------------------------------------------------------------- /packages/cfs-template-hasura-no-auth/packages/web/src/components/Header.tsx: -------------------------------------------------------------------------------- 1 | import { IconButton, makeStyles, Toolbar } from "@material-ui/core"; 2 | import AppBar from "@material-ui/core/AppBar"; 3 | import { grey } from "@material-ui/core/colors"; 4 | import MenuIcon from "@material-ui/icons/Menu"; 5 | import React from "react"; 6 | 7 | const useStyles = makeStyles({ 8 | toolbar: { 9 | display: "flex", 10 | justifyContent: "space-between", 11 | }, 12 | infoIcon: { 13 | color: grey[100], 14 | }, 15 | }); 16 | 17 | interface Props { 18 | openDrawer: () => void; 19 | } 20 | 21 | export default function Header({ openDrawer }: Props) { 22 | const classes = useStyles(); 23 | return ( 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | ); 32 | } 33 | -------------------------------------------------------------------------------- /packages/cfs-template-hasura-no-auth/packages/web/src/containers/About.test.tsx: -------------------------------------------------------------------------------- 1 | import { render } from "@testing-library/react"; 2 | import React from "react"; 3 | 4 | import About from "./About"; 5 | 6 | it("renders github link", () => { 7 | const { getByText } = render(); 8 | const link = getByText(/go to github/i); 9 | expect(link).toBeInTheDocument(); 10 | }); 11 | -------------------------------------------------------------------------------- /packages/cfs-template-hasura-no-auth/packages/web/src/containers/About.tsx: -------------------------------------------------------------------------------- 1 | import { Button, makeStyles } from "@material-ui/core"; 2 | import React from "react"; 3 | 4 | const useStyles = makeStyles({ 5 | root: { 6 | flex: 1, 7 | display: "flex", 8 | flexDirection: "column", 9 | justifyContent: "center", 10 | alignItems: "center", 11 | }, 12 | }); 13 | 14 | export default function About() { 15 | const classes = useStyles(); 16 | return ( 17 |
18 | 26 |
27 | ); 28 | } 29 | -------------------------------------------------------------------------------- /packages/cfs-template-hasura-no-auth/packages/web/src/containers/Todos.tsx: -------------------------------------------------------------------------------- 1 | import { List, makeStyles, Paper } from "@material-ui/core"; 2 | import { useTodosQuery } from "common"; 3 | import React from "react"; 4 | 5 | import CreateTodo from "../components/CreateTodo"; 6 | import Todo from "../components/Todo"; 7 | 8 | const useStyles = makeStyles(({ spacing }) => ({ 9 | root: { 10 | margin: spacing(3), 11 | padding: spacing(1), 12 | width: "80%", 13 | }, 14 | })); 15 | 16 | export default function Todos() { 17 | const classes = useStyles(); 18 | const { data } = useTodosQuery(); 19 | return ( 20 | 21 | 22 | 23 | {(data?.todos ? data.todos : []).map((todo) => ( 24 | 25 | ))} 26 | 27 | 28 | ); 29 | } 30 | -------------------------------------------------------------------------------- /packages/cfs-template-hasura-no-auth/packages/web/src/index.css: -------------------------------------------------------------------------------- 1 | body { 2 | margin: 0; 3 | font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", 4 | "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", 5 | sans-serif; 6 | -webkit-font-smoothing: antialiased; 7 | -moz-osx-font-smoothing: grayscale; 8 | } 9 | 10 | code { 11 | font-family: source-code-pro, Menlo, Monaco, Consolas, "Courier New", 12 | monospace; 13 | } 14 | -------------------------------------------------------------------------------- /packages/cfs-template-hasura-no-auth/packages/web/src/index.tsx: -------------------------------------------------------------------------------- 1 | import "./index.css"; 2 | 3 | import React from "react"; 4 | import ReactDOM from "react-dom"; 5 | 6 | import App from "./App"; 7 | import reportWebVitals from "./reportWebVitals"; 8 | 9 | ReactDOM.render( 10 | 11 | 12 | , 13 | document.querySelector("#root") 14 | ); 15 | 16 | // If you want to start measuring performance in your app, pass a function 17 | // to log results (for example: reportWebVitals(console.log)) 18 | // or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals 19 | reportWebVitals(); 20 | -------------------------------------------------------------------------------- /packages/cfs-template-hasura-no-auth/packages/web/src/react-app-env.d.ts: -------------------------------------------------------------------------------- 1 | // / 2 | -------------------------------------------------------------------------------- /packages/cfs-template-hasura-no-auth/packages/web/src/reportWebVitals.ts: -------------------------------------------------------------------------------- 1 | import { ReportHandler } from "web-vitals"; 2 | 3 | const reportWebVitals = (onPerfEntry?: ReportHandler) => { 4 | if (onPerfEntry && onPerfEntry instanceof Function) { 5 | // eslint-disable-next-line promise/catch-or-return, promise/always-return 6 | import("web-vitals").then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => { 7 | getCLS(onPerfEntry); 8 | getFID(onPerfEntry); 9 | getFCP(onPerfEntry); 10 | getLCP(onPerfEntry); 11 | getTTFB(onPerfEntry); 12 | }); 13 | } 14 | }; 15 | 16 | export default reportWebVitals; 17 | -------------------------------------------------------------------------------- /packages/cfs-template-hasura-no-auth/packages/web/src/setupTests.ts: -------------------------------------------------------------------------------- 1 | // jest-dom adds custom jest matchers for asserting on DOM nodes. 2 | // allows you to do things like: 3 | // expect(element).toHaveTextContent(/react/i) 4 | // learn more: https://github.com/testing-library/jest-dom 5 | import "@testing-library/jest-dom"; 6 | 7 | // Fix "MutationObserver is not a constructor" 8 | // https://github.com/testing-library/react-testing-library/issues/662 9 | // Can likely remove with react-scripts v4 10 | window.MutationObserver = require("mutation-observer"); 11 | -------------------------------------------------------------------------------- /packages/cfs-template-hasura-no-auth/packages/web/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | // Can't extend CRA tsconfig.json 3 | // https://github.com/facebook/create-react-app/issues/6269 4 | "compilerOptions": { 5 | "allowJs": false, 6 | "allowSyntheticDefaultImports": true, 7 | "esModuleInterop": true, 8 | "forceConsistentCasingInFileNames": true, 9 | "isolatedModules": true, 10 | "jsx": "react", 11 | "lib": ["DOM", "DOM.Iterable", "ESNext"], 12 | "module": "ESNext", 13 | "moduleResolution": "Node", 14 | "noEmit": true, 15 | "noFallthroughCasesInSwitch": true, 16 | "noImplicitAny": true, 17 | "preserveWatchOutput": true, 18 | "resolveJsonModule": true, 19 | "skipLibCheck": true, 20 | "strict": true, 21 | "target": "ES5" 22 | }, 23 | "include": ["src"] 24 | } 25 | -------------------------------------------------------------------------------- /packages/cfs-template-hasura-no-auth/postgres/.env.development: -------------------------------------------------------------------------------- 1 | POSTGRES_PASSWORD=postgrespassword 2 | -------------------------------------------------------------------------------- /packages/cfs-template-hasura-no-auth/template.README.md: -------------------------------------------------------------------------------- 1 | This project was bootstrapped with [Create Full Stack](https://github.com/tiagob/create-full-stack). 2 | 3 | - Get started with the [development guide]({DEVELOPMENT_FILENAME}) 4 | - Follow the [Hasura tutorial](https://create-full-stack.com/docs/tutorial_hasura) to update your full stack 5 | - Review the [Create Full Stack docs](https://create-full-stack.com/docs/) 6 | 7 | - Deploy to AWS with the [production guide]({PRODUCTION_FILENAME}) 8 | 9 | -------------------------------------------------------------------------------- /packages/create-full-stack/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 Tiago 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /packages/create-full-stack/README.md: -------------------------------------------------------------------------------- 1 | # create-full-stack 2 | 3 | This package includes the global command for [Create Full Stack](https://github.com/tiagob/create-full-stack). 4 | 5 | Please refer to its documentation: 6 | 7 | - [Getting Started](https://create-full-stack.com/docs) – How to create a new full stack. 8 | - [User Guide](https://create-full-stack.com) – How to develop apps bootstrapped with Create Full Stack. 9 | -------------------------------------------------------------------------------- /packages/create-full-stack/src/utils.ts: -------------------------------------------------------------------------------- 1 | import spawn from "cross-spawn"; 2 | 3 | export function runYarn(cwd: string, args: string[] = []) { 4 | const command = "yarn"; 5 | const argsWithCwd = ["--cwd", cwd, ...args]; 6 | const proc = spawn.sync(command, argsWithCwd, { stdio: "inherit" }); 7 | if (proc.status !== 0) { 8 | throw new Error(`\`${command} ${argsWithCwd.join(" ")}\` failed`); 9 | } 10 | } 11 | 12 | export function hasDocker() { 13 | const pulumiProc = spawn.sync("docker-compose", ["--version"]); 14 | if (pulumiProc.status !== 0) { 15 | return false; 16 | } 17 | return true; 18 | } 19 | -------------------------------------------------------------------------------- /packages/create-full-stack/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | // File paths are relative to the containing tsconfig.json file location 4 | // https://github.com/Microsoft/TypeScript/issues/24851 5 | "outDir": "build" 6 | }, 7 | "extends": "../../tsconfig" 8 | } 9 | -------------------------------------------------------------------------------- /packages/docusaurus/.gitignore: -------------------------------------------------------------------------------- 1 | # Dependencies 2 | /node_modules 3 | 4 | # Production 5 | /build 6 | 7 | # Generated files 8 | .docusaurus 9 | .cache-loader 10 | 11 | # Misc 12 | .DS_Store 13 | .env.local 14 | .env.development.local 15 | .env.test.local 16 | .env.production.local 17 | 18 | npm-debug.log* 19 | yarn-debug.log* 20 | yarn-error.log* 21 | -------------------------------------------------------------------------------- /packages/docusaurus/README.md: -------------------------------------------------------------------------------- 1 | # Website 2 | 3 | This website is built using [Docusaurus 2](https://v2.docusaurus.io/), a modern static website generator. 4 | 5 | ### Installation 6 | 7 | ``` 8 | $ yarn 9 | ``` 10 | 11 | ### Local Development 12 | 13 | ``` 14 | $ yarn start 15 | ``` 16 | 17 | This command starts a local development server and open up a browser window. Most changes are reflected live without having to restart the server. 18 | 19 | ### Build 20 | 21 | ``` 22 | $ yarn build 23 | ``` 24 | 25 | This command generates static content into the `build` directory and can be served using any static contents hosting service. 26 | 27 | ### Deployment 28 | 29 | ``` 30 | $ GIT_USER= USE_SSH=true yarn deploy 31 | ``` 32 | 33 | If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the `gh-pages` branch. 34 | -------------------------------------------------------------------------------- /packages/docusaurus/babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | presets: [require.resolve("@docusaurus/core/lib/babel/preset")], 3 | }; 4 | -------------------------------------------------------------------------------- /packages/docusaurus/docs/auth.md: -------------------------------------------------------------------------------- 1 | --- 2 | id: auth 3 | title: Auth 4 | image: /img/logo.svg 5 | --- 6 | 7 | Auth choices for Create Full Stack. 8 | 9 | ## Auth0 10 | 11 | This choice configures your backend and selected clients (web and/or mobile) with Auth0. This includes permissions/authorization on the API and a login page for the clients. 12 | 13 | [Auth0](https://auth0.com/) provides authentication and user management as a service. It has one-click integrations with every identity provider (Google, Facebook, Twitter etc.). From the Auth0 console you can manage your login page, emails, custom hooks and users. It easily integrates with either Apollo Server Express or Hasura [backends](/docs/backend). Auth0 provides great documentation and support and is free for up to 7k users. 14 | -------------------------------------------------------------------------------- /packages/docusaurus/docs/cicd.md: -------------------------------------------------------------------------------- 1 | --- 2 | id: cicd 3 | title: CI/CD 4 | image: /img/logo.svg 5 | --- 6 | 7 | If included, Create Full Stack includes configuration for continuous integration (CI) and continuous deployment (CD) through [GitHub Actions](https://docs.github.com/en/actions) at `.github/workflows/`. 8 | 9 | For CI, Create Full Stack runs tests on all platforms (server, web, mobile) on any push to GitHub. 10 | 11 | For CD, Create Full Stack deploys changes automatically using Pulumi on any push to master. 12 | 13 | In addition, Create Full Stack previews changes to AWS infra for any new pull request. 14 | 15 | :::info 16 | Requires AWS is selected as [cloud](/docs/cloud). 17 | ::: 18 | -------------------------------------------------------------------------------- /packages/docusaurus/docs/cloud.md: -------------------------------------------------------------------------------- 1 | --- 2 | id: cloud 3 | title: Cloud 4 | image: /img/logo.svg 5 | --- 6 | 7 | Cloud choices for Create Full Stack. 8 | 9 | ## AWS 10 | 11 | This choice includes Pulumi with AWS at `packages/pulumi-aws/`. 12 | 13 | [Pulumi](https://www.pulumi.com/) is an infrastructure as code (IAC) platform for defining your cloud resources in TypeScript. It's free for single users. 14 | 15 | AWS accounts for over 30% of the market. It's by far the market leader with a 5+ year head start over Azure and GCP. Its services are the most battle tested and the community is massive. 16 | 17 | Create Full Stack includes a custom Pulumi AWS library (`cfs-pulumi-aws`) so you don't have to worry about the AWS internals. It has components for AWS RDS (Postgres), Fargate (backend) and Cloud Front (web). 18 | 19 | ### Monthly cost of AWS 20 | 21 | - EC2-ELB: ~\$16 22 | - Relational Database Service (RDS): ~\$13 23 | - EC2-Instances: ~\$8 24 | - EC2 Container Service: ~\$8 25 | - Other: ~\$2 26 | 27 | Total: ~\$47 28 | 29 | This assumes all the services are up for the whole month. If you spin it up then immediately tear it down, you're charged a very small fraction of this. 30 | -------------------------------------------------------------------------------- /packages/docusaurus/docs/mobile.md: -------------------------------------------------------------------------------- 1 | --- 2 | id: mobile 3 | title: Mobile 4 | image: /img/logo.svg 5 | --- 6 | 7 | If included, Create Full Stack scaffolds a TypeScript React Native app with [Expo](https://docs.expo.io/) [![GitHub stars](https://img.shields.io/github/stars/expo/expo.svg?style=social&label=Star&maxAge=2592000)](https://GitHub.com/expo/expo/stargazers/) 8 | 9 | Expo is a set of tools and services built around React Native and native platforms that help you develop, build, deploy, and quickly iterate on iOS and Android from the same codebase. It removes the dependency on XCode and Android Studio. It enables code pushes without going through the app store for updates. 10 | 11 | ## Stack 12 | 13 | - [Apollo Client](https://github.com/apollographql/apollo-client) (GraphQL client) 14 | - [Expo](https://github.com/expo/expo) 15 | - [Jest](https://github.com/facebook/jest) (testing) 16 | - [React Native](https://github.com/facebook/react-native) 17 | - [React Native Elements](https://github.com/react-native-elements/react-native-elements) (component library) 18 | - [React Navigation](https://github.com/react-navigation/react-navigation) (routing) 19 | -------------------------------------------------------------------------------- /packages/docusaurus/sidebars.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | someSidebar: { 3 | "Why?": [ 4 | "why", 5 | "backend", 6 | "auth", 7 | "cloud", 8 | "web", 9 | "mobile", 10 | "cicd", 11 | "libraries_and_frameworks", 12 | ], 13 | Development: [ 14 | "getting_started", 15 | "folder_structure", 16 | "available_scripts", 17 | "configuration", 18 | "migrations", 19 | "troubleshooting", 20 | ], 21 | Tutorials: ["tutorial_apollo_server_express", "tutorial_hasura"], 22 | }, 23 | }; 24 | -------------------------------------------------------------------------------- /packages/docusaurus/src/css/custom.css: -------------------------------------------------------------------------------- 1 | /* stylelint-disable docusaurus/copyright-header */ 2 | /** 3 | * Any CSS included here will be global. The classic template 4 | * bundles Infima by default. Infima is a CSS framework designed to 5 | * work well for content-centric websites. 6 | */ 7 | 8 | /* You can override the default Infima variables here. */ 9 | :root { 10 | --ifm-color-primary: #6200ea; 11 | --ifm-code-font-size: 95%; 12 | } 13 | 14 | .docusaurus-highlight-code-line { 15 | background-color: rgb(72, 77, 91); 16 | display: block; 17 | margin: 0 calc(-1 * var(--ifm-pre-padding)); 18 | padding: 0 var(--ifm-pre-padding); 19 | } 20 | 21 | :root code { 22 | color: var(--ifm-code-color); 23 | background-color: var(--ifm-code-background); 24 | } 25 | -------------------------------------------------------------------------------- /packages/docusaurus/static/.nojekyll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tiagob/create-full-stack/94409eac51290b38c7a3a4dbb3f068430cfb9dd2/packages/docusaurus/static/.nojekyll -------------------------------------------------------------------------------- /packages/docusaurus/static/CNAME: -------------------------------------------------------------------------------- 1 | create-full-stack.com -------------------------------------------------------------------------------- /packages/docusaurus/static/img/add_date_mobile.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tiagob/create-full-stack/94409eac51290b38c7a3a4dbb3f068430cfb9dd2/packages/docusaurus/static/img/add_date_mobile.png -------------------------------------------------------------------------------- /packages/docusaurus/static/img/add_date_web.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tiagob/create-full-stack/94409eac51290b38c7a3a4dbb3f068430cfb9dd2/packages/docusaurus/static/img/add_date_web.png -------------------------------------------------------------------------------- /packages/docusaurus/static/img/arrow_drop_down-24px.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/docusaurus/static/img/auth0.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/docusaurus/static/img/block-24px.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/docusaurus/static/img/expo.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/docusaurus/static/img/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tiagob/create-full-stack/94409eac51290b38c7a3a4dbb3f068430cfb9dd2/packages/docusaurus/static/img/favicon.ico -------------------------------------------------------------------------------- /packages/docusaurus/static/img/hasura_add_date.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tiagob/create-full-stack/94409eac51290b38c7a3a4dbb3f068430cfb9dd2/packages/docusaurus/static/img/hasura_add_date.png -------------------------------------------------------------------------------- /packages/docusaurus/static/img/hasura_permissions_insert_date.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tiagob/create-full-stack/94409eac51290b38c7a3a4dbb3f068430cfb9dd2/packages/docusaurus/static/img/hasura_permissions_insert_date.png -------------------------------------------------------------------------------- /packages/docusaurus/static/img/hasura_permissions_select_date.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tiagob/create-full-stack/94409eac51290b38c7a3a4dbb3f068430cfb9dd2/packages/docusaurus/static/img/hasura_permissions_select_date.png -------------------------------------------------------------------------------- /packages/docusaurus/static/img/mobile1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tiagob/create-full-stack/94409eac51290b38c7a3a4dbb3f068430cfb9dd2/packages/docusaurus/static/img/mobile1.png -------------------------------------------------------------------------------- /packages/docusaurus/static/img/mobile2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tiagob/create-full-stack/94409eac51290b38c7a3a4dbb3f068430cfb9dd2/packages/docusaurus/static/img/mobile2.png -------------------------------------------------------------------------------- /packages/docusaurus/static/img/readme/README.md: -------------------------------------------------------------------------------- 1 | Images in this folder are used in generated READMEs 2 | -------------------------------------------------------------------------------- /packages/docusaurus/static/img/readme/auth0_api_identifier.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tiagob/create-full-stack/94409eac51290b38c7a3a4dbb3f068430cfb9dd2/packages/docusaurus/static/img/readme/auth0_api_identifier.png -------------------------------------------------------------------------------- /packages/docusaurus/static/img/readme/auth0_api_offline_access.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tiagob/create-full-stack/94409eac51290b38c7a3a4dbb3f068430cfb9dd2/packages/docusaurus/static/img/readme/auth0_api_offline_access.png -------------------------------------------------------------------------------- /packages/docusaurus/static/img/readme/auth0_api_settings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tiagob/create-full-stack/94409eac51290b38c7a3a4dbb3f068430cfb9dd2/packages/docusaurus/static/img/readme/auth0_api_settings.png -------------------------------------------------------------------------------- /packages/docusaurus/static/img/readme/auth0_create_api.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tiagob/create-full-stack/94409eac51290b38c7a3a4dbb3f068430cfb9dd2/packages/docusaurus/static/img/readme/auth0_create_api.png -------------------------------------------------------------------------------- /packages/docusaurus/static/img/readme/auth0_create_application.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tiagob/create-full-stack/94409eac51290b38c7a3a4dbb3f068430cfb9dd2/packages/docusaurus/static/img/readme/auth0_create_application.png -------------------------------------------------------------------------------- /packages/docusaurus/static/img/readme/auth0_create_rule.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tiagob/create-full-stack/94409eac51290b38c7a3a4dbb3f068430cfb9dd2/packages/docusaurus/static/img/readme/auth0_create_rule.png -------------------------------------------------------------------------------- /packages/docusaurus/static/img/readme/auth0_m2m.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tiagob/create-full-stack/94409eac51290b38c7a3a4dbb3f068430cfb9dd2/packages/docusaurus/static/img/readme/auth0_m2m.png -------------------------------------------------------------------------------- /packages/docusaurus/static/img/readme/auth0_m2m_scopes.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tiagob/create-full-stack/94409eac51290b38c7a3a4dbb3f068430cfb9dd2/packages/docusaurus/static/img/readme/auth0_m2m_scopes.png -------------------------------------------------------------------------------- /packages/docusaurus/static/img/readme/auth0_m2m_settings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tiagob/create-full-stack/94409eac51290b38c7a3a4dbb3f068430cfb9dd2/packages/docusaurus/static/img/readme/auth0_m2m_settings.png -------------------------------------------------------------------------------- /packages/docusaurus/static/img/readme/auth0_native.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tiagob/create-full-stack/94409eac51290b38c7a3a4dbb3f068430cfb9dd2/packages/docusaurus/static/img/readme/auth0_native.png -------------------------------------------------------------------------------- /packages/docusaurus/static/img/readme/auth0_native_refresh_token.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tiagob/create-full-stack/94409eac51290b38c7a3a4dbb3f068430cfb9dd2/packages/docusaurus/static/img/readme/auth0_native_refresh_token.png -------------------------------------------------------------------------------- /packages/docusaurus/static/img/readme/auth0_native_settings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tiagob/create-full-stack/94409eac51290b38c7a3a4dbb3f068430cfb9dd2/packages/docusaurus/static/img/readme/auth0_native_settings.png -------------------------------------------------------------------------------- /packages/docusaurus/static/img/readme/auth0_native_urls.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tiagob/create-full-stack/94409eac51290b38c7a3a4dbb3f068430cfb9dd2/packages/docusaurus/static/img/readme/auth0_native_urls.png -------------------------------------------------------------------------------- /packages/docusaurus/static/img/readme/auth0_rule.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tiagob/create-full-stack/94409eac51290b38c7a3a4dbb3f068430cfb9dd2/packages/docusaurus/static/img/readme/auth0_rule.png -------------------------------------------------------------------------------- /packages/docusaurus/static/img/readme/auth0_rule_select.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tiagob/create-full-stack/94409eac51290b38c7a3a4dbb3f068430cfb9dd2/packages/docusaurus/static/img/readme/auth0_rule_select.png -------------------------------------------------------------------------------- /packages/docusaurus/static/img/readme/auth0_signup.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tiagob/create-full-stack/94409eac51290b38c7a3a4dbb3f068430cfb9dd2/packages/docusaurus/static/img/readme/auth0_signup.png -------------------------------------------------------------------------------- /packages/docusaurus/static/img/readme/auth0_spa.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tiagob/create-full-stack/94409eac51290b38c7a3a4dbb3f068430cfb9dd2/packages/docusaurus/static/img/readme/auth0_spa.png -------------------------------------------------------------------------------- /packages/docusaurus/static/img/readme/auth0_spa_settings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tiagob/create-full-stack/94409eac51290b38c7a3a4dbb3f068430cfb9dd2/packages/docusaurus/static/img/readme/auth0_spa_settings.png -------------------------------------------------------------------------------- /packages/docusaurus/static/img/readme/auth0_spa_urls.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tiagob/create-full-stack/94409eac51290b38c7a3a4dbb3f068430cfb9dd2/packages/docusaurus/static/img/readme/auth0_spa_urls.png -------------------------------------------------------------------------------- /packages/docusaurus/static/img/readme/auth0_tenant.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tiagob/create-full-stack/94409eac51290b38c7a3a4dbb3f068430cfb9dd2/packages/docusaurus/static/img/readme/auth0_tenant.png -------------------------------------------------------------------------------- /packages/docusaurus/static/img/readme/auth0_universal_login.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tiagob/create-full-stack/94409eac51290b38c7a3a4dbb3f068430cfb9dd2/packages/docusaurus/static/img/readme/auth0_universal_login.png -------------------------------------------------------------------------------- /packages/docusaurus/static/img/readme/aws_access_key.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tiagob/create-full-stack/94409eac51290b38c7a3a4dbb3f068430cfb9dd2/packages/docusaurus/static/img/readme/aws_access_key.png -------------------------------------------------------------------------------- /packages/docusaurus/static/img/readme/github_secrets.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tiagob/create-full-stack/94409eac51290b38c7a3a4dbb3f068430cfb9dd2/packages/docusaurus/static/img/readme/github_secrets.png -------------------------------------------------------------------------------- /packages/docusaurus/static/img/readme/pulumi_access_token.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tiagob/create-full-stack/94409eac51290b38c7a3a4dbb3f068430cfb9dd2/packages/docusaurus/static/img/readme/pulumi_access_token.png -------------------------------------------------------------------------------- /packages/docusaurus/static/img/typescript_comparison.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tiagob/create-full-stack/94409eac51290b38c7a3a4dbb3f068430cfb9dd2/packages/docusaurus/static/img/typescript_comparison.png -------------------------------------------------------------------------------- /packages/docusaurus/static/img/web1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tiagob/create-full-stack/94409eac51290b38c7a3a4dbb3f068430cfb9dd2/packages/docusaurus/static/img/web1.png -------------------------------------------------------------------------------- /packages/docusaurus/static/img/web2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tiagob/create-full-stack/94409eac51290b38c7a3a4dbb3f068430cfb9dd2/packages/docusaurus/static/img/web2.png -------------------------------------------------------------------------------- /packages/docusaurus/static/pdf/typestudy.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tiagob/create-full-stack/94409eac51290b38c7a3a4dbb3f068430cfb9dd2/packages/docusaurus/static/pdf/typestudy.pdf -------------------------------------------------------------------------------- /packages/docusaurus/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@tsconfig/docusaurus/tsconfig.json", 3 | "include": ["src/"] 4 | } 5 | -------------------------------------------------------------------------------- /packages/eslint-config-create-full-stack/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 Tiago 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /packages/eslint-config-create-full-stack/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "include": ["./index.js"] 3 | } 4 | --------------------------------------------------------------------------------