Skip to content

Tech Stack

Frontend

TechnologyPurposeVersion
ReactUI framework18.x
TypeScriptType safety5.x
ViteBuild tool / dev server5.x
Tailwind CSSUtility-first styling3.x
wagmiReact hooks for Ethereum2.x
viemTypeScript Ethereum library2.x
@tanstack/react-queryData fetching/caching5.x

Key Frontend Patterns

  • Glass morphism UI: backdrop-blur-md bg-white/30 panels
  • Context-based state: AppContext for global app state
  • localStorage caching: Offline-first with API sync
  • SIWE authentication: Sign-In with Ethereum

Backend (API)

TechnologyPurpose
Vercel FunctionsServerless API endpoints
Node.js 20+Runtime (ESM modules)
joseJWT signing/verification (HS256)
Vercel KVRedis persistence (Upstash)

API Structure

api/
├── _lib/           # Shared utilities (not routes)
│   ├── auth.js     # SIWE + JWT helpers
│   ├── cors.js     # CORS middleware
│   └── store.js    # Data persistence layer
├── auth/
│   ├── nonce.js    # GET nonce for SIWE
│   ├── verify.js   # POST verify signature → JWT
│   └── beta.js     # POST beta access validation
├── profile/
│   └── [address].js # GET/PUT user profiles
├── quests.js       # GET/POST/PATCH quests
├── mail.js         # GET/POST/PATCH/DELETE mail
├── leaderboard.js  # GET leaderboard
├── reputation.js   # GET reputation
├── community-dao.js # GET/POST/PUT DAO data
├── resolve.js      # GET ENS resolution
└── github/
    └── token.js    # POST OAuth code exchange

Persistence

Production (Vercel KV)

  • Provider: Upstash Redis
  • Encryption: AES-256-GCM for mail (at-rest)
  • Keys:
    • profile:{address} — User profile object
    • quests — Array of all quests
    • leaderboard — Leaderboard data
    • mail:{address} — User's mailbox (encrypted)
    • mail:broadcasts — Platform-wide announcements
    • communityDao — DAO state and FQPs

Development (Local)

  • Seed files: api/seed/*.json
  • In-memory cache: Module-level variables
  • Writes: Persisted back to seed files

Blockchain

NetworkChain IDExplorer
Base Sepolia (testnet)84532sepolia.basescan.org
Base (mainnet)8453basescan.org

Environment Toggle

bash
# .env.local
VITE_NETWORK=mainnet  # or omit for testnet

Smart Contracts (Future)

ContractPurpose
Quest.solQuest escrow, completion, disputes
FetchToken.solProtocol token (if applicable)
GenesisNFT.solDAO membership NFTs

External Services

ServicePurpose
VercelHosting (frontend + API)
UpstashRedis KV storage
GitHubOAuth for developer identity
ENSEthereum Name Service resolution

Development Tools

bash
# Package manager
pnpm

# Type checking
npx tsc --noEmit

# Build
cd frontend && npx vite build

# Local API server
cd api && node dev-server.mjs

Fetch Quests — Decentralized Gig-Work Platform