Your mobile-first social finance hub - Manage money, track habits, and make predictions with friends using USDC on Movement Network.
- Create and wager on predictions within groups
- Proportional payouts
- Encrypted bet details for privacy
- Bet admin controlled settlement
- Split bills and expenses within friend groups
- Track who owes what in real-time
- Settle up with instant USDC transfers
- Full transaction history
- Create personal goals and habits
- Stake USDC to stay accountable
- Friends can verify your progress
- Get your stake back when you succeed
- Mobile-First: Optimized for on-the-go use
- Private & Secure: On-chain encryption for sensitive data
- No Gas Fees: All transaction costs covered by Shinami Gas Station
- USDC Only: Stable currency for all interactions
- Social by Default: Everything happens within friend groups
- Frontend: Next.js 15 + React + TypeScript
- Styling: Tailwind CSS
- Authentication: WebAuthn biometric authentication
- Blockchain: Movement Bardock Testnet
- Smart Contracts: Move language
- Database: Supabase (for off-chain indexing)
- Mobile: Progressive Web App (PWA) with biometric support
- Gas Sponsorship: Transaction fees covered by Shinami Gas Station
- Node.js 18+
- npm or yarn
- Clone the repository:
git clone <your-repo-url>
cd friend-fi- Install dependencies:
npm install- Set up environment variables:
cp .env.example .env.local-
Configure Supabase (Optional, for off-chain indexing):
- Create a project at supabase.com
- Copy your project URL and anon key
- Add them to
.env.local:
NEXT_PUBLIC_SUPABASE_URL=your_supabase_url NEXT_PUBLIC_SUPABASE_ANON_KEY=your_anon_key -
Configure Backend Signer (For signature authentication):
- Generate a keypair for backend signing:
npm run generate-keypair
- Add the private key to
.env.local:
BACKEND_SIGNER_PRIVATE_KEY=your_generated_private_key -
Run the development server:
npm run devFriend-Fi is a Progressive Web App (PWA) and can be installed on mobile devices:
- Open the app in Safari
- Tap the Share button
- Scroll down and tap "Add to Home Screen"
- Tap "Add"
- Open the app in Chrome
- Tap the three dots menu
- Tap "Add to Home Screen"
- Tap "Add"
Once installed, you can use biometric authentication (Face ID, Touch ID, fingerprint) for secure access.
src/
├── app/ # Next.js App Router pages
│ ├── page.tsx # Splash/landing page
│ ├── dashboard/ # Main dashboard hub
│ ├── groups/
│ │ ├── create/ # Create new group
│ │ ├── join/ # Join existing group
│ │ └── [id]/ # Group details & management
│ ├── expenses/ # Expense splitting
│ ├── accountability/ # Habit tracking
│ ├── bets/ # Private predictions
│ │ ├── create/ # Create new prediction
│ │ └── [id]/ # View/wager on prediction
│ ├── leaderboard/ # Group leaderboard
│ ├── transactions/ # Transaction history
│ └── settings/ # User settings
├── components/
│ ├── layout/ # Layout components (Sidebar, MobileNav)
│ ├── providers/ # React context providers
│ └── ui/ # Reusable UI components
└── lib/ # Utilities and blockchain integration
├── contract.ts # Smart contract interactions
├── move-wallet.ts # Wallet management
├── biometric-wallet.ts # Mobile biometric auth
└── supabase.ts # Database client
The app uses Move smart contracts deployed on Movement Bardock Testnet:
- private_prediction_refactored.move - Encrypted prediction markets
- expense_splitting.move - Bill splitting and settlement
- habit_tracker.move - Habit staking and verification
- signature_auth.move - Secure authentication system for off-chain groups
- test_usdc.move - Test USDC token for development
The app is configured for Movement Bardock Testnet:
- Chain ID: 30732
- RPC URL: https://testnet.bardock.movementlabs.xyz
- Explorer: https://explorer.movementlabs.xyz
- Login - Sign in with biometric authentication (Face ID, Touch ID, or fingerprint)
- Create Wallet - Your Move wallet is created and secured with biometrics
- Create/Join Group - Set up a private group with ID + password
- Fund Wallet - Get test USDC for the testnet
- Choose Your Feature - Expenses, habits, or predictions
- Create an expense (dinner, rent, trip, etc.)
- Add group members as participants
- System calculates splits automatically
- Members pay their share directly
- View balance and transaction history
- Create a habit/goal with a deadline
- Stake USDC as commitment
- Work on your habit
- Submit proof when complete
- Friends verify your completion
- Get your stake back (or lose it if you fail)
- Propose a prediction question
- Group members bet USDC on Yes/No
- Wait for the event to resolve
- Admin declares the outcome
- Winners collect proportional payouts
- End-to-end encryption for sensitive group data using group passwords
- On-chain privacy ensures bet details and expenses remain confidential
- Non-custodial wallets - you always control your funds
- Biometric authentication for mobile security (optional)
# Run dev server
npm run dev
# Build for production
npm run build
# Run linting
npm run lint
# Deploy smart contracts
cd move_contracts
./deploy_all.sh
# Mint test USDC
./mint_test_usdc.sh <your_address> <amount>The app includes several test pages for development:
/demo-selector- Choose which feature to demo/demo-expenses- Test expense splitting/demo-habits- Test habit tracking/demo-predictions- Test predictions/debug- Blockchain debugging tools
Contributions are welcome! Please feel free to submit a Pull Request.
For questions or issues:
- Open an issue on GitHub
- Check existing documentation in the repo
- Review the smart contract code in
move_contracts/sources/
MIT