How angusrausch/simple-zfs-manager works
Simple ZFS Manager is a lightweight NAS web management application. The principal evidenced workflow is a user signing in through PAM-backed authentication and receiving a session cookie; the app also exposes a dashboard and has core modules for ZFS pools, datasets, snapshots/replication, and SMB shares. The README documents NFS exports as a goal, but the tree shows no NFS implementation. Sampled code supports core-to-command execution; wiring from UI routes to storage operations is not established by the excerpts.
Main entry points: main.py FastAPI app · auth.py Login routes · runner.py Command runner · utils.py ZFS command utilities
Components 21
Web application
- FastAPI app
app/main.py - Login routes
app/routers/auth.py - Dashboard route
app/routers/dashboard.py - Health route
app/routers/health.py - Page templates
app/templates
Authentication
- Token security
app/core/security.py - PAM authentication
app/core/system/pam_auth.py
Storage management
- Dataset operations
app/core/zfs/zfs.py - Pool operations
app/core/zfs/zpool.py - ZFS state models
app/core/zfs/models.py - SMB share operations
app/core/smb/smb.py - Share models
app/core/smb/models.py - NFS exports (planned)
app/core
System integration
- Command runner
app/core/system/runner.py - ZFS command utilities
app/core/zfs/utils.py - App configuration
app/core/config.py - Safe file changes
app/core/system/file_mod.py
Other components
- Web user
- Linux PAM
- Samba utilities
- ZFS utilities
Connections 15
- Web user → FastAPI app: sends requests
- FastAPI app → Login routes: registers routes
- FastAPI app → Dashboard route: registers routes
- FastAPI app → Health route: registers routes
- Login routes → Token security: checks or creates token
- Token security → PAM authentication: authenticates login
- PAM authentication → Linux PAM: checks credentials
- Login routes → Page templates: renders login
- Dashboard route → Page templates: renders dashboard
- Dataset operations → ZFS command utilities: executes commands
- Pool operations → ZFS command utilities: executes commands
- ZFS command utilities → Command runner: runs processes
- Command runner → ZFS utilities: invokes
- SMB share operations → Command runner: runs commands
- SMB share operations → Samba utilities: invokes