Skip to content

Formulus: multi-profile Synkronus contexts (Desktop-style isolation) #917

Description

@r0ssing

Component

  • formulus (React Native mobile app)
  • formulus-formplayer (React web app)
  • synkronus (Go backend server)
  • synkronus-cli (Command-line utility)
  • Documentation
  • Other (please specify)

Feature Description

Add Profiles to Formulus, in the same spirit as ODE Desktop: each profile is an isolated Synkronus context (URL, credentials, tokens, sync state, SQLite, attachments, app bundle, Formplayer drafts). The device starts on the last-used profile (or the single Default profile).

Problem Statement

Changing the Synkronus server today wipes local state and switches. That makes it hard to use one device for more than one project at a time, and it is easy to lose unsynced work.

Proposed Solution

  • Dedicated Profiles screen (list, add, rename, switch, delete, login/QR). Connection fields move off Settings.
  • After first successful login, the profile URL is locked. Username/password can be changed in place (same local data).
  • Strict isolation: nothing from one profile is visible in another (including Formplayer drafts).
  • Upgrading is non-breaking: existing config and data migrate into a Default profile.
  • Deleting a profile also deletes its local data. The last remaining profile cannot be deleted.
  • Changing project means add/switch profile, not wipe-and-switch.

Alternatives Considered

  • Keep wipe-and-switch, but scoped to one profile — still destructive and easy to get wrong.
  • Implicit “new URL creates a profile” with no Profiles screen — weaker UX than Desktop.
  • Symlink “current profile” pointers — brittle on Android and with WatermelonDB’s SQLite location.

Additional Context

Planned storage: {docs}/profiles/{id}/ for attachments, app, forms, signatures; per-profile SQLite formulus_{id}; Keychain and AsyncStorage namespaced by profile id. Formplayer localStorage drafts/sticky fields keyed by profile id (bundled WebView origin is shared). Switch reloads the JS runtime so in-memory singletons cannot leak.

Related

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

documentationImprovements or additions to documentationenhancementNew feature or requestformplayerIssues related to the FormPlayer React applicationformulusFor issues related to the Formulus React Native application

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions