How anonroom0/anonroom works
Purpose and entry points
This is a client-side raffle/rewards application with wallet, profile, ticket, redemption, and deposit-related flows. The frontend starts at src/main.jsx, renders the application shell in src/App.jsx, and is built for static hosting (index.html, vercel.json).
Application shell and navigation
src/App.jsx is the primary UI composition and routing/control boundary. It selects major screens for landing, home, raffle participation, tickets, redemption, profile, and banned-user states:
• src/views/LandingView.jsx
• src/views/HomeView.jsx
• src/views/RaffleView.jsx
• src/views/ProfileView.jsx
• src/views/BannedView.jsx
Identity and wallet boundary
Authentication/session state is centralized in src/context/AuthContext.jsx. Wallet connection or account interaction is isolated in src/components/WalletModal.jsx, allowing views to depend on shared identity state rather than directly managing wallet UI. Branding is encapsulated by src/components/BrandLogo.jsx.
User journey modules
The profile area is a feature hub for operational user workflows: KYC, rewards, referrals, tasks, notifications, winnings, shipping, documents, and help. These screens form the account-management boundary:
• src/views/Profile/KycPage.jsx
• src/views/Profile/RewardCenter.jsx
• src/views/Profile/WinningsManager.jsx
• src/views/Profile/ShipmentTracker.jsx
Ticket ownership and redemption are separate top-level journeys in src/views/MyTicketView.jsx and src/views/ReedemView.jsx.
Client service layer
External and device-facing behavior is separated from views through services:
• src/services/supabase.js and src/services/SupabaseService.js provide the Supabase integration boundary.
• src/services/MockApi.js supports mock or fallback API behavior.
• src/services/deviceTracker.js handles device-related tracking.
• src/services/AudioEngine.js provides application audio behavior.
Views should consume these services rather than directly coupling UI logic to backend or browser APIs.
Deposits, custody, and blockchain processing
The repository includes an Ethereum-compatible deposit contract at contracts/AnonroomDeposit.sol. Deposit processing is handled server-side by Supabase Edge Functions:
• supabase/functions/scan-deposits/index.ts scans or ingests deposits.
• supabase/functions/custodial-vault/index.ts implements custodial-vault operations.
This creates a critical trust boundary: browser UI initiates user actions; blockchain and sensitive custody/deposit processing belong in the contract and Edge Functions rather than the React client.
Runtime and delivery
The application is a JavaScript/React frontend with checked-in production output under dist/, including dist/index.html. Supabase is the backend/serverless runtime, while Vercel is the declared deployment target via vercel.json. Static public documents are served from public/whitepaper.docx and public/T&Cs.docx.
Main entry points: App.jsx App shell · ProfileView.jsx Profile hub · supabase.js Supabase client · index.ts Deposit scanner
Components 22
React client
- Frontend entry
src/main.jsx - App shell · Composes major screens and application state boundaries.
src/App.jsx - Auth session
src/context/AuthContext.jsx - Wallet modal
src/components/WalletModal.jsx - Landing
src/views/LandingView.jsx - Home
src/views/HomeView.jsx - Raffle participation
src/views/RaffleView.jsx
Account workflows
- Profile hub
src/views/ProfileView.jsx - My tickets
src/views/MyTicketView.jsx - Redemption
src/views/ReedemView.jsx - KYC
src/views/Profile/KycPage.jsx - Reward center
src/views/Profile/RewardCenter.jsx - Winnings manager
src/views/Profile/WinningsManager.jsx - Shipment tracker
src/views/Profile/ShipmentTracker.jsx
Client services
- Supabase client
src/services/supabase.js - Mock API
src/services/MockApi.js - Device tracking
src/services/deviceTracker.js - Audio engine
src/services/AudioEngine.js
Custody & deposits
Sensitive processing stays outside the browser.
- Deposit contract · Ethereum-compatible on-chain deposit boundary.
contracts/AnonroomDeposit.sol - Deposit scanner · Ingests or scans deposits server-side.
supabase/functions/scan-deposits/index.ts - Custodial vault · Performs sensitive custodial operations.
supabase/functions/custodial-vault/index.ts
Delivery
- Vercel deployment
vercel.json
Connections 22
- Frontend entry → App shell: renders
- App shell → Auth session: uses session
- App shell → Wallet modal: opens
- App shell → Landing: selects
- App shell → Home: selects
- App shell → Raffle participation: selects
- App shell → Profile hub: selects
- App shell → My tickets: selects
- App shell → Redemption: selects
- Profile hub → KYC: account flow
- Profile hub → Reward center: account flow
- Profile hub → Winnings manager: account flow
- Profile hub → Shipment tracker: account flow
- App shell → Supabase client: backend access
- App shell → Mock API: fallback data
- App shell → Device tracking: tracks device
- App shell → Audio engine: plays audio
- Supabase client → Deposit scanner: invokes
- Supabase client → Custodial vault: invokes
- Deposit contract → Deposit scanner: deposit events
- Deposit scanner → Custodial vault: processed deposits
- Frontend entry → Vercel deployment: built and deployed