How stylenexy/rsvpay works
RSVPay combines a NEAR smart contract with a React site for creating wedding envelopes, giving gifts, preserving a per-envelope gift book, and later sending replies from locked shares. The principal journey runs from a guest gift through contract-held balances and recorded entries to a future reciprocal payment. The site also provides a guided story/demo and public verification of contract behavior. The README documents the contract’s money and transfer rules; sampled frontend excerpts show routing, holder gating, and the chain-client interface. Unsampled frontend links are omitted where their caller relationships cannot be established.
Main entry points: App.tsx Web application · near.ts NEAR client · lib.rs NEP-171 envelope · Buku.tsx Gift book
Components 18
Wedding site
- Web application
frontend/src/App.tsx - Create envelope
frontend/src/pages/Buka.tsx - Give gift
frontend/src/pages/Beri.tsx - Gift book
frontend/src/pages/Buku.tsx - History view
frontend/src/components/History.tsx - Account context
frontend/src/context.tsx
Chain access
- NEAR client
frontend/src/chain/near.ts - Mock client
frontend/src/chain/mock.ts - Holder proof
frontend/src/chain/holder.ts - History verification
frontend/src/chain/history.ts - Story runner
frontend/src/chain/story.ts
Envelope contract
- NEP-171 envelope
contracts/src/lib.rs
Story and presentation
- Guided tour
frontend/src/components/Guide.tsx - Interactive story
frontend/src/pages/Coba.tsx - Wedding narrative
frontend/src/hero - Language and copy
frontend/src/lib/lang.ts
Other components
- Guest or host
- NEAR testnet
Connections 22
- Guest or host → Web application: uses
README.md - Web application → Create envelope: routes to
frontend/src/App.tsx - Web application → Give gift: routes to
frontend/src/App.tsx - Web application → Gift book: routes to
frontend/src/App.tsx - Web application → Interactive story: routes to
frontend/src/App.tsx - Web application → NEAR client: creates client
frontend/src/App.tsx - Web application → Account context: provides account
frontend/src/App.tsx - Create envelope → NEAR client: uses chain
- Give gift → NEAR client: submits gift
- Gift book → Holder proof: proves holder
frontend/src/pages/Buku.tsx - Gift book → History view: shows history
frontend/src/pages/Buku.tsx - History view → History verification: reads records
frontend/src/components/History.tsx - Interactive story → Story runner: runs story
frontend/src/pages/Coba.tsx - NEAR client → NEAR testnet: reads and writes
README.md - NEAR client → NEP-171 envelope: calls contract
README.md - Mock client → NEAR client: implements interface
- Holder proof → NEAR testnet: checks ownership
README.md - History verification → NEAR testnet: verifies records
README.md - NEP-171 envelope → NEAR testnet: runs on
README.md - NEP-171 envelope → NEP-171 envelope: locks shares
README.md - Guided tour → Interactive story: guides visitor
frontend/src/components/Guide.tsx - Wedding narrative → Language and copy: uses language
frontend/src/lib/lang.ts