Project (i.e. board) management provided by blockr.core via the preserve_board plugin is a simple file upload/download-based mechanism. More user-friendly alternatives using the pins package are available as manage_project plugin.
You can install the development version of blockr.session from GitHub with:
# install.packages("pak")
pak::pak("BristolMyersSquibb/blockr.session")We can start up an app that uses the manage_project() plugin by swapping out the default preserve_board() plugin.
library(blockr.core)
library(blockr.dock)
library(blockr.session)
serve(
new_dock_board(),
plugins = custom_plugins(manage_project())
)The default storage backend is [pins::board_local()] which can be configured by setting the session_mgmt_backend [blockr_option()].
To use Posit Connect as the storage backend, pass pins::board_connect (the function itself, not its result) as the backend option. This enables sharing, visibility controls, and per-user pin storage:
library(blockr.core)
library(blockr.dock)
library(blockr.session)
options(blockr.session_mgmt_backend = pins::board_connect)
serve(
new_dock_board(),
plugins = custom_plugins(manage_project())
)get_session_backend() calls the function once per session, picking up credentials at runtime. The navbar dropdown gains a Sharing tab (next to Workflows and History) that lets you set visibility and share with other Connect users.
When deploying to Connect, the above is all that is needed — board_connect picks up the server URL and API key from the environment automatically.
By default, pins are stored under the deploying user’s namespace. To have each viewer’s pins saved under their own account, enable the Connect API Integration for the content:
With the integration enabled, Connect injects an ephemeral CONNECT_API_KEY into each user’s session. Because pins::board_connect is called fresh per session, it automatically picks up that key via its default auth = "auto". No additional packages or configuration are needed — in particular, the connectcreds package is not required here; that package is for exchanging session credentials for third-party OAuth tokens (e.g. GitHub, Salesforce), which is a separate use case.