How rajibdpi/trynas works
TryNAS is a self-hosted NAS file browser and administration dashboard. Users browse and manage local or attached remote files, preview and transfer content, and can share files; administrators also manage accounts, permissions, settings, and system monitoring. The Go server routes API requests to feature modules, with SQLite for application records and configured storage for files. The tree and excerpts establish server routing, module composition, authentication, and several feature implementations; many frontend-to-API and feature-to-storage details are not shown, so those links are omitted rather than inferred.
Main entry points: router.go API router · app.go Feature composition · server.go HTTP server · workspace.tsx Web interface
Components 23
Web interface
- Web interface
frontend/modules/workspace/workspace.tsx - File browser and previews
frontend/modules/files/file-browser.tsx - Settings interface
frontend/modules/settings/app-settings.tsx - Theme preferences
frontend/modules/settings/color-theme.ts
Server runtime
- HTTP server
cmd/server.go - API router
app/router.go - Feature composition
app/app.go - SQLite records
database/database.go - Upload proxy
frontend/upload-proxy.mjs
File management
- Local file operations
files/operations.go - Archive handling
files/zip_preview.go - Remote storage
providers/remote_storage.go - Trash and restore
trash/operations.go - Favorites
favorites/favorites.go - File sharing
share/share.go
Identity and access
- Authentication
auth/auth.go - User management
users/users.go - Folder permissions
permissions/permissions.go
Administration
- Server settings
settings/server.go - System monitoring
metrics/metrics.go - Activity log
activity/activity.go
Other components
- User
- Configured file storage
Connections 26
- User → Web interface: uses
README.md - Web interface → File browser and previews: opens files
README.md - Web interface → Settings interface: configures
README.md - HTTP server → API router: serves routes
cmd/server.go - API router → Web interface: serves fallback
app/router.go - Feature composition → Authentication: composes
app/app.go - Feature composition → Local file operations: composes
app/app.go - Feature composition → Remote storage: composes
app/app.go - Feature composition → SQLite records: composes
app/app.go - API router → Authentication: routes auth
app/router.go - API router → Local file operations: routes file APIs
app/router.go - API router → Archive handling: routes ZIP preview
app/router.go - API router → Remote storage: routes storage APIs
app/router.go - API router → User management: routes user APIs
app/router.go - API router → Folder permissions: routes permissions
app/router.go - API router → Trash and restore: routes trash APIs
app/router.go - API router → Favorites: routes favorites
app/router.go - API router → File sharing: routes sharing
app/router.go - API router → Server settings: routes settings
app/router.go - API router → System monitoring: routes monitoring
app/router.go - API router → Activity log: routes activity
app/router.go - HTTP server → SQLite records: opens and migrates
cmd/server.go - HTTP server → Feature composition: initializes
cmd/server.go - HTTP server → Upload proxy: optional frontend proxy
- User → Configured file storage: stores files
README.md - User → Theme preferences: sets appearance