A secure desktop file monitoring and synchronization application built with Wails (Go + React).
- File Watching: Real-time monitoring of selected folders
- Secure Encryption: AES-256-GCM encryption for all file transfers
- Cloud Sync: Hourly metadata sync to Supabase backend
- Auto-decryption: Automatically decrypts
.datievefiles in downloads folder - Approval System: Manual or automatic file request approval
- Professional UI: Clean, modern React interface
- Config: Settings management at platform-specific location:
- Windows:
%APPDATA%\Datieve\settings.json - macOS:
~/Library/Application Support/Datieve/settings.json - Linux:
~/.config/datieve/settings.json
- Windows:
- Database: SQLite local index at platform-specific location:
- Windows:
%APPDATA%\Datieve\index.sqlite - macOS:
~/Library/Application Support/Datieve/index.sqlite - Linux:
~/.config/datieve/index.sqlite
- Windows:
- Auth: Supabase authentication with JWT refresh
- Watcher: Real-time file system monitoring with fsnotify
- Crypto: AES-256-GCM encryption/decryption
- Sync: Hourly metadata sync to Supabase
- Setup Wizard: 5-step onboarding process
- Main UI: Professional settings management interface
- Welcome Screen: Animated splash screen
- Login: Secure authentication
- Go 1.24+
- Node.js 16+
- Wails CLI
- Supabase project (for backend)
- Cloudflare R2 bucket (for file storage)
- Clone the repository:
git clone <repository-url>
cd datieve-watcher- Install Wails:
go install github.com/wailsapp/wails/v2/cmd/wails@latest- Install frontend dependencies:
cd frontend
npm install
cd ..- Configure environment variables:
Create a .env file in the project root:
# Supabase Configuration
SUPABASE_URL=https://your-project.supabase.co
SUPABASE_ANON_KEY=your-supabase-anon-key-here
# Cloudflare R2 Configuration
R2_ACCOUNT_ID=your-r2-account-id
R2_ACCESS_KEY_ID=your-r2-access-key-id
R2_SECRET_ACCESS_KEY=your-r2-secret-access-key
R2_BUCKET_NAME=your-bucket-nameReplace all placeholder values with your actual credentials.
Getting your credentials:
- Supabase: Get these from your Supabase project settings → Settings → API
- Cloudflare R2: Get these from your Cloudflare dashboard → R2 → Manage R2 API Tokens
- Build the application:
wails buildThe built application will be in build/bin/.
- Run in development mode:
wails devThe .env file must be placed in the same directory as the executable.
When distributing the application:
- Users must create their own
.envfile next to the executable - The file must contain all 6 required environment variables (see above)
- They need to fill in their own credentials from Supabase and Cloudflare R2
Alternative: System Environment Variables
Instead of a .env file, users can set system environment variables:
Windows (PowerShell):
$env:SUPABASE_URL="https://xxxxx.supabase.co"
$env:SUPABASE_ANON_KEY="your-actual-key-here"
$env:R2_ACCOUNT_ID="your-account-id"
$env:R2_ACCESS_KEY_ID="your-access-key"
$env:R2_SECRET_ACCESS_KEY="your-secret-key"
$env:R2_BUCKET_NAME="your-bucket"macOS/Linux:
export SUPABASE_URL="https://xxxxx.supabase.co"
export SUPABASE_ANON_KEY="your-actual-key-here"
export R2_ACCOUNT_ID="your-account-id"
export R2_ACCESS_KEY_ID="your-access-key"
export R2_SECRET_ACCESS_KEY="your-secret-key"
export R2_BUCKET_NAME="your-bucket"On first run, the setup wizard will guide you through:
- Authentication: Enter your Datieve account credentials
- Watch Folders: Add folders to monitor
- Approval Method: Choose manual or auto-approval
- Encryption Key: Enter the key provided by your admin
- Downloads Folder: Select where to monitor for incoming files
Settings are stored in platform-specific locations (see Architecture section above) in JSON format with your watched folders, approval mode, encryption key, and downloads folder path.
Note: On Windows, use double backslashes (\\) or forward slashes (/) in paths.
- Watch Folders: Add/remove folders to monitor
- Approval Method: Toggle between manual/auto approval
- Encryption Key: View/update encryption key
- Downloads Folder: Change downloads monitoring location
- Sync to Cloud: Manually trigger metadata sync
- Save & Exit: Save changes and restart watchers
- View email and user ID
- Logout (deletes local data)
- View pending file requests
- Currently shows count only (full implementation pending)
- File Watching: The app monitors configured folders in real-time
- Local Indexing: File metadata is stored in SQLite
- Cloud Sync: Metadata syncs to Supabase every hour
- JWT Refresh: Authentication token refreshes hourly
- File Requests: When approved, files are encrypted and uploaded
- Auto-decryption:
.datievefiles in downloads are auto-decrypted
- Passwords are never stored locally
- JWT tokens kept in memory only
- AES-256-GCM encryption for all file transfers
- Encryption key validation (8+ chars, mixed case, numbers, symbols)
datieve-watcher/
├── internal/
│ ├── auth/ # Supabase authentication
│ ├── config/ # Settings management
│ ├── crypto/ # AES-256-GCM encryption
│ ├── database/ # SQLite operations
│ ├── sync/ # Cloud sync logic
│ └── watcher/ # File system monitoring
├── frontend/
│ └── src/
│ ├── components/
│ │ ├── Welcome.jsx
│ │ ├── Setup.jsx
│ │ ├── LoginPrompt.jsx
│ │ └── MainUI.jsx
│ └── App.jsx
├── app.go # Main application logic
└── main.go # Entry point
Development:
wails devProduction:
wails buildBinary location: build/bin/
The local SQLite database stores:
file_metadata (
id, user_id, file_name, file_path,
file_size, file_type, file_extension,
modified_time, created_at, updated_at, is_deleted
)This means the application cannot find your .env file or environment variables are not set.
Solution:
- Ensure
.envfile exists in the same directory as the executable - Check that all 6 required variables are set:
SUPABASE_URLSUPABASE_ANON_KEYR2_ACCOUNT_IDR2_ACCESS_KEY_IDR2_SECRET_ACCESS_KEYR2_BUCKET_NAME
- Verify there are no typos in variable names
- On Windows, ensure the file is named
.env(not.env.txt)
- Verify your
SUPABASE_URLandSUPABASE_ANON_KEYare correct - Check your Supabase project is active
- Ensure the user account exists in your Supabase project
- Verify your R2 credentials are correct
- Check the R2 bucket exists and is accessible
- Ensure the R2 access token has read/write permissions
To build for all platforms:
./build-all.shThis creates binaries for:
- Windows (amd64)
- macOS (Universal)
- Linux (amd64)
Important for distribution:
- Provide setup instructions for users to create their
.envfile - Document all 6 required environment variables
- Never include your actual
.envfile in the distribution
- Fork the repository
- Create a feature branch
- Make your changes
- Submit a pull request
This project is licensed under the MIT License - see the LICENSE file for details.