├── client ├── public │ ├── robots.txt │ ├── favicon.ico │ ├── logo192.png │ ├── logo512.png │ ├── favicon_new.ico │ ├── manifest.json │ └── index.html ├── src │ ├── routes │ │ ├── history.js │ │ └── index.js │ ├── pages │ │ ├── Login │ │ │ └── index.js │ │ ├── NotFound │ │ │ └── index.js │ │ ├── Index │ │ │ └── index.js │ │ ├── Reply │ │ │ └── index.js │ │ ├── Profile │ │ │ └── index.js │ │ ├── Settings │ │ │ ├── Profile │ │ │ │ └── index.js │ │ │ └── Account │ │ │ │ └── index.js │ │ ├── Post │ │ │ └── index.js │ │ ├── Home │ │ │ └── index.js │ │ └── Search │ │ │ └── index.js │ ├── components │ │ ├── Container │ │ │ └── index.js │ │ ├── AccentButton │ │ │ ├── index.js │ │ │ └── styles.js │ │ ├── LoadMoreButton │ │ │ └── index.js │ │ ├── NotAvailableMessage │ │ │ ├── styles.js │ │ │ └── index.js │ │ ├── HoverBox │ │ │ └── index.js │ │ ├── RequiredLabel │ │ │ └── index.js │ │ ├── CharacterCountLabel │ │ │ └── index.js │ │ ├── RichTabTitle │ │ │ └── index.js │ │ ├── Loader │ │ │ ├── index.js │ │ │ └── styles.js │ │ ├── ContentList │ │ │ └── index.js │ │ ├── ProfileList │ │ │ └── index.js │ │ ├── PinnedItemList │ │ │ └── index.js │ │ ├── Footer │ │ │ └── index.js │ │ ├── ModeratorRoleButton │ │ │ └── index.js │ │ ├── AccountBlockButton │ │ │ └── index.js │ │ ├── PrivateRoute │ │ │ └── index.js │ │ ├── Modal │ │ │ └── index.js │ │ ├── ContentBlockButton │ │ │ └── index.js │ │ ├── PinnedItemListItem │ │ │ └── index.js │ │ ├── DeleteAccountModal │ │ │ └── index.js │ │ ├── SearchForm │ │ │ └── index.js │ │ ├── NavBar │ │ │ └── index.js │ │ ├── NewReplyModal │ │ │ └── index.js │ │ ├── CreateProfileForm │ │ │ └── index.js │ │ ├── DeleteContentModal │ │ │ └── index.js │ │ ├── ProfileListItem │ │ │ └── index.js │ │ ├── SingleContent │ │ │ └── index.js │ │ ├── ProfileHeader │ │ │ └── index.js │ │ ├── ContentListItem │ │ │ └── index.js │ │ ├── ProfileTabs │ │ │ └── index.js │ │ ├── CreateContentForm │ │ │ └── index.js │ │ └── EditProfileForm │ │ │ └── index.js │ ├── styles │ │ ├── theme.js │ │ └── global.js │ ├── graphql │ │ ├── typePolicies.js │ │ ├── fragments.js │ │ ├── apollo.js │ │ ├── mutations.js │ │ └── queries.js │ ├── index.js │ ├── lib │ │ ├── displayDatetime.js │ │ └── updateQueries.js │ ├── layouts │ │ └── MainLayout │ │ │ └── index.js │ └── context │ │ └── AuthContext.js ├── .env.example ├── nginx │ └── default.conf ├── Dockerfile └── package.json ├── .env.example ├── server ├── .env.production.local.example ├── src │ ├── lib │ │ ├── getPermissions.js │ │ ├── customScalars.js │ │ ├── getToken.js │ │ ├── getProjectionFields.js │ │ ├── Queue.js │ │ └── handleUploads.js │ ├── config │ │ ├── cloudinary.js │ │ ├── auth0.js │ │ ├── redis.js │ │ ├── mongoose.js │ │ ├── app.js │ │ └── apollo.js │ ├── services │ │ ├── accounts │ │ │ ├── queues.js │ │ │ ├── index.js │ │ │ ├── permissions.js │ │ │ ├── resolvers.js │ │ │ ├── typeDefs.js │ │ │ └── datasources │ │ │ │ └── AccountsDataSource.js │ │ ├── content │ │ │ ├── queues.js │ │ │ ├── index.js │ │ │ ├── permissions.js │ │ │ ├── resolvers.js │ │ │ └── typeDefs.js │ │ └── profiles │ │ │ ├── queues.js │ │ │ ├── index.js │ │ │ ├── permissions.js │ │ │ ├── resolvers.js │ │ │ └── typeDefs.js │ ├── index.js │ ├── scripts │ │ ├── authenticateUser.js │ │ ├── testQueue.js │ │ └── auth0-deploy │ │ │ ├── export.js │ │ │ ├── import.js │ │ │ ├── rules │ │ │ └── Add authorization details to token.js │ │ │ └── tenant.yaml │ └── models │ │ ├── Post.js │ │ ├── Reply.js │ │ └── Profile.js ├── process.yml ├── .env.example ├── .env.nodocker.example ├── Dockerfile └── package.json ├── .dockerignore ├── docker-compose.dev.yml ├── .gitignore ├── docker-compose.prod.yml ├── docker-compose.yml ├── nginx └── default.template ├── scripts └── init-letsencrypt.sh └── README.md /client/public/robots.txt: -------------------------------------------------------------------------------- 1 | # https://www.robotstxt.org/robotstxt.html 2 | User-agent: * 3 | -------------------------------------------------------------------------------- /.env.example: -------------------------------------------------------------------------------- 1 | DOMAIN= 2 | 3 | MONGO_INITDB_ROOT_USERNAME=chirpsdev 4 | MONGO_INITDB_ROOT_PASSWORD= 5 | 6 | REDIS_PASSWORD= -------------------------------------------------------------------------------- /client/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/8bitpress/advanced-graphql-source-code/HEAD/client/public/favicon.ico -------------------------------------------------------------------------------- /client/public/logo192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/8bitpress/advanced-graphql-source-code/HEAD/client/public/logo192.png -------------------------------------------------------------------------------- /client/public/logo512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/8bitpress/advanced-graphql-source-code/HEAD/client/public/logo512.png -------------------------------------------------------------------------------- /client/src/routes/history.js: -------------------------------------------------------------------------------- 1 | import { createBrowserHistory } from "history"; 2 | 3 | export default createBrowserHistory(); 4 | -------------------------------------------------------------------------------- /client/public/favicon_new.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/8bitpress/advanced-graphql-source-code/HEAD/client/public/favicon_new.ico -------------------------------------------------------------------------------- /client/src/pages/Login/index.js: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | 3 | import Loader from "../../components/Loader"; 4 | 5 | const Login = () => ; 6 | 7 | export default Login; 8 | -------------------------------------------------------------------------------- /server/.env.production.local.example: -------------------------------------------------------------------------------- 1 | AUTH0_DOMAIN= 2 | 3 | AUTH0_CLIENT_ID_DEPLOY= 4 | AUTH0_CLIENT_SECRET_DEPLOY= 5 | 6 | GITHUB_CLIENT_ID_AUTH0= 7 | GITHUB_CLIENT_SECRET_AUTH0= 8 | 9 | NODE_ENV=production -------------------------------------------------------------------------------- /server/src/lib/getPermissions.js: -------------------------------------------------------------------------------- 1 | export default function(user) { 2 | if (user && user["https://devchirps.com/user_authorization"]) { 3 | return user["https://devchirps.com/user_authorization"].permissions; 4 | } 5 | return []; 6 | } 7 | -------------------------------------------------------------------------------- /client/.env.example: -------------------------------------------------------------------------------- 1 | REACT_APP_AUTH0_CLIENT_ID= 2 | REACT_APP_AUTH0_CALLBACK_URL=http://localhost:3000/login 3 | REACT_APP_AUTH0_DOMAIN= 4 | REACT_APP_AUTH0_LOGOUT_URL=http://localhost:3000 5 | 6 | REACT_APP_GRAPHQL_ENDPOINT=http://localhost:4000/graphql -------------------------------------------------------------------------------- /client/src/components/Container/index.js: -------------------------------------------------------------------------------- 1 | import styled from "styled-components"; 2 | 3 | const Container = styled.div` 4 | margin: 0 auto; 5 | max-width: 840px; 6 | padding: 0 1rem; 7 | width: 100%; 8 | `; 9 | 10 | export default Container; 11 | -------------------------------------------------------------------------------- /client/src/components/AccentButton/index.js: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | 3 | import StyledAccentButton from "./styles"; 4 | 5 | const AccentButton = props => ( 6 | 7 | ); 8 | 9 | export default AccentButton; 10 | -------------------------------------------------------------------------------- /client/src/components/LoadMoreButton/index.js: -------------------------------------------------------------------------------- 1 | import { Button } from "grommet"; 2 | import React from "react"; 3 | 4 | const LoadMoreButton = props => ( 5 |