scaffolds more docs

This commit is contained in:
James
2020-11-07 15:51:05 -05:00
parent 082c6d010c
commit 165634d127
21 changed files with 243 additions and 4 deletions

View File

@@ -0,0 +1,7 @@
---
title: Access Control Config
label: Config
order: 10
---
Talk about how to write access control.

View File

@@ -0,0 +1,7 @@
---
title: Access Control Examples
label: Examples
order: 20
---
Show examples of how to write access control functions.

View File

@@ -0,0 +1,9 @@
---
title: Accessing the User
label: Accessing the User
order: 40
---
Talk about how to access the User in custom code like hooks and access control. The User is on the req.
Show code examples.

View File

@@ -0,0 +1,18 @@
---
title: Authentication Config
label: Config
order: 10
---
Talk about how to configure authentication here.
Need to cover:
1. What collection to use for Admin panel and how there can only be one
1. Can have multiple auth collections
1. Token expiration
1. Email verification
1. Security (max login, lock time)
1. API keys
1. Depth to populate (performance impact)
1. Cookie settings (HTTP only discussion)

View File

@@ -0,0 +1,43 @@
---
title: Authentication Operations
label: Operations
order: 30
---
Talk about Auth operations here.
#### Me
Returns null or logged in user with token (useful for HTTP only)
#### Create operation modifications
Discuss if verification is required, etc etc
#### Init
Checks if there have been users created, checks Admin access
#### Login
HTTP-only cookies, token response. Discuss max login attempts
#### Logout
Removes HTTP-only cookie
#### Refresh
Refreshes token (requires valid token)
#### Register First User
Allows for anyone to register first user through UI
#### Forgot Password
Takes an email, sends email to that address. Discuss how to customize email
#### Access
Shows what the user can and cant do.

View File

@@ -0,0 +1,7 @@
---
title: Authentication Security
label: Security
order: 20
---
Talk about how Payload securely authenticates here.

View File

@@ -0,0 +1,7 @@
---
title: Using the Payload Auth Middleware
label: Using the Middleware
order: 50
---
Talk about how to use `payload.authenticate()` outside of Payload - show examples

View File

@@ -0,0 +1,7 @@
---
title: Block Configs
label: Blocks
order: 40
---
Talk about how to write block configs here.

View File

@@ -0,0 +1,7 @@
---
title: Collection Configs
label: Collections
order: 20
---
Talk about how to write collection configs here.

View File

@@ -0,0 +1,7 @@
---
title: Global Configs
label: Globals
order: 30
---
Talk about how to write Globals configs here.

View File

@@ -0,0 +1,7 @@
---
title: The Main Config
label: Main
order: 10
---
Talk about how to write the main config here.

11
docs/GraphQL/config.mdx Normal file
View File

@@ -0,0 +1,11 @@
---
title: GraphQL Overview
label: Overview
order: 10
---
Go over GraphQL configuration options.
- Naming conventions
- List of all queries and mutations w/ examples
- Context

View File

@@ -0,0 +1,7 @@
---
title: Adding your own Queries and Mutations
label: Custom Queries and Mutations
order: 20
---
Talk about how to add your own queries and mutations.

10
docs/Hooks/config.mdx Normal file
View File

@@ -0,0 +1,10 @@
---
title: Hooks Config
label: Config
order: 10
---
Talk about how to write hooks.
List all possible hoooks.

7
docs/Hooks/examples.mdx Normal file
View File

@@ -0,0 +1,7 @@
---
title: Access Control Config
label: Config
order: 20
---
Show examples of how to write hook functions.

View File

@@ -0,0 +1,11 @@
---
title: Production Deployment
label: Deployment
order: 10
---
Talk about how to deploy Payload here.
- DigitalOcean
- If no file storage, Heroku
- If file storage, need Heroku extensions

View File

@@ -0,0 +1,9 @@
---
title: Production Security Measures
label: Production
order: 20
---
- Rate limiting
- GraphQL Complexity
- Limits

10
docs/REST-API/config.mdx Normal file
View File

@@ -0,0 +1,10 @@
---
title: REST API Overview
label: Overview
order: 10
---
Go over REST configuration options.
- Middleware
- Routes

16
docs/Upload/config.mdx Normal file
View File

@@ -0,0 +1,16 @@
---
title: Upload Config
label: Config
order: 10
---
Talk about how to configure uploads here.
Need to cover:
1. Can have multiple collections
1. Static directory
1. How to upload (multipart/form-data)
1. Uploading is REST-only
1. Access control
1. Image sizes

View File

@@ -1,6 +1,39 @@
---
title: Concepts
title: Payload Concepts
label: Concepts
order: 20
---
# Concepts
Payload is based around a small and intuitive set of concepts. Before starting to work with Payload, it's a good idea to familiarize yourself with the following:
### Config
<Banner type="info">
The Payload config is where you configure everything that Payload does.
</Banner>
By default, the Payload config lives in the root folder of your code and is named `payload.config.js`, but you can customize where you store it. The `config` is plain old JavaScript, meaning you can write full JavaScript functions and even full React components right into your config.
### Collections
<Banner type="info">
A Collection represents a type of content that Payload will store and can contain many documents.
</Banner>
Payload Collections are defined through Each Collection will map one-to-one with a MongoDB collection automatically based on fields that you define. You can have as many Collections as you need. It's often best practice to write your Collections in separate files,
### Globals
<Banner type="info">
A Global is a "one-off" piece of content that is perfect for storing navigational structures, themes, top-level meta data, and more.
</Banner>
You can define as many Collections as you need. On each Collection, you can specify the shape of your data through Fields.
### Fields
<Banner type="info">
Fields are the building blocks of Payload. Collections and Globals both use Fields to define the shape of the data that they store.
</Banner>
Payload comes with many different types of Fields that give you a ton of flexibility while designing your API. Each Field type has its own potential properties that allow you to customize how they work.

View File

@@ -1,10 +1,9 @@
---
title: What is Payload?
label: What is Payload?
order: 10
---
# What is Payload?
<Banner type="success">
Payload is a headless CMS and application framework. Its meant to provide a massive boost to your development process, but importantly, stay out of your way as your apps get more complex.
</Banner>