A comprehensive TypeScript-based log viewer application for analyzing CSV log data with advanced filtering, sorting, and export capabilities.
- š File Upload: Drag-and-drop or click to upload CSV files (up to 50MB)
- š§ Email Filter: Filter logs by email address with autocomplete suggestions
- š Trace ID Filter: Filter logs by data.traceId with autocomplete suggestions
- ā” Real-time Search: Instant filtering as you type
- š Data Export: Export filtered results to CSV format
- š Sorting: Click column headers to sort by any field
- š Pagination: Handle large datasets with configurable page sizes (25/50/100/200)
- š Row Expansion: Click to expand rows and view detailed JSON data
- š Copy to Clipboard: Copy individual trace IDs or full records
- āØļø Keyboard Shortcuts: Efficient navigation with hotkeys
- š± Responsive Design: Works seamlessly on desktop and mobile
- ā ļø Error Handling: Comprehensive error reporting and data validation
- š§ Smart CSV Parsing: Handles both tab-separated and comma-separated values
- š”ļø Data Validation: Validates required columns and data integrity
- š JSON Parsing: Automatically parses JSON data fields with fallback handling
- š Analytics: Track parsing warnings and data quality issues
šļø Project Structure
āāā backend/
ā āāā index.ts # Hono-based HTTP server with file upload handling
āāā frontend/
ā āāā components/
ā ā āāā App.tsx # Main application component with state management
ā ā āāā FileUpload.tsx # Drag-and-drop file upload widget
ā ā āāā FilterControls.tsx # Advanced filtering with autocomplete
ā ā āāā LogTable.tsx # Sortable, paginated data table
ā ā āāā KeyboardShortcuts.tsx # Keyboard navigation support
ā āāā index.html # Main HTML template with TailwindCSS
ā āāā index.tsx # React application entry point
ā āāā style.css # Enhanced custom styles and animations
āāā shared/
ā āāā types.ts # Comprehensive TypeScript type definitions
āāā sample_data.csv # Example CSV file for testing
āāā README.md
- Upload Data: Use the file upload widget to select your CSV file
- Apply Filters: Use email and trace ID filters to narrow down results
- Explore Data: Click on rows to expand and view detailed information
- Export Results: Export filtered data for further analysis
- Ctrl + U: Upload new file
- Ctrl + K: Clear all data
- Ctrl + E: Export filtered data
- ?: Show/hide keyboard shortcuts help
- Esc: Close help modal
The application expects CSV data with these required columns:
store_record.id - Unique record identifier
key - Record key/identifier
data - JSON string containing log data
email - User email address
Optional columns (will be displayed if present):
created_at - Record creation timestamp
updated_at - Record update timestamp
database_id - Database identifier
organization_id - Organization identifier
user_id - User identifier
api_appuser.id - API app user identifier
The data field should contain JSON with these common fields:
{
"mod": {
"id": "@foundever/everassist/wrap-up",
"version": "4.8.6"
},
"url": "https://example.com",
"data": {
"from": "fab",
"traceId": "ec18475f-9549-481c-a1c4-497801153f57"
},
"email": "user@example.com",
"event": "callSummaryStart:click",
"timestamp": "2025-07-29T14:11:36.391Z",
"platformType": "contentScript"
}
- File Processing: Handles large CSV files with streaming
- Error Handling: Comprehensive validation and error reporting
- CORS Support: Automatic cross-origin request handling
- Health Monitoring: Built-in health check endpoint
Frontend (React + TypeScript)
- State Management: Efficient React hooks for data and UI state
- Performance: Optimized rendering with useMemo and pagination
- Accessibility: Keyboard navigation and screen reader support
- Responsive: Mobile-first design with TailwindCSS
- Upload Validation: File type, size, and format checks
- CSV Parsing: Smart detection of separators (tab/comma)
- Data Validation: Required column verification
- JSON Processing: Safe parsing with error recovery
- Filtering: Real-time client-side filtering
- Export: Clean CSV generation with proper escaping
The application provides detailed error reporting for:
- File Format Issues: Invalid CSV structure or encoding
- Missing Columns: Required fields not found
- JSON Parsing Errors: Malformed data fields
- Size Limitations: Files exceeding 50MB limit
- Network Issues: Upload and processing failures
- Large File Support: Handles files up to 50MB
- Efficient Filtering: Client-side filtering with debouncing
- Pagination: Renders only visible rows for better performance
- Memory Management: Optimized data structures and cleanup
- File Validation: Strict CSV file type checking
- Size Limits: Prevents oversized file uploads
- Data Sanitization: Safe JSON parsing and HTML escaping
- No Persistence: Data is processed in-memory only
- Drag & Drop: Intuitive file upload experience
- Loading States: Clear feedback during processing
- Error Messages: User-friendly error descriptions
- Autocomplete: Smart suggestions for filters
- Copy Actions: One-click copying of data
- Responsive Tables: Horizontal scrolling on mobile
- Dark Mode: Automatic system preference detection