Fix/upgrade tsfile to 2.3.0 (#20) * fix: upgrade tsfile library from 2.2.0 to 2.3.0 Fixes ArrayIndexOutOfBoundsException in TableSchema.deserialize when reading TsFile files created by newer SDK versions. * docs: update TsFile version references to 2.3.0 in READMEs * docs: update READMEs to reflect actual project structure - Fix package path: com/timecho → org/apache/tsfile - Replace non-existent build scripts with actual build-dist.sh - Update frontend stack: Nuxt UI → antdv-next + UnoCSS - Update versions: Pinia 3.x, TypeScript 5.9.x - Add missing directories: exception, router, theme - Remove non-existent tsfile-source directory
A web-based application for viewing and analyzing Apache TsFile format data. Built with Vue 3 and Spring Boot 4.
Start Backend:
cd backend mvn spring-boot:run
Backend will run at http://localhost:8080
Start Frontend:
cd frontend
pnpm install
pnpm dev
Frontend will run at http://localhost:5173
Access Application: Open http://localhost:5173/view/ in your browser
# Build distribution package (embedded JAR + scripts) ./build-dist.sh # Run java -jar backend/target/tsfile-viewer-*.jar
Access at http://localhost:8080/view/
See docs/DEPLOYMENT.md for detailed deployment instructions.
Edit backend/src/main/resources/application.yml:
tsfile: # Whitelist of allowed directories allowed-directories: - /data/tsfiles - /uploads/tsfiles # Upload directory upload-directory: /uploads/tsfiles # Cache settings cache: metadata: max-size: 1000 ttl-minutes: 60 reader: max-size: 100 ttl-minutes: 30
Create frontend/.env.production:
# API base URL (default/recommended for reverse proxy) VITE_API_BASE_URL=/api
tsfile-viewer/ ├── backend/ # Spring Boot Maven project │ ├── src/main/java/ │ │ └── org/apache/tsfile/viewer/ │ │ ├── controller/ # REST API endpoints │ │ ├── service/ # Business logic │ │ ├── tsfile/ # TsFile parsing utilities │ │ ├── config/ # Spring configuration │ │ ├── dto/ # Data transfer objects │ │ └── exception/ # Custom exceptions │ └── pom.xml ├── frontend/ # Vue 3 + Vite SPA │ ├── src/ │ │ ├── views/ # Page components │ │ ├── components/ # Reusable components │ │ ├── stores/ # Pinia state management │ │ ├── api/ # API client │ │ ├── router/ # Vue Router configuration │ │ ├── i18n/ # Internationalization │ │ ├── theme/ # Theme configuration │ │ └── composables/ # Vue composables │ └── package.json ├── build-dist.sh # Distribution build script ├── docs/ # Project documentation │ ├── DEPLOYMENT.md # Deployment guide │ ├── API.md # API documentation │ └── ... └── README.md
GET /api/files/tree - Browse file treePOST /api/files/upload - Upload TsFileGET /api/meta/{fileId} - Get metadataPOST /api/data/preview - Preview data with filtersPOST /api/data/query - Query chart data with aggregationSee API documentation at /swagger-ui.html (if enabled)
cd backend # Run tests mvn test # Format code mvn spotless:apply # Check formatting mvn spotless:check # Build mvn clean package
cd frontend # Install dependencies pnpm install # Run dev server pnpm dev # Build for production pnpm build # Run tests pnpm test:unit # Lint pnpm lint # Format pnpm format # Type check pnpm type-check
131 tests covering:
Run: mvn test
Component and integration tests using Vitest + Vue Test Utils
Run: pnpm test:unit
.. and absolute paths outside whitelistSee LICENSE file for details.
For issues and questions: