Home - alxspiker/Pi-Network-Developer-Docs GitHub Wiki

🥧 Pi Developer Handbook

The complete guide to building robust applications on the Pi Network

Transform your ideas into powerful Pi Network applications with our comprehensive documentation, practical examples, and battle-tested best practices.

🌟 What's New: Hybrid App Architecture

🚀 Build once, run everywhere!
Create applications that provide exceptional experiences in both regular browsers (Web2) and Pi Browser (Web3) environments.

✨ Key Features

  • Smart Pi Browser Detection - Automatically detect user environment
  • Graceful Fallbacks - Seamless experience for all users
  • Professional UX - No confusing popups or broken functionality
  • Future-Proof Design - Ready for Pi Network's mainstream adoption

🚀 Quick Start Guide

Choose your development path:

🔗 API Integration ⚡ SDK Development 🌐 Hybrid Apps
Connect to Pi Network APIs Integrate Pi features directly Build for Web2 + Web3
📖 API Reference ⚡ SDK Reference 🌐 Browser Detection

📚 Essential Resources

📖 Core Documentation
🛠️ Implementation Guides
🌟 Specialized Topics

🔄 Why Choose Hybrid Architecture?

💡 Pro Tip: Hybrid apps are the future of Pi Network development - they provide the best experience for all users while maximizing your app's reach.

🎯 Benefit 📝 Description
🌍 Broader Reach Your app works seamlessly for both Web2 users and Pi Network pioneers
✨ Better UX No confusing authentication popups in regular browsers
🛡️ Clean Experience Graceful fallbacks with helpful guidance messaging
🚀 Future-Ready Prepared for Pi Network's mainstream adoption
🔧 Easy Integration Drop-in solutions for React and vanilla JavaScript

✅ Key Technical Features

🔍 Detection & Loading

  • Smart Browser Detection
  • Conditional Feature Loading
  • Automatic Environment Recognition

👥 User Experience

  • User-Initiated Authentication
  • Professional Fallback Messages
  • Production-Ready Error Handling

💡 Featured Example Projects

🎯 All examples include hybrid app support with Pi Browser detection

🚀 Project 📝 Description 🛠️ Technologies 🔗 Link
Basic Login & Pay Simple authentication and payments JavaScript, Pi SDK View →
Python Subscriptions Flask backend with hybrid frontend Python, Flask, JavaScript View →
Full SDK Demo Comprehensive Pi features showcase React, Pi SDK View →
📖 View All Examples →

🏁 Complete Setup Guide

📋 Follow this comprehensive checklist to register, configure, and launch your Pi Network application

1. Registering for an Account and Initial Setup

  1. Download the Pi App:

    • Google Play Store Link
    • Apple App Store Link
  2. Register for an account:

    • Use a referral code. You can find them online.
  3. Download and Sign into the Pi Browser:

    • See our video tutorial Link
    • Google Play Store Link
    • Apple App Store Link
  4. Verify Email Address: (Required)

    • Enter the Pi Mining App, click the ‘☰’ menu, and select "Profile".
  5. Register your App and Configure Hosting:

  6. Create a Wallet:

    • Create a wallet at wallet.pi. Confirm access before continuing.
  7. Code and Configure Your App

    • Important: Use our updated Examples as a starting point, especially for hackathons.
    • Hybrid App Architecture: Implement Pi Browser Detection for broader reach and better UX.
    • Development URL: Enter the local host URL for sandbox testing.
    • Sandbox Mode:
      • Set the sandbox flag to "true" in your FE code.
      • Copy the sandbox code from the Pi Mining App utilities page.
  8. Deploy and Validate

    • Production URL: Enter your app's live URL.
    • Validate Domain Ownership: Add the provided key to a validation-key.txt file at your domain's root.
  9. Test a Pi Transaction

    • Process a User-to-App transaction to confirm everything is connected.

2. Launching on Pi Mainnet

Prerequisites:

  • Pi KYC Completion
  • Mainnet Wallet
  1. Create a Mainnet Developer Portal Project
  2. Verify Mainnet App URL (Must be unique)
  3. Generate a New API Key (Testnet keys won't work)
  4. Launch and Test!

3. Special Considerations

⚠️ **GitHub.com Fallback** ⚠️