Lock PDFs. Control Access.
XLok is a powerful, user-friendly desktop application for encrypting PDF files with military-grade AES-256 encryption. Built with Wails (Go + React), XLok provides a beautiful, native experience for Mac and Windows users who need to secure their PDF documents.
- AES-256 encryption (military-grade security)
- Compliant with PDF 2.0 specifications (ISO 32000-2:2020)
- Set both user password (to open) and owner password (for permissions)
- Configure granular permissions: print, copy, edit
- Process up to 50 PDFs simultaneously
- 5 concurrent workers for optimal performance
- Real-time progress tracking
- Automatic error handling and retry logic
- Cryptographically secure passwords (16-32 characters)
- Guaranteed character diversity (uppercase, lowercase, digits, symbols)
- 80+ bits entropy (NIST recommended)
- Perfect for maximum security
- Use the same password for all PDFs
- Great for sharing documents with recipients
- Built-in strength indicator
- Upload filename-password mappings
- Automatic fuzzy matching (handles typos)
- Supports both CSV and TXT formats
- Format:
filename,passwordorfilename:password
- Glassmorphism design with backdrop blur
- Dark/Light mode with system preference detection
- Smooth animations and micro-interactions
- Drag & drop file upload
- Real-time status tracking
- β/Ctrl + Enter: Start encryption
- β/Ctrl + Backspace: Clear all files
- β/Ctrl + D: Toggle dark mode
- ?: Show help
- Full ARIA label support
- Keyboard navigation
- Screen reader compatible
- Focus management
Beautiful glassmorphic UI with drag & drop file upload and real-time progress tracking
Auto-generated passwords with one-click copy and CSV export functionality
- Download
XLok.dmgfrom Releases - Open the DMG file
- Drag XLok to Applications folder
- Launch XLok from Applications
- Download
XLok-Setup.exefrom Releases - Run the installer
- Follow the installation wizard
- Launch XLok from Start Menu
- Upload PDFs: Drag and drop PDF files or click to browse
- Choose Password Mode:
- Auto: Let XLok generate secure passwords
- Manual: Enter your own password
- CSV/TXT: Upload a file with password mappings
- Configure Security: Set permissions (print, copy, edit)
- Select Output Directory: Choose where to save encrypted PDFs
- Encrypt: Click "Encrypt PDFs" or press β+Enter
- AES-256 encryption - The same standard used by governments and military organizations
- Cryptographically secure random number generation (crypto/rand)
- No telemetry - Your files never leave your computer
- Open source - Fully auditable code
- Privacy first - No passwords stored or logged
- Wails v2.9.2 - Cross-platform desktop framework
- pdfcpu v0.11.1 - Pure Go PDF processing
- crypto/rand - Cryptographically secure RNG
- React 19 - Modern UI framework
- TypeScript - Type safety
- Tailwind CSS v3 - Utility-first CSS
- Zustand - Lightweight state management (3KB)
- react-dropzone - File upload UX
- Go 1.21+
- Node.js 18+
- npm 9+
- Wails CLI:
go install github.com/wailsapp/wails/v2/cmd/wails@latest
# Clone the repository
git clone https://github.com/yourusername/xlok.git
cd xlok
# Install dependencies
cd frontend && npm install && cd ..
# Build for your platform
wails build
# Or build manually
cd frontend && npm run build && cd ..
go build -ldflags="-s -w" -o xlok# Run in development mode
wails dev
# Or run frontend and backend separately
cd frontend && npm run dev # Terminal 1
go run main.go # Terminal 2xlok/
βββ app.go # Wails app entry point
βββ main.go # Go main entry
βββ wails.json # Wails configuration
βββ appicon.svg # Application icon
βββ LICENSE # MIT License
βββ README.md # This file
βββ backend/
β βββ pdf/ # PDF encryption engine
β β βββ types.go # Core data structures
β β βββ encryptor.go # AES-256 encryption
β β βββ validator.go # PDF validation
β βββ password/ # Password generation & validation
β β βββ generator.go # Cryptographic password gen
β β βββ validator.go # Strength analysis
β βββ batch/ # Batch processing
β β βββ processor.go # Concurrent job executor
β β βββ csv_parser.go # CSV password mapping
β β βββ txt_parser.go # TXT password mapping
β β βββ matcher.go # Fuzzy filename matching
β β βββ progress.go # Thread-safe progress tracking
β βββ utils/ # Utilities
β β βββ filename.go # Conflict resolution
β βββ errors/ # Error handling
β βββ errors.go # Custom error types
βββ frontend/
βββ src/
β βββ components/ # React components
β β βββ branding/ # Logo
β β βββ file-list/ # File management
β β βββ layout/ # Layout components
β β βββ settings/ # Settings panel
β β βββ ui/ # UI components (toast, modal, etc.)
β βββ stores/ # Zustand state stores
β βββ hooks/ # Custom React hooks
β βββ styles/ # Global CSS + animations
β βββ lib/ # Wails API wrapper
βββ package.json
# Run frontend tests
cd frontend && npm test
# Run backend tests
go test ./...
# Test production build
./xlok # Mac/Linux
xlok.exe # WindowsThis project is licensed under the MIT License - see the LICENSE file for details.
XLabsX
- Email: xladsx@gmail.com
- GitHub: @xlabsx
- pdfcpu - Excellent pure Go PDF library
- Wails - Amazing cross-platform desktop framework
- React - Powerful UI framework
- Tailwind CSS - Beautiful utility-first CSS
Please file issues on the GitHub Issues page.
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
- Total Lines of Code: ~5,000+
- Backend (Go): ~2,500 lines
- Frontend (React/TypeScript): ~2,500 lines
- Bundle Size: 73.42 KB (gzipped JS)
- Binary Size: 6.8 MB (Mac ARM64)
- Supported PDFs: Up to 50 files, 10MB each
- Encryption: AES-256 (military-grade)
- Performance: 5 concurrent PDF processors
- Development Time: Completed in 8 phases
- Modular design with clear separation of concerns
- Goroutine pool pattern for efficient concurrency
- Thread-safe progress tracking with sync.RWMutex
- Automatic conflict resolution for output files
- Fuzzy matching using Levenshtein distance algorithm
- Cryptographically secure password generation
- Component-based architecture with React functional components
- Zustand state management for minimal re-renders
- Custom hooks for reusable logic (keyboard shortcuts, theme)
- Error boundaries for graceful error handling
- Toast notifications for user feedback
- Glassmorphism UI with backdrop blur effects
- Fully accessible with ARIA labels and keyboard navigation
- Event-driven communication via Wails runtime
- Real-time progress updates from Go backend to React frontend
- Mock implementations for development mode
- Type-safe API wrapper for frontend-backend communication
XLok - Lock PDFs. Control Access. π
Made with β€οΈ using Wails, Go, and React
Copyright Β© 2025 XLabsX. All rights reserved.