mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-05-10 16:22:38 +02:00
test: Add Vitest configuration and initial tests for the DexScreener connect form.
This commit is contained in:
parent
828d7d695a
commit
fd9eddf7fa
11 changed files with 1480 additions and 116 deletions
|
|
@ -6,7 +6,7 @@
|
|||
**Story Title**: DexScreener Connector Integration
|
||||
**Epic**: SurfSense Connectors Enhancement
|
||||
**Priority**: High
|
||||
**Status**: Ready for Development
|
||||
**Status**: ✅ Implementation Complete (2026-02-01)
|
||||
**Created**: 2026-01-31
|
||||
|
||||
## 🎯 User Story
|
||||
|
|
@ -27,63 +27,63 @@ This connector will integrate with SurfSense's existing connector architecture,
|
|||
|
||||
## ✅ Acceptance Criteria
|
||||
|
||||
### AC1: Connector Configuration
|
||||
- [ ] User can add DexScreener connector via API endpoint
|
||||
- [ ] User can configure multiple tokens to track (up to 50)
|
||||
- [ ] Each token config includes: chain ID, token address, optional name
|
||||
- [ ] User can update connector configuration
|
||||
- [ ] User can delete connector
|
||||
- [ ] Configuration is persisted in database
|
||||
### AC1: Connector Configuration ✅
|
||||
- [x] User can add DexScreener connector via API endpoint
|
||||
- [x] User can configure multiple tokens to track (up to 50)
|
||||
- [x] Each token config includes: chain ID, token address, optional name
|
||||
- [x] User can update connector configuration
|
||||
- [x] User can delete connector
|
||||
- [x] Configuration is persisted in database
|
||||
|
||||
### AC2: API Integration
|
||||
- [ ] Connector successfully calls DexScreener API endpoints
|
||||
- [ ] Handles rate limits (300 req/min) appropriately
|
||||
- [ ] Implements retry logic with exponential backoff
|
||||
- [ ] Validates API responses
|
||||
- [ ] Handles API errors gracefully (network failures, invalid data, etc.)
|
||||
### AC2: API Integration ✅
|
||||
- [x] Connector successfully calls DexScreener API endpoints
|
||||
- [x] Handles rate limits (300 req/min) appropriately
|
||||
- [x] Implements retry logic with exponential backoff
|
||||
- [x] Validates API responses
|
||||
- [x] Handles API errors gracefully (network failures, invalid data, etc.)
|
||||
|
||||
### AC3: Data Indexing
|
||||
- [ ] Fetches trading pairs for all configured tokens
|
||||
- [ ] Converts pair data to markdown format with all key metrics:
|
||||
### AC3: Data Indexing ✅
|
||||
- [x] Fetches trading pairs for all configured tokens
|
||||
- [x] Converts pair data to markdown format with all key metrics:
|
||||
- Token information (names, symbols, addresses)
|
||||
- Price data (USD, native, 24h changes)
|
||||
- Volume metrics (24h, 6h, 1h)
|
||||
- Liquidity information
|
||||
- Market cap and FDV
|
||||
- Transaction counts
|
||||
- [ ] Generates unique identifier hash for each pair
|
||||
- [ ] Generates content hash to detect changes
|
||||
- [ ] Creates document chunks for vector search
|
||||
- [ ] Generates embeddings using configured LLM
|
||||
- [ ] Stores documents in database with proper metadata
|
||||
- [ ] Updates existing documents when content changes
|
||||
- [ ] Skips unchanged documents
|
||||
- [x] Generates unique identifier hash for each pair
|
||||
- [x] Generates content hash to detect changes
|
||||
- [x] Creates document chunks for vector search
|
||||
- [x] Generates embeddings using configured LLM
|
||||
- [x] Stores documents in database with proper metadata
|
||||
- [x] Updates existing documents when content changes
|
||||
- [x] Skips unchanged documents
|
||||
|
||||
### AC4: Periodic Indexing
|
||||
- [ ] Indexing task is registered with Celery
|
||||
- [ ] Periodic scheduler triggers indexing (default: 60 min interval)
|
||||
- [ ] Manual indexing can be triggered via API
|
||||
- [ ] Last indexed timestamp is updated after successful indexing
|
||||
- [ ] Indexing errors are logged properly
|
||||
- [ ] Failed indexing doesn't block future attempts
|
||||
### AC4: Periodic Indexing ✅
|
||||
- [x] Indexing task is registered with Celery
|
||||
- [x] Periodic scheduler triggers indexing (default: 60 min interval)
|
||||
- [x] Manual indexing can be triggered via API
|
||||
- [x] Last indexed timestamp is updated after successful indexing
|
||||
- [x] Indexing errors are logged properly
|
||||
- [x] Failed indexing doesn't block future attempts
|
||||
|
||||
### AC5: Search Integration
|
||||
- [ ] Indexed DexScreener data appears in search results
|
||||
- [ ] Documents are searchable by:
|
||||
### AC5: Search Integration ✅
|
||||
- [x] Indexed DexScreener data appears in search results
|
||||
- [x] Documents are searchable by:
|
||||
- Token names and symbols
|
||||
- Pair addresses
|
||||
- Chain IDs
|
||||
- DEX names
|
||||
- Price ranges
|
||||
- Volume metrics
|
||||
- [ ] Search results include relevant metadata
|
||||
- [ ] Vector search returns semantically similar pairs
|
||||
- [x] Search results include relevant metadata
|
||||
- [x] Vector search returns semantically similar pairs
|
||||
|
||||
### AC6: AI Chat Integration
|
||||
- [ ] AI chat can access DexScreener data as context
|
||||
- [ ] Chat responses include relevant trading pair information
|
||||
- [ ] Citations link to DexScreener URLs
|
||||
- [ ] Metadata is properly formatted in chat responses
|
||||
### AC6: AI Chat Integration ✅
|
||||
- [x] AI chat can access DexScreener data as context
|
||||
- [x] Chat responses include relevant trading pair information
|
||||
- [x] Citations link to DexScreener URLs
|
||||
- [x] Metadata is properly formatted in chat responses
|
||||
|
||||
## 🏗️ Technical Implementation
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue