Skip to content
cordyStackXPublic

About

Manage wallet activity, BOT Chain Bot Accounts, market signals, and paper or live trades in one place.

Topics

Resources

Security policy

Stars

1 star

Watchers

0 watching

Forks

Repository files navigation

Otterpie

A wallet that shows where the money goes. Otterpie combines wallet balances and activity with category planning, friends, and network-specific tools. It supports BOT Chain Mainnet, Stellar Mainnet, and an opt-in Stellar Testnet mode.

Early alpha: Otterpie is experimental and may change, be unavailable, or show incomplete information. Mainnet swaps, withdrawals, and bridge transfers move real assets and may incur network or bridge fees. Start with amounts you can afford to lose, and check every network, token, amount, and address before approving a transaction.

License: Apache-2.0 Built with Next.js Stellar Mainnet BOT Chain Mainnet


The problem

Money often has different purposes: saving for a goal, setting aside rent, managing trading funds, or covering everyday spending. When everything sits together in one wallet, it can be hard to tell how much is available for each purpose and where the money went. People end up reviewing transactions and tracking those amounts by hand.

What Otterpie does

Users can check balances, review transactions, send supported assets, and organize funds into categories they define themselves. Categories show planned shares and goals; they do not move or lock funds. The dashboard and category view follow the selected network and asset.

BOT Chain supports swaps among BOT, PIE, and USDT, plus configured USDT bridge routes. Stellar Mainnet supports XLM and USDT0, Stellar swaps, and a configured USDT0 bridge flow. Stellar Testnet reuses the managed Stellar wallet address and key, but its balances, trustlines, and transactions are separate from Mainnet; it supports test XLM and test USDC. Friends can discover each other by wallet identity and send supported assets when the wallets are on compatible networks.

The Trade, AI Trade, NFT Market, and P2P pages currently shown under Features are under development and do not yet provide those services.

The goal is a clearer picture of your money: what came in, what went out, how much is available, and how funds are set aside for different plans.

BOT Chain and Stellar wallets use different address formats and signing systems. Stellar Testnet is a network selection for an existing Stellar wallet, not a separately generated account. The Settings page can switch the Stellar wallet between Mainnet and Testnet; always check the selected network before signing. Categories are stored separately by asset/network, including PIE, Stellar Testnet USDC, and Stellar Mainnet USDT0.

Wallet and transaction model

WalletConnect and Freighter can connect an EVM or Stellar wallet in the browser. Wallet connection is not app sign-in and does not authorize server operations. App sessions and wallet-auth endpoints have been removed. User-specific server APIs currently fail closed until per-request wallet authorization is added. The app also contains managed-wallet functionality; those server-signed operations must remain unavailable without server-side authorization.

Bridge completion can take time and depends on the bridge contracts, validators, destination network, and wallet provider. Transfers may fail or be delayed. Confirmed blockchain transactions generally cannot be reversed. Check the in-app quote and current official bridge information before sending.

Supported networks

Network Environment Wallet support
Stellar Mainnet (horizon.stellar.org) Stellar wallet, XLM and USDT0, balances, activity, swaps, and configured USDT0 bridge
Stellar Testnet (horizon-testnet.stellar.org) Same Stellar address/key as Mainnet; separate test balances, XLM, USDC, and swaps; no bridge
BOT Chain Mainnet (Chain ID 677) WalletConnect identity linked to an Otterpie-managed EVM wallet; BOT/PIE/USDT balances, activity, swaps, and configured USDT bridge
Ethereum Mainnet (Chain ID 1) External EVM wallet for USDT bridging
BNB Smart Chain Mainnet (Chain ID 56) External EVM wallet for USDT bridging
Tron Mainnet External TronLink wallet for USDT bridging

Bridge availability depends on the selected source and destination route shown in the app. Stellar Testnet is not bridged. Testnet assets have no intended real-world value; Friendbot funds test XLM only.

Friends and categories

  • Friends: Add an Otterpie account by its connected wallet address, view its public managed-wallet address, search the friend list, and send supported assets when the two accounts use compatible networks.
  • Categories: Category allocations are planning data stored separately from funds. The Supabase categories table needs JSONB columns used by the selected assets, including category_pie, category_stellar_usdc, and category_stellar_usdt0 in addition to the default category column. Ensure these columns exist in your Supabase schema before enabling the corresponding category views.

Tech stack

Layer Tech
Frontend Next.js (App Router), TypeScript, Tailwind CSS v4
Backend Next.js API routes
Database Supabase (self-hosted via Docker) — Postgres under the hood
Wallet access Browser wallet connection through Cordy Minikit; no app login or server session
Wallets and chain access Stellar SDK (@stellar/stellar-sdk), ethers v6, Stellar Horizon, BOT Chain RPC and explorer
Package manager pnpm

Project structure

src/
├── app/                         # Next.js pages, layouts, global styles, and route handlers
│   ├── (pages)/                 # Grouped website pages; this folder is omitted from page URLs
│   │   ├── auth/                # Signup, login, password recovery, and email confirmation pages
│   │   ├── privacy/             # Privacy policy page
│   │   ├── terms/               # Terms of service page
│   │   └── user/                # Dashboard, categories, settings, and transaction pages
│   ├── page.tsx                 # Public landing page
│   └── services/                # Server API endpoints
│       ├── supabase/            # Auth, user, category, balance, history, and bridge endpoints
│       ├── withdraw/            # Stellar and BOT Chain withdrawal endpoints
├── components/                  # React UI grouped by feature
│   ├── auth/                    # Signup, login, reset, and forgot-password forms
│   ├── landpage/                # Landing page sections
│   ├── layout/                  # Shared navigation and sidebar
│   ├── legal/                   # Shared legal document layout
│   ├── ui/                      # Reusable buttons, fields, logos, and other UI elements
│   └── user/                    # Dashboard, categories, settings, and transactions UI
├── config/                      # Theme variables and site metadata
├── firewall/                    # Request security, rate limits, and encryption
├── lib/                         # Server-side clients and wallet creation
├── modules/                     # Shared module exports and feature integrations
├── routes/                      # JSON route maps used by the frontend
├── types/                       # Shared TypeScript declarations
└── utilities/                   # Fetch helpers, analytics, SEO, and metadata utilities

Getting started

Prerequisites

  • Node.js
  • pnpm
  • Docker (for the self-hosted Supabase project in supabase-project)

1. Clone the repository

git clone https://github.com/cordyStackX/otterpie.git
cd otterpie

2. Generate local security keys

Run the setup script from the project root:

bash setup.sh --keys-only

It creates or updates .env with strong random values for API_KEY, WALLET_BANK_KEY, WALLET_BANK_KEY_1, and WALLET_BANK_KEY_2. Existing non-empty values are kept, and generated secrets are not printed to the terminal.

Then edit .env and add your service configuration:

# Supabase (server)
SUPABASE_URL=http://localhost:8000
SUPABASE_SECRET_KEY=your_secret_key

# Supabase (client)
NEXT_PUBLIC_SUPABASE_URL=http://localhost:8000
NEXT_PUBLIC_SUPABASE_PUBLISHABLE_KEY=your_publishable_key

# App URLs (use your production URL in deployment settings)
APP_URL=http://localhost:3000
NEXT_PUBLIC_APP_URL=http://localhost:3000

# WalletConnect (required for EVM wallet connection)
NEXT_PUBLIC_WALLETCONNECT_PROJECT_ID=your_reown_project_id

# Optional network endpoint overrides; defaults point to the public mainnets
# STELLAR_HORIZON_URL=https://horizon.stellar.org
# BOT_CHAIN_RPC_URL=https://rpc.botchain.ai
# BOT_CHAIN_EXPLORER_API_URL=https://scan.botchain.ai/api

Wallet connection currently runs in the browser only. It does not authenticate calls to user-specific APIs. Those endpoints deliberately return 401 until request-level wallet authorization is implemented; do not enable managed-wallet actions for public use in this state.

.env is ignored by Git. For production, add the required values through your hosting provider's encrypted environment settings. Keep the three WALLET_BANK_KEY* values backed up and unchanged after wallet secrets are saved; changing them prevents the app from decrypting those saved secrets. Use the same wallet encryption keys in production that were used to create the stored wallet records.

3. Install, check, build, and start

After .env has your Supabase and wallet-connection settings, run:

bash setup.sh

The full setup installs packages with pnpm install, starts the existing Supabase Docker stack with sh supabase-project/run.sh start, runs pnpm lint and pnpm build, then starts the production server with pnpm start. The Supabase stack reads its own configuration from supabase-project/.env; the root .env contains Otterpie's application settings. Configure both files for your environment. pnpm start stays in the foreground; stop it with Ctrl+C.

supabase-project/setup.sh is the Supabase project's bootstrap script for preparing a new deployment. For this already-configured project, use supabase-project/run.sh start to start its containers; the root setup.sh calls that command for you.

To run the development server with hot reload instead:

pnpm dev

Removing beta server assignment

Wallet login no longer displays or assigns a beta server. Existing tbl_auth.server assignments and the otterpie_auth_servers configuration are backed up, then removed by supabase/migrations/20261105000300_auth_server_capacity_removal.sql. Apply this migration in the self-hosted Supabase SQL Editor after deploying the code that no longer calls the beta-server RPC. The backup tables created by the migration are otterpie_auth_server_assignments_backup and otterpie_auth_servers_removal_backup; keep them if you may need the old assignments. The migration also removes assign_tbl_auth_server RPC overloads. To restore the old feature, restore those backups and redeploy the old app code, then recreate the server table/function from your saved migration or database backup.

Design

  • Colors: ocean blue primary (#0077b6), light aqua secondary (#90e0ef) — defined once in config/css/var.css and wired into Tailwind v4 via @theme inline.
  • Auth screens: a clean, trust-forward card — the kind of look a financial app needs before it earns the right to be playful.
  • Mascot: an otter, dividing every payment like slices of a pie.

Roadmap

Early alpha milestones

  • Deploy the PIE token on BOT Chain.
  • Add initial liquidity to the PIE/BOT pool.
  • Implement BOT Chain swaps for BOT, PIE, and USDT pairs supported by the app.
  • Support USDT bridging between BOT Chain and Ethereum, BNB Smart Chain, and Tron, with WalletConnect for EVM wallets and TronLink for Tron.

Next

  • Improve alpha reliability and transaction status visibility across swaps and bridge transfers.
  • Continue refining the wallet and bridge experience based on alpha feedback.

Features, networks, fees, and availability may change during alpha. Swaps and bridge transfers depend on liquidity, contract state, and third-party networks; displayed prices and balances may be delayed or incomplete. Review the current quote, route, network, and recipient before signing. Stellar Mainnet bridge support is limited to the configured USDT0 route; Stellar Testnet is not supported for bridging.

For the bridge provider's current fees, minimums, and contract details, see the official BOT Chain bridge documentation.

License

This project is released under the Apache License 2.0. See LICENSE for the full text.

Contributors

About

Manage wallet activity, BOT Chain Bot Accounts, market signals, and paper or live trades in one place.

Topics

Resources

Security policy

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages