Architecture Overview
System Architecture
┌──────────────────────────────────────────────────────────────────┐
│ User Interface Layer │
│ Web UI (React) · S3 Clients (rclone, AWS CLI) · WebDAV │
└──────────────┬──────────────────────┬────────────────┬───────────┘
│ │ │
┌──────▼──────┐ ┌──────▼──────┐ ┌─────▼──────┐
│ REST API │ │ S3 API │ │ WebDAV │
│ :5212 │ │ :5213 │ │ :5214 │
└──────┬──────┘ └──────┬──────┘ └─────┬──────┘
│ │ │
┌──────▼──────────────────────▼────────────────▼──────┐
│ Gin Router │
│ Middleware: CORS → Auth → Rate Limit │
└──────────┬───────────────────────────────────────────┘
│
┌──────────▼───────────────────────────────────────────┐
│ Service Layer │
│ Auth · File Management · Space Management · Shares │
└──────────┬───────────────────────────────────────────┘
│
┌──────────▼───────────────────────────────────────────┐
│ Storage Abstraction │
│ In-Memory FileSystem (Inode + Block-based) │
│ ┌──────────┐ ┌──────────┐ ┌──────────────────────┐ │
│ │ RAM │ │ VRAM │ │ Swap/Persist │ │
│ │ Driver │ │ Driver │ │ Layer (optional) │ │
│ └────┬─────┘ └────┬─────┘ └──────────────────────┘ │
└───────┼─────────────┼─────────────────────────────────┘
│ │
┌───────▼─────────────▼─────────────────────────────────┐
│ Device Management Layer │
│ mmap / VirtualAlloc / CUDA / NVML │
└───────────────────────────────────────────────────────┘Port Map
| Port | Service | Description |
|---|---|---|
| 5212 | REST API + Web UI | Main port for HTTP API and frontend |
| 5213 | S3 API | AWS S3-compatible protocol |
| 5214 | WebDAV | WebDAV protocol |
Tech Stack
| Layer | Technology |
|---|---|
| Backend | Go 1.22+, Gin, ent, golang.org/x/net/webdav |
| Frontend | React 18, TypeScript, Ant Design 5, Zustand, Vite |
| Database | SQLite / PostgreSQL (metadata only) |
| RAM | mmap (Linux/macOS) / VirtualAlloc (Windows) |
| VRAM | CUDA + NVML (stub, ready for integration) |