Skip to content

TribeWarez Terminal

terminal.tribewarez.com

A web-based Web3 gaming and DeFi hub with a retro terminal-style UI. The Terminal is the primary entry point for interacting with the TribeWarez ecosystem -- staking, swapping, managing vaults, and launching games.

Built as a Progressive Web App (PWA) installable on Android and desktop.

Features

X Connect Onboarding

New users are greeted with the XConnectWall -- a full-screen gate requiring:

  1. Connect X (Twitter) account via OAuth
  2. Connect a Solana wallet (Phantom, Solflare)
  3. Claim 1000 NMTC + 1000 PTtC as a welcome reward

Returning users skip the wall automatically (claim state stored in localStorage).

DeFi Panels

PanelFunctionality
StakingStake PTtC with flexible, 7-day, or 30-day lock periods. Earn rewards, claim, or emergency unstake.
SwapTrade PTtC/SOL and PTtC/USDC pairs with configurable slippage, real-time quotes, and balance display.
VaultDeposit, withdraw, and create time-locked savings vaults.
User StatsDashboard showing total staked, rewards earned, swap count, and vault balance.

Gaming

The Game Directory links out to ecosystem games:

  • Mystic Numbers (Match-3 puzzle)
  • Numerology Wars (RTS)
  • Angels95 (Retro Arcade)
  • Wargamez (PvP Arena)

A built-in Dice Game demo is also available directly in the terminal.

Token Access

  • Faucet -- Devnet SOL airdrop for testing
  • PumpedTribePanel -- PTtC info and pump.fun link
  • NMTCPanel -- NMTC info and pump.fun link
  • Crypto Shop -- Purchase Premium (1 month) or No-Ads via SOL or NMTC

Tech Stack

LayerTechnology
FrontendReact 18, TypeScript, Vite 5
UITailwind CSS, Radix UI, shadcn-ui, Framer Motion
BlockchainSolana web3.js, Wallet Adapter, SPL Token
StateTanStack React Query
BackendExpress (Node.js)
RuntimeBun
PWAvite-plugin-pwa (Workbox)
FontJetBrains Mono

Backend API

The Express server (server/index.ts) exposes:

EndpointPurpose
GET /api/healthHealth check
GET /api/x-auth/authorizeStart X OAuth flow
GET /api/x-auth/callbackOAuth callback handler
POST /api/x-auth/claimSend NMTC + PTtC to user wallet
GET /api/staking/*Staking data (stub)
GET /api/swap/*Swap data (stub)
GET /api/vault/*Vault data (stub)
POST /api/crypto/premium-purchasePremium purchase via SOL/NMTC
POST /api/crypto/no-ads-purchaseNo-ads purchase via SOL/NMTC

Solana Integration

Contract configuration lives in src/contracts/config.ts:

  • Token mints for PTtC and NMTC
  • Program IDs for Staking, Swap, and Vault
  • Network endpoint configuration

Client SDK in src/contracts/client.ts provides StakingClient, SwapClient, and PDA helper functions.

Environment Variables

bash
VITE_SOLANA_RPC_URL=https://testnet-solana.rpc.gateway.tribewarez.com
VITE_SOL_HELIUS_API_KEY=<helius_key>
VITE_API_BASE_URL=https://terminal.tribewarez.com
X_CLIENT_ID=<x_oauth_client_id>
X_CLIENT_SECRET=<x_oauth_client_secret>
X_CALLBACK_URL=https://terminal.tribewarez.com/api/x-auth/callback
REWARD_WALLET_PRIVATE_KEY=<treasury_wallet_key>
SOLANA_RPC_URL=https://testnet-solana.rpc.gateway.tribewarez.com

Docker

The Terminal uses a multi-stage Dockerfile:

  1. Build stage -- Bun installs dependencies and builds the Vite frontend
  2. Production stage -- Node.js runs the Express server, serving static files from dist/

Exposed on port 8882 internally, routed via VIRTUAL_HOST=terminal.tribewarez.com.

TribeWarez Blockchain Ecosystem