Payload Playground - Database adapters in the browser via WASM #8219
GermanJablo
started this conversation in
Feature Requests & Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Overview
Deploying interactive demos or playgrounds provides significant advantages for both developers and users:
Many tools deploy a playground for these reasons, such as Lexical, Typescript or Tailwind.
While deploying a basic playground is usually straightforward and can often be automated through GitHub Actions, PayloadCMS faces an additional challenge: its reliance on a database backend. Deploying an open and publicly accessible database in a playground can lead to issues such as non-deterministic behavior and potential DB abuse.
Proposal
A potential solution to this problem is to leverage a database that runs locally in the user's browser, powered by WebAssembly (WASM). This approach would allow for fully isolated instances of the database, eliminating concerns about public DB exposure while still offering full CMS functionality in a demo environment.
The goal of this discussion is to gather input and collaborate on implementing a solution for Payload’s playground, starting with addressing this challenge.
Possible Solutions
There are currently 2 options for implementing a database in the browser via WASM:
Beta Was this translation helpful? Give feedback.
All reactions