Insight is a professional oracle data analytics platform that provides comprehensive analysis and comparison of mainstream oracle protocols including Chainlink, Pyth, API3, RedStone, DIA, WINkLink, Supra, TWAP, Reflector, and Flare.
- Real-time Price Monitoring - Live price feeds from multiple oracle providers with real-time updates
- Cross-Oracle Price Comparison - Compare prices across different oracles for the same asset
- Cross-Chain Performance Analysis - Analyze oracle performance across multiple blockchain networks
- Price Alerts & Notifications - Configure custom price alerts with multiple trigger conditions
- User Favorites & Snapshots - Save and share price snapshots and favorite configurations
- Data Export - Export data in CSV, JSON, Excel, PDF, and PNG formats
- Anomaly Detection - Automatic detection of price anomalies and outliers
- Technical Indicators - RSI, MACD, Bollinger Bands, ATR, and more
- Data Transparency - Data source indicators and update time tracking
- Accessibility Support - Keyboard navigation, colorblind mode, screen reader support
- Framework: Next.js 16.1.6 (App Router)
- UI Library: React 19.2.3
- Language: TypeScript 5.x
- Styling: Tailwind CSS 4.x
- State Management: React Query 5.99.0, Zustand 5.0.11
- Charts: Recharts 3.8.0
- Animations: Framer Motion 12.36.0
- API: Next.js API Routes
- Database: Supabase 2.98.0 (PostgreSQL with Row Level Security)
- Authentication: Supabase Auth with OAuth support
- Real-time: WebSocket, Supabase Realtime
- Error Tracking: Sentry 10.43.0
- Pyth Hermes Client (
@pythnetwork/hermes-client2.0.0) - API3 Contracts (
@api3/contracts27.0.0) - Custom oracle clients for all supported providers (Chainlink, Pyth, API3, RedStone, DIA, WINkLink, Supra, TWAP, Reflector, Flare)
- Supra Oracle SDK (
supra-oracle-sdk1.0.4) - Stellar SDK (
@stellar/stellar-sdk15.0.1) - TWAP On-Chain Service (Uniswap V3 TWAP via direct RPC calls)
- Reflector On-Chain Service (Stellar Soroban smart contracts)
- Flare FTSO Service (Flare Time Series Oracle)
- Node.js 18.x or higher
- npm or yarn
- Supabase account (for database and authentication)
-
Clone the repository:
git clone <repository-url> cd insight
-
Install dependencies:
npm install
-
Set up environment variables (see
src/lib/config/env.tsandsrc/lib/config/serverEnv.tsfor reference) -
Run the development server:
npm run dev
| Command | Description |
|---|---|
npm run dev |
Start development server |
npm run build |
Build for production |
npm run start |
Start production server |
npm run lint |
Run ESLint |
npm run lint:fix |
Run ESLint with auto-fix |
npm run format |
Format code with Prettier |
npm run format:check |
Check code formatting with Prettier |
npm run typecheck |
Run TypeScript type checking |
npm run validate |
Run lint, typecheck, and tests |
npm run test |
Run Jest tests |
npm run test:watch |
Run tests in watch mode |
npm run test:coverage |
Run tests with coverage report |
npm run test:e2e |
Run Playwright E2E tests |
npm run test:e2e:ui |
Run Playwright E2E tests with UI |
npm run clean:dev |
Clean .next and start dev server |
npm run clean:start |
Clean .next, build and start server |
npm run prepare |
Prepare husky git hooks |
insight/
├── src/
│ ├── app/ # Next.js App Router pages and API routes
│ │ ├── alerts/ # Alerts management page
│ │ ├── auth/ # Authentication pages
│ │ │ ├── forgot-password/
│ │ │ ├── resend-verification/
│ │ │ ├── reset-password/
│ │ │ └── verify-email/
│ │ ├── cross-chain/ # Cross-chain analysis page
│ │ ├── cross-oracle/ # Cross-oracle comparison page
│ │ ├── docs/ # Documentation page
│ │ ├── favorites/ # User favorites page
│ │ ├── home-components/ # Homepage components
│ │ ├── login/ # Login page
│ │ ├── price-query/ # Price query page
│ │ ├── register/ # Registration page
│ │ ├── settings/ # User settings page
│ │ ├── api/ # API endpoints
│ │ │ ├── alerts/ # Price alerts API
│ │ │ │ ├── batch/ # Batch alert operations
│ │ │ │ ├── events/ # Alert events API
│ │ │ │ └── [id]/ # Individual alert endpoints
│ │ │ ├── auth/ # Authentication callbacks
│ │ │ ├── favorites/ # User favorites API
│ │ │ ├── health/ # Health check endpoint
│ │ │ ├── oracles/ # Oracle data API
│ │ │ │ └── [provider]/ # Provider-specific endpoints
│ │ │ └── prices/ # Prices API
│ │ ├── error.tsx # Error boundary
│ │ ├── global-error.tsx # Global error handler
│ │ ├── layout.tsx # Root layout
│ │ ├── not-found.tsx # 404 page
│ │ ├── globals.css # Global styles
│ │ └── favicon.ico # Favicon
│ ├── components/ # React components
│ │ ├── accessibility/ # Accessibility components
│ │ ├── alerts/ # Alert components
│ │ ├── charts/ # Chart components
│ │ ├── data-transparency/ # Data transparency components
│ │ ├── error-boundary/ # Error boundary components
│ │ ├── export/ # Export components
│ │ ├── favorites/ # Favorite components
│ │ ├── icons/ # Icon components
│ │ ├── navigation/ # Navigation components
│ │ ├── realtime/ # Real-time components
│ │ ├── search/ # Search components
│ │ ├── settings/ # Settings components
│ │ ├── shortcuts/ # Keyboard shortcuts
│ │ ├── ui/ # Reusable UI components
│ │ │ ├── DataTablePro/ # Advanced data table
│ │ │ └── selectors/ # Selector components
│ │ ├── AppInitializer.tsx # App initializer
│ │ ├── Footer.tsx # Footer component
│ │ ├── Navbar.tsx # Navigation bar
│ │ └── PerformanceMetricsCollector.tsx
│ ├── hooks/ # Custom React hooks
│ │ ├── data/ # Data fetching hooks
│ │ ├── oracles/ # Oracle-specific hooks
│ │ ├── ui/ # UI hooks
│ │ └── utils/ # Utility hooks
│ ├── lib/ # Core libraries
│ │ ├── analytics/ # Analytics utilities
│ │ ├── api/ # API utilities
│ │ │ ├── client/ # API client with interceptors
│ │ │ ├── middleware/ # API middleware (auth, rate limit, validation)
│ │ │ ├── response/ # Response builders
│ │ │ ├── retry/ # Retry logic
│ │ │ ├── validation/ # Validation schemas (Zod)
│ │ │ └── versioning/ # API versioning
│ │ ├── config/ # Configuration files
│ │ ├── constants/ # Application constants
│ │ ├── errors/ # Error handling
│ │ ├── export/ # Data export utilities
│ │ ├── indicators/ # Technical indicators
│ │ ├── monitoring/ # Performance monitoring
│ │ ├── oracles/ # Oracle client implementations
│ │ │ ├── base/ # Base oracle database operations
│ │ │ ├── clients/ # Oracle client implementations
│ │ │ ├── constants/ # Oracle constants
│ │ │ ├── pyth/ # Pyth-specific modules
│ │ │ ├── services/ # Oracle data services
│ │ │ └── utils/ # Oracle utility functions
│ │ ├── realtime/ # WebSocket communication
│ │ ├── security/ # Security utilities
│ │ ├── services/ # External services
│ │ │ └── marketData/ # Market data services
│ │ ├── snapshots/ # Snapshot management
│ │ ├── supabase/ # Supabase client and utilities
│ │ ├── utils/ # Utility functions
│ │ │ └── chartExport/ # Chart export utilities
│ │ └── validation/ # Validation utilities
│ ├── stores/ # Zustand stores
│ │ ├── authStore.ts # Authentication state
│ │ ├── crossChainConfigStore.ts # Cross-chain config state
│ │ ├── crossChainDataStore.ts # Cross-chain data state
│ │ ├── crossChainSelectorStore.ts # Cross-chain selector state
│ │ ├── crossChainUIStore.ts # Cross-chain UI state
│ │ ├── realtimeStore.ts # Real-time data state
│ │ └── uiStore.ts # UI state
│ ├── types/ # TypeScript type definitions
│ │ ├── oracle/ # Oracle types
│ │ ├── api/ # API types
│ │ └── ui/ # UI types
│ └── __mocks__/ # Test mocks
├── public/ # Static assets
│ └── logos/ # Logo assets
│ ├── cryptos/ # Cryptocurrency logos
│ └── oracles/ # Oracle logos
├── next.config.ts # Next.js configuration
├── tsconfig.json # TypeScript configuration
├── jest.config.js # Jest configuration
├── playwright.config.ts # Playwright configuration
├── eslint.config.mjs # ESLint configuration
├── .husky/ # Husky git hooks
└── .trae/rules/ # Trae IDE rules
├── project_rules.md
└── ui-redesign-rules.md
- Supported Chains: Ethereum, Arbitrum, Optimism, Polygon, Avalanche, BNB Chain, Base
- Features: Node analytics, extensive data feeds, high reliability, on-chain data via Chainlink Data Feeds
- Supported Chains: Solana, Ethereum, Arbitrum, Polygon, Avalanche, BNB Chain, Aptos, Sui, Base, Optimism
- Features: Publisher analytics, high-frequency updates, confidence intervals, Pyth Hermes Client integration
- Supported Chains: Ethereum, Arbitrum, Polygon, Avalanche, BNB Chain, Base, Optimism
- Features: First-party oracle, quantifiable security, Airnode deployments, dAPI price feeds
- Supported Chains: Ethereum, Arbitrum, Optimism, Polygon, Avalanche, Base, BNB Chain, Fantom, Linea, Mantle, Scroll, zkSync
- Features: Modular oracle design, data streams, cross-chain support
- Supported Chains: Ethereum, Arbitrum, Polygon, Avalanche, BNB Chain, Base
- Features: Open-source cross-chain oracle, NFT floor price data feeds, transparent methodology, comprehensive token on-chain data (supply, market cap, exchange volume)
- Data Services: DIADataService with dedicated PriceService, NFTService, and NetworkService modules
- Supported Chains: TRON
- Features: TRON ecosystem integration, on-chain contract price fetching, gaming data feeds
- Supported Chains: Ethereum, Arbitrum, Optimism, Polygon, Base, Solana, BNB Chain, Avalanche, zkSync, Scroll, Mantle, Linea
- Features: High-performance oracle with verifiable randomness, cross-chain data feeds, Supra Oracle SDK integration, DORA price feeds
- Supported Chains: Ethereum, Arbitrum, Optimism, Polygon, Base, BNB Chain
- Features: Uniswap V3 Time-Weighted Average Price oracle, on-chain TWAP data from liquidity pools, spot price and TWAP price comparison, confidence scoring based on liquidity and deviation, RPC with automatic fallback and health tracking
- Supported Chains: Stellar
- Features: Stellar ecosystem oracle with Soroban smart contracts, first-party oracle with direct data from source providers, support for both cryptocurrency and forex assets, on-chain data via smart contract calls
- Supported Chains: Flare
- Features: FTSO-based oracle with on-chain data feeds, validator analytics, confidence intervals with real-time bid/ask spreads, first-party oracle secured by Flare network consensus
The application uses Supabase (PostgreSQL) with the following main tables:
user_profiles- User preferences and settingsprice_records- Historical price data from oraclesuser_snapshots- User-saved price snapshotsuser_favorites- User favorite configurationsprice_alerts- Price alert configurationsalert_events- Alert trigger event history
All tables have Row Level Security (RLS) enabled for data protection.
GET /api/auth/callback- OAuth callback handlerGET /api/auth/profile- Get user profilePUT /api/auth/profile- Update user profilePOST /api/auth/delete-account- Delete user account
GET /api/alerts- List user alertsPOST /api/alerts- Create new alertGET /api/alerts/[id]- Get specific alertPUT /api/alerts/[id]- Update alertDELETE /api/alerts/[id]- Delete alertGET /api/alerts/events- List alert eventsPOST /api/alerts/events/[id]/acknowledge- Acknowledge alert eventPOST /api/alerts/batch- Batch alert operations
GET /api/favorites- List user favoritesPOST /api/favorites- Create favoriteGET /api/favorites/[id]- Get specific favoritePUT /api/favorites/[id]- Update favoriteDELETE /api/favorites/[id]- Delete favorite
GET /api/oracles- List all oracle providersPOST /api/oracles- Batch price queryGET /api/oracles/[provider]- Get specific oracle data
GET /api/health- Health check
This project adopts strict code quality standards to ensure maintainability and reliability:
- ESLint: TypeScript ESLint ruleset with strict type checking
- Prettier: Unified code formatting configuration
- TypeScript: Strict type checking configuration (
strict: true) - Naming Conventions: Unified file and variable naming conventions
# Run ESLint check
npm run lint
# Auto-fix ESLint issues
npm run lint:fix
# Run type checking
npm run typecheck
# Run all tests
npm run test
# Run test coverage check
npm run test:coverage
# Run full validation (lint + typecheck + test)
npm run validate- Test Coverage: Target 80%+
- Type Safety: 100% TypeScript coverage
- Lint Pass Rate: Zero errors, minimized warnings
- Build Success Rate: 100%
- Regularly run
npm run validateto ensure code quality - Use
npm run lint:fixto auto-fix formatting issues - Ensure all tests pass before committing
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Ensure code passes all quality checks (
npm run validate) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is private and proprietary.
- Chainlink - Decentralized oracle network
- Pyth Network - High-frequency oracle
- API3 - First-party oracle solution
- RedStone - Modular oracle
- DIA - Open-source oracle
- WINkLink - TRON ecosystem oracle
- Supra - High-performance oracle with verifiable randomness
- TWAP - Uniswap V3 Time-Weighted Average Price oracle
- Reflector - Stellar ecosystem oracle
- Flare - FTSO-based oracle network