Skip to main content

App Data, Storage, and Access

Shuuka gives apps a generic storage and entry system per installed app instance.

Storage Visibility

VisibilityReadable byUse for
PrivateApp owner onlyinternal state, sensitive workflow data
PublicAnyonewinner nickname, public status, public draw history

Never store PII in public storage.

KeyTypical value
winnercurrent winner object
drawsfull draw history
entry_countpublic-safe participant count
campaign_statusactive, closed, or custom app state
settingsapp-specific structured configuration

Use the package schemas for structure, then use shkApi or SDK helpers for runtime reads and writes.

NeedStart with
App Global Settingssettings.json
secure App Global Settingssettings-global.json
App Instance Settingsgroups and placeholders in manifest.json
visitor submissionsinputs.json
runtime reads and writesSDK helpers or shkApi

Entry Submission Contract

Typical payload:

{
"form_id": "giveaway",
"input_values": { "email": "[email protected]" },
"display_value": "janed",
"metadata": { "consent": true }
}

display_value vs input_values

FieldEncrypted at restPublic-safe
input_values.emailYesNo
input_values.full_nameYesNo
display_valueNoYes

Use display_value only for data the participant intentionally makes public.

Access Code Flow

Use access codes when the campaign is invite-only.

  1. Verify the code with shkApi.public.access.verify(code).
  2. Keep the returned token in memory only.
  3. Pass it as accessToken into shkApi.public.entries.submit(...).

Do not store the token in localStorage or sessionStorage.

Deduplication Model

ModeBehavior
single_entryone submission per participant
daily_entriesone submission per participant per day

Best Practice

Keep app state small and intentional:

  • store only what the workflow needs
  • keep public storage strictly public-safe
  • treat shkApi as the only builder-facing storage/entry contract