# PocketBase setup for the Zhine guide

The Site uses the existing project architecture from the supplied reference code.

- Backend: `https://pb.tulkuajam.org`
- Project collection: `projects`
- Project record: `nad85b4t37ly8d7`
- JSON content field: `data_payload`
- Auth collection: `users`
- Membership collection: `project_members`
- Editing role: `editor`

All editable values are stored as nested path/value entries inside the single project's `data_payload` JSON field. Example paths include `bo.meaning.lead`, `zh-Hant.nine.item.3.body`, and `de.advice.quote`.

The editor must have an active `project_members` record where:

- `project` relates to `nad85b4t37ly8d7`
- `user` relates to the editor's `users` record
- `active` is `true`
- `role` is `editor`

The public Site needs permission to view this project record so it can load `data_payload`. Updating the record must be limited to an authenticated, active project member with the `editor` role. The membership collection must allow an authenticated user to read their own active membership for this project.

If PocketBase uses a restricted CORS origin list, allow:

```text
https://zhine-meditation-guide.palyul-9029.chatgpt.site
```

On save, the Site merges all paths for the current language into the existing `data_payload` without removing content already stored for the other languages.
