A secure, privacy-first desktop application for peptide protocol tracking, dose logging, and research management.
PepTrack is a macOS-first desktop application built with Rust, Tauri, and Vue 3, featuring military-grade encryption, local AI integration, and comprehensive backup capabilities. All data stays local and encryptedβno cloud dependency required.
- Protocol Management - Create and manage peptide protocols with detailed tracking
- Dose Logging - Complete dose tracking with calendar views and history
- Supplier & Inventory - Track suppliers, manage vial inventory with expiry dates and batch tracking
- Literature Search - Integrated search across PubMed, OpenAlex, and Crossref APIs with automatic peptide filtering
- Local AI Summaries - Generate research summaries using local Codex CLI (GPT-5) or Claude CLI with peptide-specific context
- AI-Powered Risk Matrix Analysis - Multi-paper safety analysis extracting critical risks, moderate concerns, and study limitations
- AI-Powered Protocol Recommender - Get science-backed protocol recommendations from research papers
- Comprehensive Backup System:
- Manual and scheduled automatic backups (hourly/daily/weekly)
- Google Drive OAuth integration for cloud backups
- Google Calendar integration for dose schedules
- Backup compression, preview, and restore functionality
- Automatic cleanup with configurable retention policies
- Desktop Notifications - Configurable notifications for backup events
- Enterprise-Grade Security:
- ChaCha20-Poly1305 envelope encryption for all data
- macOS Keychain integration for encryption keys
- Automatic key migration from file-based storage
- Zero telemetry or tracking
- Enhanced Dashboard - Comprehensive analytics with multiple visualization widgets:
- π Dose Calendar Heatmap - GitHub-style 365-day adherence visualization with streak tracking
- π Protocol Progress Tracker - Circular progress rings showing protocol completion and milestones
- π° Cost Analysis Dashboard - Supplier comparison, spending analytics, and optimization tips
- π Recent Activity Timeline - Chronological feed of all user actions with date grouping
- Global Search - Lightning-fast search across all data (Cmd+K or Cmd+P)
- Keyboard Shortcuts - Power user shortcuts for navigation and actions:
- Press
?to view all available shortcuts 1-8for quick tab navigationCmd+Kfor global search- Tab-specific shortcuts for common actions
- Press
- Quick Actions FAB - Floating action button for one-click access to common tasks
- Onboarding Flow - Interactive 8-step guided tour for new users
- Dark Mode - Full dark mode support with toggle in settings
- Empty States - Beautiful, actionable empty states throughout the app
- Loading Skeletons - Smooth loading animations for better perceived performance
graph TB
subgraph "Frontend Layer"
Vue[Vue 3 SPA<br/>TypeScript + Vite]
Pinia[Pinia State Management<br/>5 Stores]
Components[Vue Components<br/>30+ Components]
end
subgraph "Tauri Bridge"
IPC[Tauri IPC Layer<br/>~40 Commands]
Plugins[Tauri Plugins<br/>Log, Notification, Dialog]
end
subgraph "Backend Layer"
Commands[Command Handlers<br/>11 Modules]
AppState[Application State<br/>Storage + AI Client]
end
subgraph "Core Libraries"
Core[peptrack-core<br/>Storage + Encryption]
LocalAI[peptrack-local-ai<br/>CLI Orchestrator]
Literature[peptrack-literature<br/>API Fetchers]
end
subgraph "Data & External"
SQLite[(SQLite Database<br/>Encrypted)]
Keychain[macOS Keychain<br/>Key Storage]
APIs[External APIs<br/>PubMed, OpenAlex,<br/>Crossref, Google Drive]
end
Vue --> Pinia
Pinia --> Components
Components --> IPC
IPC --> Commands
Commands --> AppState
AppState --> Core
AppState --> LocalAI
Commands --> Literature
Core --> SQLite
Core --> Keychain
Literature --> APIs
Commands --> APIs
sequenceDiagram
participant User
participant Vue as Vue Component
participant Store as Pinia Store
participant IPC as Tauri IPC
participant Cmd as Command Handler
participant Core as Core Library
participant DB as SQLite (Encrypted)
User->>Vue: Create Protocol
Vue->>Store: createProtocol(payload)
Store->>Store: Optimistic Update
Store->>IPC: invoke("save_protocol")
IPC->>Cmd: save_protocol(payload)
Cmd->>Core: upsert_protocol(data)
Core->>Core: Encrypt with ChaCha20
Core->>DB: INSERT encrypted blob
DB-->>Core: Success
Core-->>Cmd: Return protocol
Cmd-->>IPC: Return protocol
IPC-->>Store: Protocol created
Store->>Vue: Update UI
Vue->>User: Show success toast
Note over Store,Vue: On error: rollback<br/>optimistic update
flowchart LR
A[Raw Data<br/>JSON] --> B[Serialize to String]
B --> C[Generate Random<br/>12-byte Nonce]
C --> D[Get 32-byte Key<br/>from Keychain]
D --> E[ChaCha20-Poly1305<br/>Encrypt]
E --> F[Prepend Nonce<br/>to Ciphertext]
F --> G[Store as BLOB<br/>in SQLite]
G --> H[Read BLOB<br/>from SQLite]
H --> I[Extract Nonce<br/>first 12 bytes]
I --> J[Get Key<br/>from Keychain]
J --> K[ChaCha20-Poly1305<br/>Decrypt]
K --> L[Deserialize<br/>from String]
L --> M[Rust Struct<br/>Decrypted Data]
style E fill:#ff6b6b
style K fill:#51cf66
| Technology | Version | Purpose |
|---|---|---|
| Rust | 1.91.1 | Core application language |
| Tauri | 2.9.2 | Desktop app framework |
| SQLite | bundled | Local encrypted database |
| ChaCha20-Poly1305 | 0.11.0-rc.2 | AEAD encryption |
| Tokio | 1.41.1 | Async runtime |
| Reqwest | 0.12 | HTTP client |
| OAuth2 | 4.4 | Google Drive authentication |
| Security-framework | 2.11 | macOS Keychain integration |
| Technology | Version | Purpose |
|---|---|---|
| Vue | 3.5.24 | UI framework |
| Vite | 7.2.2 | Build tool & dev server |
| TypeScript | 5.9.3 | Type-safe JavaScript |
| Pinia | 3.0.4 | State management |
| @vueuse/core | 14.0.0 | Composition utilities |
| Vitest | 4.0.8 | Component testing (zero vulnerabilities) |
- PubMed - Biomedical literature database
- OpenAlex - Scholarly works catalog
- Crossref - DOI metadata service
- Google Drive - OAuth 2.0 cloud backup
PepTrack/
βββ frontend/ # Vue 3 + Vite SPA
β βββ src/
β β βββ App.vue # Main application
β β βββ components/ # 30+ Vue components
β β β βββ Dashboard.vue # Enhanced dashboard with analytics
β β β βββ DoseCalendarHeatmap.vue # 365-day adherence heatmap
β β β βββ ProtocolProgressTracker.vue # Protocol progress rings
β β β βββ CostAnalysisDashboard.vue # Cost analytics & tips
β β β βββ RecentActivityTimeline.vue # Activity feed
β β β βββ GlobalSearch.vue # Global search (Cmd+K)
β β β βββ KeyboardShortcutsHelp.vue # Shortcuts help (?)
β β β βββ OnboardingFlow.vue # 8-step guided tour
β β β βββ QuickActionsFAB.vue # Floating action button
β β β βββ EmptyState.vue # Reusable empty states
β β β βββ LoadingSkeleton.vue # Loading animations
β β β βββ ... (20+ more components)
β β βββ stores/ # 5 Pinia stores
β β βββ composables/ # Vue composables
β β βββ api/ # Tauri IPC wrappers
β β βββ utils/ # Helper functions
β βββ package.json # Node dependencies
β βββ vitest.config.ts # Test configuration
β
βββ src-tauri/ # Tauri application shell
β βββ src/
β β βββ lib.rs # App initialization
β β βββ state.rs # AppState bootstrap
β β βββ commands/ # 11 IPC command modules
β β βββ protocols.rs # Protocol CRUD
β β βββ doses.rs # Dose logging
β β βββ suppliers.rs # Supplier & inventory
β β βββ ai.rs # AI summarization
β β βββ literature.rs # Literature search
β β βββ backup.rs # Manual backups
β β βββ restore.rs # Restore functionality
β β βββ scheduler_v2.rs # Scheduled backups
β β βββ drive.rs # Google Drive OAuth
β βββ Cargo.toml # Rust dependencies
β βββ tauri.conf.json # Tauri configuration
β
βββ crates/ # Rust library crates
β βββ core/ # Core functionality
β β βββ src/
β β βββ db.rs # SQLite StorageManager
β β βββ models.rs # Domain types
β β βββ encryption.rs # ChaCha20-Poly1305
β β βββ keychain.rs # macOS Keychain
β β βββ backup_encryption.rs
β β
β βββ local-ai/ # Local AI integration
β β βββ src/
β β βββ lib.rs # Codex/Claude orchestrator
β β
β βββ literature/ # Literature APIs
β βββ src/
β βββ pubmed.rs # PubMed integration
β βββ openalex.rs # OpenAlex integration
β βββ crossref.rs # Crossref integration
β
βββ docs/ # Technical documentation
β βββ ARCHITECTURE.md # Detailed architecture guide
β βββ future_self.md # Developer onboarding
β βββ ai_assistant_persona.md # AI collaboration guide
β
βββ README.md # This file
βββ SETUP.md # User setup guide
βββ TESTING.md # Testing scenarios
βββ Cargo.toml # Workspace manifest
-
Rust Toolchain
rustup default 1.91.1 rustup component add rustfmt clippy cargo install tauri-cli --version 2.9.4
-
Node.js (β₯ 22)
node -v # Should be 22+ -
Optional: AI CLIs (for summarization features)
# Option 1: Codex CLI (recommended) npm install -g codex-cli # Option 2: Claude CLI (fallback) curl https://code.claude.com/install.sh | bash
-
Clone the repository
git clone https://github.com/your-username/PepTrack.git cd PepTrack -
Install frontend dependencies
cd frontend npm install cd ..
-
Run in development mode
cargo tauri dev
# Format code
cargo fmt
# Lint with clippy
cargo clippy --workspace --all-targets
# Run Rust tests
cargo test --workspace
# Build frontend
cd frontend && npm run build
# Run frontend tests
cd frontend && npm run test -- --run
# Build production release
cargo tauri build- Location:
~/Library/Application Support/PepTrack/ - Database:
peptrack.sqlite(encrypted) - Encryption Keys: Stored in macOS Keychain (primary) or
peptrack.key(fallback)
- Algorithm: ChaCha20-Poly1305 (AEAD)
- Key Size: 32 bytes (256-bit)
- Nonce: 12 bytes, randomly generated per record
- Key Storage: macOS Keychain with automatic migration from file-based storage
- β All data encrypted at rest
- β No telemetry or analytics
- β No cloud sync without explicit user action
- β
No data leaves your computer except:
- Research searches to PubMed/OpenAlex/Crossref (search queries only)
- AI summaries to your local CLI (your credentials)
- Google Drive backups to YOUR Google Drive (optional, user-initiated)
- SETUP.md - Complete setup guide for optional features
- TESTING.md - Comprehensive testing scenarios
- docs/ARCHITECTURE.md - Detailed architecture documentation
- docs/future_self.md - Developer onboarding guide
- β Protocol management with full CRUD operations
- β Dose logging with calendar views
- β Supplier & inventory management
- β Literature search (PubMed, OpenAlex, Crossref)
- β Local AI summarization (Codex/Claude)
- β AI-powered protocol recommender
- β Manual and scheduled backups
- β Google Drive OAuth integration
- β Google Calendar integration
- β macOS Keychain integration
- β Desktop notifications
- β Comprehensive error handling
- β Enhanced dashboard with analytics widgets
- β Dose calendar heatmap (365-day visualization)
- β Protocol progress tracker
- β Cost analysis dashboard
- β Recent activity timeline
- β Global search (Cmd+K)
- β Keyboard shortcuts system
- β Quick Actions FAB
- β Onboarding flow
- β Dark mode support
- β Empty states and loading skeletons
- Background reminders for dose schedules
- Vial expiry notifications
- Cloud restore (restore directly from Google Drive)
- Multi-cloud support (Dropbox, OneDrive)
- Backup encryption with user-managed passwords
- Data export (CSV/JSON)
- Mobile companion app
- Read docs/future_self.md for environment setup
- Check TESTING.md for testing requirements
- Follow the coding standards in docs/ai_assistant_persona.md
- Rust: Follow Rust 2021 edition best practices, use
anyhowfor errors - Vue/TypeScript: Use Composition API, 2-space indent, PascalCase components
- Testing: All new features require tests
- Documentation: Update relevant docs with any changes
[Add your license here]
Built with:
- Tauri - Desktop app framework
- Vue.js - Progressive JavaScript framework
- Rust - Systems programming language
- Pinia - Vue state management
PepTrack - Your peptides, your data, your control. π§ͺ