π Shipping Excellence Across Borders - Blockchain-based trade finance platform connecting exporters, investors, and administrators
SEATrax is a blockchain platform that revolutionizes trade finance by tokenizing shipping invoices as NFTs and enabling decentralized funding through investor pools. The platform provides a secure, transparent, and efficient way for exporters to access immediate liquidity while offering investors attractive returns on trade finance investments.
- Exporters submit shipping invoices and receive up to 70-100% advance funding
- Investors browse curated invoice pools and invest to earn 4% returns
- Admin verifies exporters, approves invoices, and manages investment pools
- Smart Contracts automate fund distribution, payments, and profit sharing
- Blockchain ensures transparency, immutability, and trust
- β Invoice Tokenization: Convert shipping invoices into NFTs
- β Instant Liquidity: Access funds when invoices reach 70% funding
- β Document Storage: Secure IPFS-based document management via Pinata
- β Real-time Tracking: Monitor funding progress and payment status
- β Automatic Withdrawal: Seamless fund withdrawal to wallet
- β Curated Pools: Browse admin-verified investment opportunities
- β Risk Assessment: View pool risk categories and invoice details
- β Guaranteed Returns: Earn 4% yield on successful settlements
- β Portfolio Tracking: Monitor active investments and claimed returns
- β Transparent Metrics: Real-time pool performance analytics
- β User Verification: Approve exporter applications with KYC data
- β Invoice Review: Validate and approve submitted invoices
- β Pool Creation: Curate invoice pools for investor funding
- β Payment Confirmation: Verify importer payments via oracle
- β Platform Analytics: Monitor platform-wide metrics and performance
- β Unified Contract: Single SEATrax smart contract with all functionality
- β Hybrid Sync System: Smart contract authority + Supabase metadata
- β Responsive Design: Mobile-first UI with adaptive components
- β Error Handling: Comprehensive error boundaries and recovery
- β Security: Production-grade headers, env validation, role guards
- β Real-time Conversion: USD β ETH via CurrencyFreaks API
- Exporter creates shipping invoice with documents
- Admin verifies and approves invoice
- Admin creates investment pool with approved invoices
- Investors fund the pool with ETH
- Exporter withdraws funds when pool reaches 70%+ funding
- Importer pays invoice after shipment
- Investors claim 4% returns after payment confirmation
- 70% Threshold: Exporters can withdraw when invoice is 70%+ funded
- Auto-Distribution: Funds automatically distributed at 100% pool funding
- Returns: 4% to investors, 1% platform fee
- Minimum Investment: 1000 tokens per pool
- Framework: Next.js 15 with App Router
- Language: TypeScript 5
- Styling: Tailwind CSS 4
- UI Components: shadcn/ui (Radix UI primitives)
- Icons: Lucide React
- State Management: React Hooks & Context
- Network: Lisk Sepolia Testnet
- Wallet Integration: Panna SDK (for users), MetaMask (for admin)
- Smart Contract Interaction: Thirdweb SDK
- Smart Contract: Unified SEATrax contract (all-in-one architecture)
- Repository: github.com/SEATrax/smart-contract
- Contract Address: 0x561D0d...1F233E
- Deployed: January 12, 2026
- Features: Role management, invoice NFTs, pool NFTs, investment tracking, payment oracle, platform analytics
- Database: Supabase (PostgreSQL)
- File Storage: Pinata (IPFS)
- Currency API: CurrencyFreaks (USD β ETH)
- Package Manager: npm
- Linting: ESLint
- Type Checking: TypeScript Compiler
- Build Tool: Next.js
SEATrax uses a single unified smart contract that handles all platform functionality:
- Contract Address:
0x561D0d65160B6E57FAa6a0a9e9C05deCEB1F233E - Network: Lisk Sepolia Testnet
- Deployed: January 12, 2026
- Verified: β Yes
| Module | Functionality |
|---|---|
| Role Management | Admin, Exporter, Investor roles with access control |
| Invoice NFT | ERC-721 tokenization of shipping invoices |
| Pool NFT | ERC-721 tokenization of investment pools |
| Investment Tracking | On-chain record of investor contributions |
| Payment Oracle | Importer payment verification |
| Platform Analytics | Real-time metrics and statistics |
// Invoice Management
createInvoice(company, importer, email, amount, loan, date, ipfsHash)
approveInvoice(invoiceId)
withdrawFunds(invoiceId)
// Pool Management
createPool(name, invoiceIds, startDate, endDate)
invest(poolId) payable
claimReturns(poolId)
// Payment & Distribution
markInvoicePaid(invoiceId)
distributeProfits(poolId)Before starting, ensure you have:
- β Node.js 18+ installed (Download)
- β npm or yarn package manager
- β Wallet (MetaMask or compatible EVM wallet)
- β Lisk Sepolia ETH (Get from faucet)
git clone https://github.com/seatrax/apps.git
cd appsnpm installcp .env.example .env.localEdit .env.local with your configuration (see Environment Configuration section below).
Run the SQL migration in your Supabase SQL Editor:
cat supabase/migrations/*.sql | pbcopy # Copy SQL
# Then paste in Supabase SQL Editor and runOr use the migration script:
chmod +x scripts/apply-migrations.sh
./scripts/apply-migrations.shnpm run devOpen http://localhost:3000 in your browser.
- Connect Wallet: Use MetaMask or compatible wallet
- Get Test ETH: Get Lisk Sepolia ETH from faucet
- Select Role: Choose Exporter, Investor, or Admin
- Complete Onboarding: Fill required profile information
- Start Using: Create invoices, invest in pools, or manage platform
apps/
βββ src/
β βββ app/ # Next.js App Router
β β βββ (auth)/login/ # Role selection & wallet connection
β β βββ onboarding/ # User registration flows
β β β βββ exporter/ # Exporter onboarding
β β β βββ investor/ # Investor onboarding
β β βββ exporter/ # Exporter features (5 pages)
β β β βββ page.tsx # Dashboard
β β β βββ invoices/ # Invoice management
β β β β βββ page.tsx # Invoice list
β β β β βββ new/ # Create invoice
β β β β βββ [id]/ # Invoice detail
β β β βββ payments/ # Payment tracking
β β βββ investor/ # Investor features (5 pages)
β β β βββ page.tsx # Dashboard
β β β βββ pools/ # Pool browsing
β β β β βββ page.tsx # Pool list
β β β β βββ [id]/ # Pool detail & invest
β β β βββ investments/ # Portfolio tracking
β β β βββ returns/ # Claim returns
β β βββ admin/ # Admin features (7 pages)
β β β βββ page.tsx # Dashboard
β β β βββ roles/ # Role management
β β β βββ invoices/ # Review invoices
β β β β βββ [id]/ # Invoice review detail
β β β βββ pools/ # Pool management
β β β β βββ new/ # Create pool (with autofill)
β β β β βββ [id]/ # Pool detail
β β β βββ payments/ # Payment confirmation
β β β βββ health/ # Data health monitor
β β βββ pay/[invoiceId]/ # Public payment page (importer)
β β βββ api/ # API routes
β β βββ currency/ # USD β ETH conversion
β β βββ payment/ # Payment processing
β βββ components/
β β βββ ui/ # shadcn/ui components (40+)
β β βββ common/ # Shared components
β β β βββ Logo.tsx # Brand logo (responsive)
β β β βββ ErrorBoundary.tsx # Error handling
β β β βββ ErrorMessage.tsx # Error display
β β β βββ Skeleton.tsx # Loading states
β β β βββ MobileNav.tsx # Mobile navigation
β β β βββ ResponsiveTable.tsx
β β βββ invoice/ # Invoice components
β β βββ pool/ # Pool components
β βββ hooks/ # Custom React hooks
β β βββ useAccessControl.ts # Role management
β β βββ useInvoiceNFT.ts # Invoice operations
β β βββ usePoolNFT.ts # Pool operations
β β βββ usePoolFunding.ts # Investment logic
β β βββ usePaymentOracle.ts # Payment verification
β β βββ usePlatformAnalytics.ts # Metrics
β β βββ useTransaction.ts # Transaction management
β β βββ usePanna.ts # Wallet connection
β β βββ use-toast.tsx # Toast notifications
β βββ lib/
β β βββ contract.ts # Contract ABIs & addresses
β β βββ currency.ts # Currency conversion
β β βββ supabase.ts # Database client
β β βββ pinata.ts # IPFS upload
β β βββ env.ts # Environment validation
β β βββ utils.ts # Utilities
β βββ providers/ # Context providers
β βββ config/ # App configuration
β βββ types/ # TypeScript types
βββ supabase/
β βββ migrations/ # Database migrations
β βββ config.toml # Supabase config
βββ public/ # Static assets
β βββ navbar.png # Logo for navigation (720x183)
β βββ logo.png # Logo for hero (767x363)
β βββ icon.png # Square icon (840x848)
β βββ favicon.png # Browser favicon (1200x1200)
βββ scripts/ # Utility scripts
β βββ apply-migrations.sh # Database setup
β βββ check-db.sh # Verify database
βββ .github/ # Documentation
β βββ copilot-instructions.md # Development guidelines
β βββ implementation-checklist.md # Feature tracking
β βββ plan.md # Development roadmap
β βββ PROJECT_STATUS.md # Current status
β βββ business-process-documentation.md # Business logic
βββ .env.local # Environment variables
βββ package.json # Dependencies
βββ next.config.ts # Next.js config (security headers)
βββ tailwind.config.ts # Tailwind config
βββ tsconfig.json # TypeScript config
Create .env.local file with the following variables:
# ========================
# BLOCKCHAIN CONFIGURATION
# ========================
# Smart Contract Address (Unified SEATrax Contract)
# Deployed: January 12, 2026
# Source: https://github.com/seatrax/smart-contract
NEXT_PUBLIC_CONTRACT_ADDRESS="0x561D0d65160B6E57FAa6a0a9e9C05deCEB1F233E"
# Network Configuration
NEXT_PUBLIC_CHAIN_ID=4202
NEXT_PUBLIC_RPC_URL=https://rpc.sepolia-api.lisk.com
# ========================
# WALLET & AUTHENTICATION
# ========================
# Panna SDK (Wallet Provider)
# Sign up: https://panna.io/
NEXT_PUBLIC_PANNA_CLIENT_ID=your_panna_client_id
NEXT_PUBLIC_PANNA_PARTNER_ID=your_panna_partner_id
# ========================
# DATABASE & STORAGE
# ========================
# Supabase (PostgreSQL Database)
# Create project: https://supabase.com/
NEXT_PUBLIC_SUPABASE_URL=https://your-project.supabase.co
NEXT_PUBLIC_SUPABASE_ANON_KEY=your_supabase_anon_key
SUPABASE_SERVICE_KEY=your_supabase_service_key
# Pinata (IPFS Storage)
# Sign up: https://pinata.cloud/
NEXT_PUBLIC_PINATA_GATEWAY=https://gateway.pinata.cloud
PINATA_JWT=your_pinata_jwt_token
# ========================
# EXTERNAL APIS
# ========================
# CurrencyFreaks (USD β ETH Conversion)
# Get API key: https://currencyfreaks.com/
CURRENCY_FREAKS_API_KEY=your_currencyfreaks_api_key
# ========================
# PLATFORM CONFIGURATION
# ========================
# Admin Wallet Addresses (comma-separated, lowercase)
ADMIN_ADDRESSES=0xaddress1,0xaddress2,0xaddress3
# Platform Treasury Address
PLATFORM_TREASURY_ADDRESS=0xyour_treasury_address
# App Settings
NEXT_PUBLIC_APP_NAME=SEATrax
NEXT_PUBLIC_APP_URL=http://localhost:30001. Go to https://supabase.com/ and create account
2. Create new project
3. Go to Settings β API
4. Copy "Project URL" β NEXT_PUBLIC_SUPABASE_URL
5. Copy "anon public" key β NEXT_PUBLIC_SUPABASE_ANON_KEY
6. Copy "service_role" key β SUPABASE_SERVICE_KEY
7. Run migrations (see Getting Started section)1. Go to https://pinata.cloud/ and sign up
2. Go to API Keys β New Key
3. Enable "pinFileToIPFS" permission
4. Generate key
5. Copy JWT token β PINATA_JWT
6. Go to Gateways β Create Gateway
7. Copy gateway URL β NEXT_PUBLIC_PINATA_GATEWAY1. Go to https://currencyfreaks.com/
2. Sign up for free account
3. Get API key from dashboard
4. Copy API key β CURRENCY_FREAKS_API_KEY1. Contact Panna team or use test credentials
2. Get Client ID and Partner ID
3. Copy to NEXT_PUBLIC_PANNA_CLIENT_ID and NEXT_PUBLIC_PANNA_PARTNER_ID# Development
npm run dev # Start dev server
npm run build # Build for production
npm run start # Start production server
npm run lint # Run ESLint
# Database
./scripts/apply-migrations.sh # Setup Supabase
./scripts/check-db.sh # Verify database
# Deployment
npm run build # Build application
vercel --prod # Deploy to VercelLocated in .github/ folder:
- copilot-instructions.md - Development guidelines, architecture patterns, coding conventions
- implementation-checklist.md - Feature implementation tracking, completion status
- plan.md - Development roadmap, priority tasks, timeline
- PROJECT_STATUS.md - Comprehensive project status report, achievements, metrics
- business-process-documentation.md - Business logic, process flows, smart contract integration
Smart contracts are maintained in a separate repository:
- Repository: https://github.com/seatrax/smart-contract
- Contracts: AccessControl, InvoiceNFT, PoolNFT, PoolFundingManager, PaymentOracle, PlatformAnalytics
- Network: Lisk Sepolia Testnet
- Documentation: See smart-contract repository README
// GET /api/currency
// Returns current USD to ETH exchange rate
const response = await fetch('/api/currency');
const { rate, timestamp } = await response.json();// GET /api/payment/[invoiceId]
// Returns payment details for specific invoice
const response = await fetch(`/api/payment/${invoiceId}`);
const { invoice, amountDue, paymentLink } = await response.json();- ErrorBoundary: Catches React errors and displays fallback UI
- ErrorMessage: Formats and displays blockchain error messages
- Skeleton: Loading state placeholders (6 variants)
- TransactionPending: Transaction progress indicators
- MobileNav: Mobile navigation (hamburger + bottom tabs)
- ResponsiveTable: Auto-converts tables to cards on mobile
- Logo: Responsive brand logo (4 variants)
- useSEATrax: Unified hook for all contract interactions (invoices, pools, investments, payments)
- useAdminContract: Admin-specific operations using MetaMask (approve, create pool, distribute)
- useMetaMaskAdmin: Admin wallet connection and network management
- usePanna: User wallet connection and account management (Panna SDK)
- useTransaction: Transaction state management
- useExporterProfile: Exporter registration and profile
- useInvestorProfile: Investor registration and profile
This project is proprietary software developed for SEATrax platform.
- Next.js - React framework
- TypeScript - Type safety
- Tailwind CSS - Styling
- shadcn/ui - UI components
- Lisk - Blockchain platform
- Supabase - Backend infrastructure
- Pinata - IPFS storage
- Thirdweb - Web3 development
Smart contract development and deployment managed separately at: https://github.com/seatrax/smart-contract
- Contract Explorer: View on BlockScout
- Lisk Sepolia Faucet: Get Test ETH
- Network RPC: https://rpc.sepolia-api.lisk.com
MIT License