Skip to main content
Start here when your app runs in the browser. You will create a small Vite app, sign in with a browser wallet, and write and read back one record.

Prerequisites

  • Node.js 18 or newer
  • A modern browser with an injected Ethereum wallet
  • A test wallet account; the tutorial does not require funds

Create the project

Replace src/main.ts with this complete example:

Run and verify

Open the local URL printed by Vite, select Sign in and write, and approve the wallet prompts. Success looks like this:
The exact chain, address, and timestamp will differ. If the wallet never opens, confirm that the extension is unlocked and allowed on the local Vite origin. If a KV operation fails, the page prints the SDK error code and message instead of reporting a false success.

What happened

TinyCloudWeb used the injected provider to request a SIWE signature. signIn() created or restored the app session and ensured the tinycloud-quickstart space was hosted. The KV result was only displayed after the same key was read back successfully.

Next steps

Verified against @tinycloud/web-sdk 2.7.0.