Skip to content

Commit

Permalink
finished
Browse files Browse the repository at this point in the history
  • Loading branch information
wesbos committed Feb 2, 2021
1 parent 46aece1 commit aa8b553
Show file tree
Hide file tree
Showing 286 changed files with 127,110 additions and 0 deletions.
11 changes: 11 additions & 0 deletions finished-application/backend/.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
CLOUDINARY_CLOUD_NAME="wesbostutorial"
CLOUDINARY_KEY=533361239534275
CLOUDINARY_SECRET="kbaSqvDE-3i9MZ61aOaBGOXvF6U"
COOKIE_SECRET="litterallly amnytohmgasdfasdfasd"
DATABASE_URL=mongodb+srv://sick:[email protected]/sickfits?retryWrites=true&w=majority
STRIPE_SECRET="sk_test_n3YElivem4bTsQsgL4T1MJzl"
MAIL_HOST="smtp.ethereal.email"
MAIL_PORT=587
MAIL_USER="[email protected]"
MAIL_PASS="YG58hGxP3dfv4KFnCR"
FRONTEND_URL="http://localhost:7777"
2 changes: 2 additions & 0 deletions finished-application/backend/.keystone/admin/next-env.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/// <reference types="next" />
/// <reference types="next/types/global" />
3 changes: 3 additions & 0 deletions finished-application/backend/.keystone/admin/next.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
// this file is copied somewhere else so this lint rule is incorrect
// eslint-disable-next-line import/no-extraneous-dependencies
module.exports = require('@keystone-next/admin-ui/next-config').config;
215 changes: 215 additions & 0 deletions finished-application/backend/.keystone/admin/pages/_app.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,215 @@
import React from 'react';

import { KeystoneProvider } from '@keystone-next/admin-ui/context';
import { ErrorBoundary } from '@keystone-next/admin-ui/components';
import { Core } from '@keystone-ui/core';

import * as view560cabf3 from '../../../node_modules/@keystone-next/fields/types/mongoId/views';
import * as view16694b61 from '../../../node_modules/@keystone-next/fields/types/text/views';
import * as view55d64535 from '../../../node_modules/@keystone-next/fields/types/password/views';
import * as viewc7929eae from '../../../node_modules/@keystone-next/fields/types/relationship/views';
import * as view7113ccba from '../../../node_modules/@keystone-next/fields/types/timestamp/views';
import * as view3d5d0700 from '../../../node_modules/@keystone-next/fields/types/select/views';
import * as view6f3ff6de from '../../../node_modules/@keystone-next/fields/types/integer/views';
import * as view428baecd from '../../../node_modules/@keystone-next/cloudinary/views';
import * as viewe125cccc from '../../../node_modules/@keystone-next/fields/types/virtual/views';
import * as view04b457d0 from '../../../node_modules/@keystone-next/fields/types/checkbox/views';

const adminConfig = {};

const fieldViews = {
view560cabf3,
view16694b61,
view55d64535,
viewc7929eae,
view7113ccba,
view3d5d0700,
view6f3ff6de,
view428baecd,
viewe125cccc,
view04b457d0,
};

const lazyMetadataQuery = {
kind: 'Document',
definitions: [
{
kind: 'OperationDefinition',
operation: 'query',
selectionSet: {
kind: 'SelectionSet',
selections: [
{
kind: 'Field',
name: {
kind: 'Name',
value: 'keystone',
loc: { start: 22, end: 30 },
},
arguments: [],
directives: [],
selectionSet: {
kind: 'SelectionSet',
selections: [
{
kind: 'Field',
name: {
kind: 'Name',
value: 'adminMeta',
loc: { start: 39, end: 48 },
},
arguments: [],
directives: [],
selectionSet: {
kind: 'SelectionSet',
selections: [
{
kind: 'Field',
name: {
kind: 'Name',
value: 'lists',
loc: { start: 59, end: 64 },
},
arguments: [],
directives: [],
selectionSet: {
kind: 'SelectionSet',
selections: [
{
kind: 'Field',
name: {
kind: 'Name',
value: 'key',
loc: { start: 77, end: 80 },
},
arguments: [],
directives: [],
loc: { start: 77, end: 80 },
},
{
kind: 'Field',
name: {
kind: 'Name',
value: 'isHidden',
loc: { start: 91, end: 99 },
},
arguments: [],
directives: [],
loc: { start: 91, end: 99 },
},
{
kind: 'Field',
name: {
kind: 'Name',
value: 'fields',
loc: { start: 110, end: 116 },
},
arguments: [],
directives: [],
selectionSet: {
kind: 'SelectionSet',
selections: [
{
kind: 'Field',
name: {
kind: 'Name',
value: 'path',
loc: { start: 131, end: 135 },
},
arguments: [],
directives: [],
loc: { start: 131, end: 135 },
},
{
kind: 'Field',
name: {
kind: 'Name',
value: 'createView',
loc: { start: 148, end: 158 },
},
arguments: [],
directives: [],
selectionSet: {
kind: 'SelectionSet',
selections: [
{
kind: 'Field',
name: {
kind: 'Name',
value: 'fieldMode',
loc: { start: 175, end: 184 },
},
arguments: [],
directives: [],
loc: { start: 175, end: 184 },
},
],
loc: { start: 159, end: 198 },
},
loc: { start: 148, end: 198 },
},
],
loc: { start: 117, end: 210 },
},
loc: { start: 110, end: 210 },
},
],
loc: { start: 65, end: 220 },
},
loc: { start: 59, end: 220 },
},
],
loc: { start: 49, end: 228 },
},
loc: { start: 39, end: 228 },
},
],
loc: { start: 31, end: 234 },
},
loc: { start: 22, end: 234 },
},
{
kind: 'Field',
name: { kind: 'Name', value: 'authenticatedItem' },
selectionSet: {
kind: 'SelectionSet',
selections: [
{
kind: 'InlineFragment',
typeCondition: {
kind: 'NamedType',
name: { kind: 'Name', value: 'User' },
},
selectionSet: {
kind: 'SelectionSet',
selections: [
{ kind: 'Field', name: { kind: 'Name', value: 'id' } },
{ kind: 'Field', name: { kind: 'Name', value: 'name' } },
],
},
},
],
},
},
],
},
},
],
};

export default function App({ Component, pageProps }) {
return (
<Core>
<KeystoneProvider
adminConfig={adminConfig}
adminMetaHash="13qpsj8"
fieldViews={fieldViews}
lazyMetadataQuery={lazyMetadataQuery}
>
<ErrorBoundary>
<Component {...pageProps} />
</ErrorBoundary>
</KeystoneProvider>
</Core>
);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
export { default as config } from '../../../../keystone';

export default function (req, res) {
return res.status(500);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import React from 'react';

import { ItemPage } from '@keystone-next/admin-ui/pages/ItemPage';

export default function Item() {
return <ItemPage listKey="CartItem" />;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import React from 'react';

import { ListPage } from '@keystone-next/admin-ui/pages/ListPage';

export default function List() {
return <ListPage listKey="CartItem" />;
}
49 changes: 49 additions & 0 deletions finished-application/backend/.keystone/admin/pages/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
import React from 'react';

import { HomePage } from '@keystone-next/admin-ui/pages/HomePage';
import { gql } from '@keystone-next/admin-ui/apollo';

export default function Home() {
return (
<HomePage
query={gql`
query {
keystone {
adminMeta {
lists {
key
fields {
path
createView {
fieldMode
}
}
}
}
}
User: _allUsersMeta {
count
}
Product: _allProductsMeta {
count
}
ProductImage: _allProductImagesMeta {
count
}
CartItem: _allCartItemsMeta {
count
}
OrderItem: _allOrderItemsMeta {
count
}
Order: _allOrdersMeta {
count
}
Role: _allRolesMeta {
count
}
}
`}
/>
);
}
15 changes: 15 additions & 0 deletions finished-application/backend/.keystone/admin/pages/init.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import { InitPage } from '@keystone-next/auth/pages/InitPage';
import React from 'react';
import { gql } from '@keystone-next/admin-ui/apollo';

const fieldPaths = ['name', 'email', 'password'];

export default function Init() {
return (
<InitPage
listKey="User"
fieldPaths={fieldPaths}
showKeystoneSignup={true}
/>
);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import React from 'react';

import { NoAccessPage } from '@keystone-next/admin-ui/pages/NoAccessPage';

export default function Home() {
return <NoAccessPage sessionsEnabled={true} />;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import React from 'react';

import { ItemPage } from '@keystone-next/admin-ui/pages/ItemPage';

export default function Item() {
return <ItemPage listKey="OrderItem" />;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import React from 'react';

import { ListPage } from '@keystone-next/admin-ui/pages/ListPage';

export default function List() {
return <ListPage listKey="OrderItem" />;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import React from 'react';

import { ItemPage } from '@keystone-next/admin-ui/pages/ItemPage';

export default function Item() {
return <ItemPage listKey="Order" />;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import React from 'react';

import { ListPage } from '@keystone-next/admin-ui/pages/ListPage';

export default function List() {
return <ListPage listKey="Order" />;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import React from 'react';

import { ItemPage } from '@keystone-next/admin-ui/pages/ItemPage';

export default function Item() {
return <ItemPage listKey="ProductImage" />;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import React from 'react';

import { ListPage } from '@keystone-next/admin-ui/pages/ListPage';

export default function List() {
return <ListPage listKey="ProductImage" />;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import React from 'react';

import { ItemPage } from '@keystone-next/admin-ui/pages/ItemPage';

export default function Item() {
return <ItemPage listKey="Product" />;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import React from 'react';

import { ListPage } from '@keystone-next/admin-ui/pages/ListPage';

export default function List() {
return <ListPage listKey="Product" />;
}
Loading

0 comments on commit aa8b553

Please sign in to comment.