feat: Add Rust API Server with REST and GraphQL support
- Implement JWT authentication layer - Add Engine Registry with 20+ conversion engines - Implement Conversion Service with background job processing - REST API endpoints for file conversion operations - GraphQL API with queries and mutations - Comprehensive error handling with conversion suggestions - Integration tests for both REST and GraphQL APIs - Complete API documentation Features: - REST API: /api/v1/* endpoints - GraphQL API: /graphql endpoint with playground - JWT Bearer token authentication - Engine validation with alternative suggestions - File download via API (not exposing file paths) - Support for FFmpeg, ImageMagick, LibreOffice, Pandoc, and more
This commit is contained in:
parent
d0388066a5
commit
e083e5d11d
18 changed files with 5235 additions and 0 deletions
19
api-server/.env.example
Normal file
19
api-server/.env.example
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
# API Server 環境設定範例
|
||||
# 複製此檔案為 .env 並依需求修改
|
||||
|
||||
# 伺服器設定
|
||||
API_HOST=0.0.0.0
|
||||
API_PORT=3001
|
||||
|
||||
# JWT 設定(正式環境請務必更改!)
|
||||
JWT_SECRET=your-super-secret-jwt-key-change-in-production
|
||||
|
||||
# 檔案儲存
|
||||
UPLOAD_DIR=./data/uploads
|
||||
OUTPUT_DIR=./data/output
|
||||
|
||||
# 限制
|
||||
MAX_FILE_SIZE=104857600
|
||||
|
||||
# JWT Token 過期時間(秒),用於驗證參考
|
||||
JWT_EXPIRATION_SECS=86400
|
||||
Loading…
Add table
Add a link
Reference in a new issue