zephyrfs-web Public
Go to file
T
Code
Use Git or checkout with SVN using the web URL.
No matching headings.
ZephyrFS Web Interface
A modern web interface and WebDAV server for ZephyrFS distributed storage system.
Features
- RESTful API - Complete file management operations
- JWT Authentication - Secure token-based authentication
- WebDAV Server - Native OS integration for mounting as network drive
- Real-time Updates - WebSocket-based status monitoring
- Zero-Knowledge Security - Preserves ZephyrFS encryption architecture
- High Performance - Sub-2-second response times with streaming support
Quick Start
Development
-
Install dependencies
cd server npm install -
Configure environment
cp .env.example .env # Edit .env with your settings -
Start development server
npm run dev
Production
-
Build the application
npm run build -
Start production server
npm start
Docker
docker-compose up -d
API Endpoints
Authentication
POST /api/auth/login- Login with username/passwordPOST /api/auth/refresh- Refresh access tokenPOST /api/auth/logout- Logout and invalidate sessionGET /api/auth/me- Get current user info
Files
GET /api/files- List files in directoryPOST /api/files/upload- Upload fileGET /api/files/:id/download- Download fileGET /api/files/:id/info- Get file metadataDELETE /api/files/:id- Delete file
Status
GET /api/health- Health checkGET /api/status/network- Network statusGET /api/status/node- Node statusGET /api/status/ws- WebSocket status updates
WebDAV
GET /api/webdav- WebDAV discovery infoALL /api/webdav/*- WebDAV protocol endpoints
WebDAV Setup
The WebDAV server allows mounting ZephyrFS as a network drive:
Windows
- Open File Explorer
- Right-click "This PC" → "Map network drive"
- Click "Connect to a Web site"
- Enter:
http://localhost:3000/api/webdav/ - Username:
zephyrfs, Password:webdav
macOS
- Open Finder
- Go → Connect to Server (⌘K)
- Enter:
http://localhost:3000/api/webdav/ - Username:
zephyrfs, Password:webdav
Linux
- Open file manager
- Other Locations → Connect to Server
- Enter:
http://localhost:3000/api/webdav/ - Username:
zephyrfs, Password:webdav
Configuration
Environment variables (see .env.example):
PORT- Server port (default: 3000)ZEPHYRFS_NODE_URL- ZephyrFS node URLJWT_SECRET- JWT signing secret (min 32 chars)CORS_ORIGINS- Allowed CORS originsWEBDAV_ENABLED- Enable WebDAV serverLOG_LEVEL- Logging level (debug, info, warn, error)
Testing
npm test
Architecture
The web interface acts as a bridge between web clients and the ZephyrFS node:
Web Client/WebDAV → Fastify API → ZephyrFS Client → ZephyrFS Node
- Fastify - High-performance web framework
- JWT Authentication - Stateless authentication
- WebDAV Server - Standards-compliant DAV implementation
- ZephyrFS Client - HTTP client for node communication
- Zero-Knowledge - Encryption keys never leave client side
Security
- JWT tokens with configurable expiration
- Rate limiting (100 requests/minute per IP)
- Security headers (HSTS, CSP, etc.)
- CORS protection
- Input validation with Zod schemas
- Secure error handling (no info leakage)
Performance
- Sub-200ms API response times
- Streaming file uploads/downloads
- Efficient chunked transfer
- WebSocket real-time updates
- Connection pooling and timeouts