Skip to content

Latest commit

History

861 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

Seamless Protocol Frontend

A decentralized frontend application for Seamless Protocol - a DeFi protocol that wraps complex leverage strategies into simple ERC-20 tokens.

Overview

This is a fully client-side application built for IPFS deployment, requiring no server infrastructure. The app provides a user-friendly interface for interacting with Seamless Protocol's leverage tokens, vaults, and governance features.

Tech Stack

  • Framework: React 18 + TypeScript + Vite
  • Blockchain: Wagmi v2 + Viem + RainbowKit
  • Styling: Tailwind CSS v4 + ShadCN UI
  • Routing: TanStack Router (hash routing for IPFS)
  • Data Fetching: TanStack Query
  • Package Manager: Bun
  • Code Quality: Biome + TypeScript strict mode

Getting Started

Prerequisites

  • Bun 1.2.20+ (required)
  • Node.js 18+ (for some tooling)

Installation

# Clone the repository
git clone git@github.com:seamless-protocol/app.git
cd app
# Install dependencies
bun install
# Copy environment variables
cp .env.example .env

Development

# Start development server
bun dev
# Run code checks and auto-fix
bun check:fix
# Build for production
bun build
# Preview production build
bun preview

Development Phases

The application is structured for incremental releases:

  1. Phase 1: Foundation & Infrastructure ✅
  2. Phase 2: Leverage Tokens (in progress)
  3. Phase 3: User Dashboard
  4. Phase 4: Morpho Vaults
  5. Phase 5: Staking
  6. Phase 6: Governance
  7. Phase 7: Advanced Features

Project Structure

src/
├── components/ui/ # ShadCN UI components
├── features/ # Phase-based feature modules
├── hooks/ # Custom React hooks
├── lib/ # Core utilities and configs
│ ├── config/ # Chain and protocol configs
│ ├── contracts/ # ABIs and addresses
│ └── utils/ # Helper functions
├── routes/ # Application pages
└── types/ # TypeScript definitions

Environment Variables

Setup

# Copy the example file
cp .env.example .env.local
# Edit .env.local with your values

Required Variables

These must be set for the application to start:

VariableDescriptionExample
VITE_WALLETCONNECT_PROJECT_IDWalletConnect Cloud project IDGet from cloud.walletconnect.com
VITE_BASE_RPC_URLBase network RPC endpointhttps://mainnet.base.org
VITE_ETHEREUM_RPC_URLEthereum mainnet RPChttps://eth.llamarpc.com

Optional Variables

VariableDescriptionDefault
VITE_SENTRY_DSNError trackingNone
VITE_ENABLE_LEVERAGE_TOKENSFeature flagfalse
VITE_ENABLE_VAULTSFeature flagfalse
VITE_ENABLE_STAKINGFeature flagfalse
VITE_ENABLE_GOVERNANCEFeature flagfalse

Contract Addresses

The app includes pre-configured contract addresses for Seamless Protocol on Base network. See .env.example for the complete list of available contract configurations.

Environment Validation

The app validates required environment variables on startup. If any are missing:

  • Development: Shows an error banner with missing variables
  • Production: Logs to console and prevents app from starting

See .env.example for the complete configuration reference.

Scripts

CommandDescription
bun devStart development server
bun buildBuild for production
bun checkRun linter and type checker
bun check:fixAuto-fix issues and type check
bun formatFormat code with Biome

Deployment

The application is built for IPFS deployment:

  1. Build creates a static bundle with relative paths
  2. Hash routing ensures all routes work without a server
  3. All data fetching happens client-side
# Build for IPFS
bun build
# Deploy dist/ folder to IPFS

Documentation

Contributing

Please ensure all code passes checks before submitting PRs:

bun check:fix

Testing Deployment

Minimal test added 2025-08-25 to verify Vercel deployment access.

License

[License details to be added]

About

Complex Defi wrapped into simple tokens

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages