> For the complete documentation index, see [llms.txt](https://city-protocol.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://city-protocol.gitbook.io/docs/software-development-kit/wallet/recommended-architecture.md).

# Recommended Architecture

For the best developer experience, split responsibility across two boundaries:

**Client-side (`@privy-io/react-auth`)** for session management, wallet provisioning, login/logout UI, and identity-token acquisition.

**Server-side (`@cityprotocol/core` → `verifyPrivyWallet`)** for token verification, wallet-address resolution, and any downstream authorization logic that gates access to City Protocol features.

Never trust a wallet address sent directly from the client. Always resolve it from the verified identity token on the server.
