How sjasonp/foldersguard works
FoldersGuard is an experimental desktop and CLI application for encrypting folders into portable UUID-named content trees, with separate encrypted metadata databases. The main workflow creates or imports a project, encrypts its source, and then supports inspection, verification, decryption, export, and modification; sharing packages selected encrypted entries into share-scoped databases. The desktop UI calls Go through the Wails bridge, while the CLI offers automation. The README documents these capabilities; sampled source confirms parts of the UI, project service, and change-application flows, so unsampled internal wiring is kept conservative.
Main entry points: app Application service · service_projects.go Project workflows · open.go Encrypted databases · service_project_browser.go Project browser
Components 23
User interfaces
- Desktop WebUI
frontend/src/App.tsx - Project workflows
frontend/src/hooks/useProjectActions.ts - Wails bindings
frontend/wailsjs/go/main/App.js - CLI commands
internal/cli/cli.go - Desktop API
app.go
Project operations
- Application service
internal/app - Project workflows
internal/app/service_projects.go - Project browser
internal/app/service_project_browser.go - Apply changes
internal/app/service_project_changes.go - Share workflows
internal/app/service_shares.go - Create shares
internal/app/service_share_create.go
Content and security
- Project engine
internal/project/execute.go - Content encryption
internal/content/encrypt.go - Cryptographic keys
internal/crypto/keys.go - Integrity verification
internal/project/verify.go - Content operations
internal/app/content_operations.go
Metadata and storage
- Encrypted databases
internal/db/open.go - Metadata store
internal/storage/store.go - Project planning
internal/project/planner.go - Project backups
internal/app/backup.go
Other components
- Desktop user
- CLI user
- Local files
Connections 31
- Desktop user → Desktop WebUI: uses
- Desktop WebUI → Project workflows: starts workflows
- Project workflows → Wails bindings: invokes operations
- Wails bindings → Desktop API: dispatches calls
- CLI user → CLI commands: runs commands
- CLI commands → Application service: requests operations
- Desktop API → Application service: delegates calls
- Application service → Project workflows: handles projects
- Application service → Project browser: opens browser
- Application service → Apply changes: applies changes
- Application service → Share workflows: handles shares
- Application service → Create shares: creates shares
- Project workflows → Project planning: plans projects
- Project workflows → Project engine: executes encryption
- Project workflows → Integrity verification: verifies content
- Project workflows → Encrypted databases: reads databases
- Project workflows → Local files: reads and writes
- Project engine → Content encryption: encrypts content
- Content encryption → Cryptographic keys: uses keys
- Integrity verification → Local files: checks encrypted objects
- Integrity verification → Encrypted databases: reads metadata
- Project browser → Encrypted databases: opens project database
- Project browser → Metadata store: browses metadata
- Apply changes → Metadata store: plans metadata edits
- Apply changes → Content operations: applies content edits
- Content operations → Local files: changes encrypted tree
- Share workflows → Encrypted databases: reads share database
- Create shares → Encrypted databases: writes share database
- Create shares → Metadata store: selects project entries
- Application service → Project backups: manages backups
- Project backups → Local files: stores backups