scaffolds more docs
This commit is contained in:
7
docs/Access-Control/config.mdx
Normal file
7
docs/Access-Control/config.mdx
Normal file
@@ -0,0 +1,7 @@
|
||||
---
|
||||
title: Access Control Config
|
||||
label: Config
|
||||
order: 10
|
||||
---
|
||||
|
||||
Talk about how to write access control.
|
||||
7
docs/Access-Control/examples.mdx
Normal file
7
docs/Access-Control/examples.mdx
Normal file
@@ -0,0 +1,7 @@
|
||||
---
|
||||
title: Access Control Examples
|
||||
label: Examples
|
||||
order: 20
|
||||
---
|
||||
|
||||
Show examples of how to write access control functions.
|
||||
9
docs/Authentication/accessing-logged-in-user.mdx
Normal file
9
docs/Authentication/accessing-logged-in-user.mdx
Normal 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.
|
||||
18
docs/Authentication/config.mdx
Normal file
18
docs/Authentication/config.mdx
Normal 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)
|
||||
43
docs/Authentication/operations.mdx
Normal file
43
docs/Authentication/operations.mdx
Normal 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.
|
||||
7
docs/Authentication/security.mdx
Normal file
7
docs/Authentication/security.mdx
Normal file
@@ -0,0 +1,7 @@
|
||||
---
|
||||
title: Authentication Security
|
||||
label: Security
|
||||
order: 20
|
||||
---
|
||||
|
||||
Talk about how Payload securely authenticates here.
|
||||
7
docs/Authentication/using-middleware.mdx
Normal file
7
docs/Authentication/using-middleware.mdx
Normal 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
|
||||
7
docs/Configuration/blocks.mdx
Normal file
7
docs/Configuration/blocks.mdx
Normal file
@@ -0,0 +1,7 @@
|
||||
---
|
||||
title: Block Configs
|
||||
label: Blocks
|
||||
order: 40
|
||||
---
|
||||
|
||||
Talk about how to write block configs here.
|
||||
7
docs/Configuration/collections.mdx
Normal file
7
docs/Configuration/collections.mdx
Normal file
@@ -0,0 +1,7 @@
|
||||
---
|
||||
title: Collection Configs
|
||||
label: Collections
|
||||
order: 20
|
||||
---
|
||||
|
||||
Talk about how to write collection configs here.
|
||||
7
docs/Configuration/globals.mdx
Normal file
7
docs/Configuration/globals.mdx
Normal file
@@ -0,0 +1,7 @@
|
||||
---
|
||||
title: Global Configs
|
||||
label: Globals
|
||||
order: 30
|
||||
---
|
||||
|
||||
Talk about how to write Globals configs here.
|
||||
7
docs/Configuration/main.mdx
Normal file
7
docs/Configuration/main.mdx
Normal 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
11
docs/GraphQL/config.mdx
Normal 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
|
||||
7
docs/GraphQL/extending.mdx
Normal file
7
docs/GraphQL/extending.mdx
Normal 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
10
docs/Hooks/config.mdx
Normal 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
7
docs/Hooks/examples.mdx
Normal file
@@ -0,0 +1,7 @@
|
||||
---
|
||||
title: Access Control Config
|
||||
label: Config
|
||||
order: 20
|
||||
---
|
||||
|
||||
Show examples of how to write hook functions.
|
||||
11
docs/Production/deployment.mdx
Normal file
11
docs/Production/deployment.mdx
Normal 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
|
||||
9
docs/Production/security.mdx
Normal file
9
docs/Production/security.mdx
Normal 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
10
docs/REST-API/config.mdx
Normal 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
16
docs/Upload/config.mdx
Normal 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
|
||||
@@ -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.
|
||||
|
||||
@@ -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. It’s meant to provide a massive boost to your development process, but importantly, stay out of your way as your apps get more complex.
|
||||
</Banner>
|
||||
|
||||
Reference in New Issue
Block a user