You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This document lists the major libraries, HandCash features, and optional capabilities wired into the HandCash full-stack template. Use it when you fork the app or strip pieces you do not need.
HandCash
Piece
Role
@handcash/sdk
Low-level SDK; Connect.* helpers for profile, balances, pay, inventory, items.
@handcash/handcash-connect
HandCashConnect / HandCashMinter for flows that need the Connect account or minting APIs.
@handcash/mpp
Machine payments: HTTP 402, HandCash Pay, receipt JWTs, paid-route gate. Local monorepo path file:../../handcash/handcash-mpp; see MACHINE_PAYMENTS.md.
lib/handcash-service.ts
Single place that calls the SDK/Connect. Prefer adding methods here instead of importing HandCash packages in routes or UI. Exposes getAppLevelClient() for server-only MPP (@handcash/mpp) use.
OAuth + session
User signs in via HandCash; session cookie holds metadata; see app/api/auth/ and lib/auth-context.tsx.
Google sign-in
Optional path through HandCash Market (/api/auth/google). UI: DualLoginButtons.
HandCash permissions (scopes)
The UI probes what the user granted (profile, pay, friends, inventory). Users enable these per app in HandCash. Widgets show friendly empty states when a scope is missing. See handcashService.getPermissions and the widgets under components/widgets/.
Business wallet (BUSINESS_AUTH_TOKEN)
Server-only token for the business HandCash account. Used for admin flows (minting, collections, payment requests, inventory that acts on behalf of the business). It is not shown on the public homepage or header; configure it in .env.local for /admin and related APIs. Public route GET /api/business/profile still returns the business profile when the token is set (for your own integrations if needed).
Auth & security
Piece
Role
jose
JWT / JWE handling for session tokens where applicable.