interface Implements multi-user authentication system with email account management, profile settings, drive configuration, and security controls. Includes database migrations for user accounts, email credentials, preferences, and session management. Frontend provides intuitive UI for adding IMAP/SMTP accounts with provider presets and connection testing. Backend supports per-user vector databases for email and file indexing with Zitadel SSO integration and automatic workspace initialization. ```
1.1 KiB
1.1 KiB
Drive REST API Integration
Endpoints
GET /files/list
List files and folders in S3 bucket
Query params: bucket (optional), path (optional)
Response: [{ name, path, is_dir, icon }]
POST /files/read
Read file content
Body: { bucket, path }
Response: { content }
POST /files/write
Write file content
Body: { bucket, path, content }
Response: { success: true }
POST /files/delete
Delete file/folder
Body: { bucket, path }
Response: { success: true }
POST /files/create-folder
Create new folder
Body: { bucket, path, name }
Response: { success: true }
Integration
- Add to main.rs:
mod drive;
.configure(drive::configure)
- Frontend calls:
fetch('/files/list?bucket=mybucket')
fetch('/files/read', { method: 'POST', body: JSON.stringify({ bucket, path }) })
fetch('/files/write', { method: 'POST', body: JSON.stringify({ bucket, path, content }) })
S3 Backend
Uses existing FileTree from ui_tree/file_tree.rs Wraps S3 operations: list_buckets, list_objects_v2, get_object, put_object, delete_object