Skip to content

Latest commit

 

History

History
128 lines (88 loc) · 4.54 KB

File metadata and controls

128 lines (88 loc) · 4.54 KB

Getting Started with SuperPool

Complete setup guide for developing on the SuperPool platform.

Prerequisites

Before starting, ensure you have:

  • Node.js v18 or higher
  • pnpm (npm install -g pnpm)
  • Git
  • Firebase project with Firestore, Authentication, and Cloud Functions
  • Reown Cloud account for wallet connections (cloud.reown.com)
  • Alchemy API key for RPC access (alchemy.com)
  • ngrok account for mobile development (ngrok.com)

Quick Start

# Clone and install
git clone https://github.com/rm30-dev/superpool.git
cd superpool
pnpm install

Environment Configuration

Each package requires specific environment variables. See individual package documentation:

Development Workflows

Choose the workflow that matches your development focus:

Full Stack Development

For complete local development with all services:

  1. Start Local Blockchain - Local Hardhat node with test pools
  2. Run Backend Services - Firebase emulators with auth
  3. Launch Mobile App - Expo with localhost network

Frontend Development Only

Test with deployed contracts on testnet:

  1. Deploy to Testnet - Deploy contracts to Polygon Amoy
  2. Configure Mobile App - Update contract addresses
  3. Get testnet POL from Polygon Faucet

Smart Contract Development Only

Focus on contract development and testing:

  1. Contract Development Guide - Local/fork/testnet testing
  2. Run Contract Tests - Comprehensive test suite

Landing Page Development

Work on the marketing website:

  1. Landing Page Setup - Next.js development

All-in-One Development Command

Start everything with a single command:

# From root directory
pnpm dev

This starts:

  • Firebase emulators (auth, functions, firestore)
  • Ngrok tunnels for mobile device access
  • Expo development server
  • Auto-updates mobile app with ngrok URLs

Package Documentation

Detailed setup and usage for each package:

Applications

Core Services

Shared Packages

Common Issues

Firebase Emulators Won't Start

  • Check that port 9099 (auth), 5001 (functions), and 8080 (firestore) are available
  • Ensure service account key is in packages/backend/service-account-key.json

Mobile App Can't Connect to Localhost

  • Verify local blockchain is running (pnpm node:local in contracts package)
  • Check contract addresses are updated in mobile .env
  • Ensure you're on same network for device testing

Contract Deployment Fails

  • Verify .env has valid private key and RPC URL
  • Check you have sufficient testnet tokens
  • Confirm Etherscan API key is set for verification

Additional Resources

Need Help?

  1. Check prerequisites are installed correctly
  2. Verify environment variables in package-specific .env files
  3. Review error messages - they often contain helpful debugging info
  4. Consult individual package READMEs for detailed setup