Backend Patterns
The backend examples in vara-dapp-patterns/infrastructure cover the trusted off-chain services that often sit beside a Vara application.
Included patterns
| Pattern | Focus | Source |
|---|---|---|
| REST Gateway for Sails Programs | Expose on-chain commands and queries through a conventional HTTP API | infrastructure/gateway |
| Gasless Voucher Server | Issue, prolong, revoke, and inspect vouchers on behalf of users | infrastructure/gasless-server |
| Token-Gated Authentication | Verify wallet signatures, read VFT balances, and issue JWT access tokens | infrastructure/token-gate-server |
When you need these patterns
Use a backend pattern when your architecture needs one of the following:
- a trusted signer that should not live in the browser,
- voucher lifecycle management for gasless UX,
- server-side authentication or authorization based on on-chain state,
- a conventional REST interface for frontend or third-party clients.