vault backup: 2026-05-15 15:42:42

This commit is contained in:
Vadym Samoilenko 2026-05-15 15:42:42 +01:00
parent e670a07715
commit a3c61e91c4
5 changed files with 85 additions and 1 deletions

View file

@ -76,3 +76,4 @@ tags: [daily]
- 15:31 — session ended | `ai_leed`
- 15:33 — session ended | `ai_leed`
- 15:38 — session ended | `ai_leed`
- 15:42 — session ended | `ai_leed`

View file

@ -35,7 +35,7 @@ This 3-hop pattern works for hundreds of articles without vector search.
| [[wiki/reports/_index\|reports/]] | Weekly and monthly summaries — generate: `uv run python scripts/report-generator.py --weekly` | 1 |
| [[wiki/infrastructure/_index\|infrastructure/]] | Server inventory: all 10 SSH hosts — optical, optical-dev, optical-prod, baic, librechat, modocmms, box-cli, aimpress, pve | 12 |
| [[wiki/testing/_index\|testing/]] | Web app testing: functional, performance, security, UI types; TDD/BDD/Agile methodologies; Selenium/Cypress/Playwright/JMeter/OWASP ZAP tools | 1 |
| [[wiki/payloadcms/_index\|payloadcms/]] | Full Payload CMS reference — getting started, config, database (Postgres/MongoDB/SQLite), all 22 field types, access control, hooks, authentication (cookies, JWT, API keys, custom strategies, token data), admin UI, custom components, Lexical rich text, live preview, versions/drafts, Local/REST/GraphQL APIs, queries, plugins, jobs queue, upload, ecommerce, production deploy, TypeScript, migration guides, i18n, localization | 85 |
| [[wiki/payloadcms/_index\|payloadcms/]] | Full Payload CMS reference — getting started, config, database (Postgres/MongoDB/SQLite), all 22 field types, access control, hooks, authentication (cookies, JWT, API keys, custom strategies, token data), admin UI, custom components, Lexical rich text, live preview, versions/drafts, Local/REST/GraphQL APIs, queries, plugins, jobs queue, upload, ecommerce, production deploy, TypeScript, migration guides, i18n, localization | 86 |
| [[wiki/shared-patterns/_index\|shared-patterns/]] | Oliver Agency standard library patterns: httpx, structlog, pydantic-settings, alembic — reuse before writing from scratch | 4 |
| [[wiki/mistakes/_index\|mistakes/]] | Anti-patterns extracted from sessions — per-stack running lists (fastapi, react, docker, postgres, general) — injected at session start | 5 |

View file

@ -13,6 +13,7 @@
| [[wiki/payloadcms/upload\|Upload & Media]] | Upload config, imageSizes, focal point, storage adapters (S3/R2/GCS/Azure/Vercel Blob), access control, gotchas | raw/upload__*.md | 2026-05-15 |
| [[wiki/payloadcms/features\|Features — Email, Folders, Trash, Query Presets]] | Email adapters (Nodemailer/Resend), folder grouping (beta), soft-delete trash workflow, saved query presets | raw/email/folders/trash/query-presets | 2026-05-15 |
| [[wiki/payloadcms/folders\|Folders — Content Organization]] | Folder grouping for collections (beta): global config, per-collection opt-in, nesting, browse-by-folder view | raw/folders__overview.md | 2026-05-15 |
| [[wiki/payloadcms/email\|Email — Adapters, SMTP, Resend, Attachments]] | Full email reference: Nodemailer (SMTP/SendGrid/dev), Resend (serverless), sendEmail API, attachments (Buffer/path/Base64/URL), media collection attachments | raw/email__overview.md | 2026-05-15 |
| [[wiki/payloadcms/local-api\|Local API]] | Direct DB access via `payload.*` — CRUD, auth ops, globals, server functions, access control, outside Next.js | raw/local-api__*.md | 2026-05-15 |
| [[wiki/payloadcms/rest-api\|REST API]] | Auto-generated HTTP endpoints, all query params, auth routes, SDK, custom endpoints, method override | raw/rest-api__overview.md | 2026-05-15 |

View file

@ -0,0 +1,82 @@
---
title: "Folders — Content Organization"
aliases: [payload-folders, payload-content-folders]
tags: [payloadcms, folders, organization, collections, beta]
sources: [raw/folders__overview.md]
created: 2026-05-15
updated: 2026-05-15
---
## Overview
Folders let you group documents across collections. Built on top of [[wiki/payloadcms/fields|relationship fields]] — enabling a folder adds a hidden `folder` relationship field to each document. Folders can nest within other folders.
> **Beta warning:** Folders feature is in beta and may change in minor versions before stable.
## Configuration
Two config locations: global (`payload.config.ts`) and per-collection.
### Global (payload config)
```ts
import { buildConfig } from 'payload'
const config = buildConfig({
folders: {
browseByFolder: true, // default: true — enables browse-by-folder view
debug: false, // default: false — shows hidden folder fields/collections
fieldName: 'folder', // default: 'folder' — hidden field name on documents
slug: 'payload-folders', // default: 'payload-folders' — internal collection slug
collectionOverrides: [ // optional — plugins can mutate the folder collection
async ({ collection }) => collection,
],
},
})
```
### Per-Collection
```ts
{
slug: 'pages',
folders: true, // simplest form — defaults to false
}
// Or with options:
{
slug: 'pages',
folders: {
browseByFolder: true, // include this collection in browse-by-folder view
},
}
```
`folders: true` adds a hidden relationship field pointing to the folder collection (or `null` = no folder).
## How It Works
- Payload creates an internal `payload-folders` collection (slug configurable)
- Each folder document has its own `folder` field → enables nesting
- Collections opt-in via `folders: true` — no effect on others
- The hidden field name defaults to `folder` but is configurable via `fieldName`
## Key Takeaways
- **Opt-in per collection** — set `folders: true` in collection config; off by default
- **Nested folders** — folders themselves have a `folder` field, so trees are supported
- **Browse view**`browseByFolder: true` enables a dedicated browse UI in the admin panel
- **Debug mode**`debug: true` surfaces the hidden folder fields/collections in the UI (useful during development)
- **Slug override** — if `payload-folders` conflicts with existing collections, override via `slug`
- **Beta** — API/config shape may change before stable; pin minor versions if upgrading
## Related
- [[wiki/payloadcms/features|Features — Email, Folders, Trash, Query Presets]]
- [[wiki/payloadcms/fields|Field Types Reference]]
- [[wiki/payloadcms/admin-panel-overview|Admin Panel Overview]]
- [[wiki/payloadcms/queries|Queries — Where, Sort, Pagination]]
## Sources
- `raw/folders__overview.md` — https://payloadcms.com/docs/folders/overview