Flicker Development Guide
Complete guide to building, developing, and contributing to Flicker desktop application.
Flicker is built with Tauri 2.0, React 19, and Rust. This guide covers project setup, development workflow, architecture, and contribution guidelines.
Project Overview
| Aspect | Details |
|---|---|
| Repository | https://github.com/EmberlyOSS/Flicker |
| License | MIT (Open Source) |
| Current Version | v0.1.0-alpha (Jan 2, 2026) |
| Framework | Tauri 2.0 (Cross-platform desktop) |
| Frontend | React 19 + TypeScript + Tailwind CSS |
| Backend | Rust with async Tokio runtime |
| Package Manager | bun (recommended) / npm |
| Platforms | Windows, macOS, Linux |
Architecture Overview
High-Level Structure
Data Flow
Prerequisites & Setup
System Requirements
All Platforms:
- Node.js 18+ (
node --version) - Rust 1.70+ (
rustc --version) - Git
Windows:
- Visual Studio Build Tools or MSVC compiler
- Windows 10 or later
macOS:
- Xcode or Command Line Tools (
xcode-select --install) - macOS 11 or later
Linux:
- Build essentials:
sudo apt install build-essential - GTK 3.0+ development files:
sudo apt install libgtk-3-dev - libssl-dev:
sudo apt install libssl-dev
Installation
1. Clone Repository
2. Install Node Dependencies
3. Install Rust (if not already installed)
4. Verify Installation
Development Workflow
Starting Development Server
First startup may take 2-3 minutes as Rust builds. Subsequent runs are faster using incremental compilation.
Development Window
When bun run dev succeeds:
- Tauri window opens with Flicker app
- Layout: 900×800 pixels (resizable)
- DevTools available:
F12orCtrl+Shift+I - Hot reload on save (React components only)
- Rust changes require app restart
File Structure During Development
Building & Packaging
Development Build
Platform-Specific Builds
Build Artifacts
After npm run build, installers appear in:
Code Standards
TypeScript / React
File Structure:
Guidelines:
- Use functional components with hooks
- TypeScript strict mode (no
anytypes) - Use interfaces for props
- Document with JSDoc comments
- Use Tailwind CSS classes
- Prefer composition over inheritance
- Keep components focused (single responsibility)
Rust Code
Command Handler Example:
Guidelines:
- Use
Result<T, E>for error handling - Document with
///doc comments - Use async/await with Tokio
- Proper error messages for frontend
- Validate inputs (file size, formats)
- Use modules for organization
Styling with Tailwind
Theme System:
Testing
Unit Tests (Coming v0.2.0)
Test Structure:
Manual Testing Checklist
Before submitting PR, test:
- App launches without crashes
- Screenshots capture correctly
- Uploads succeed with valid auth
- Hotkeys work system-wide
- Settings persist after restart
- All themes apply correctly
- UI is responsive
- No console errors (
F12) - Notifications display
- History updates
Architecture Deep Dive
Frontend State Management
AppContext:
Usage:
Tauri Commands (IPC Bridge)
From Frontend (TypeScript):
From Backend (Rust):
Emberly API Integration
Client Location: src-tauri/src/common/emberly_api.rs
Key Endpoints:
Usage in upload flow:
Key Components
UploadArea
File: src/components/upload/UploadArea.tsx
Purpose: Main UI for file uploads
Features:
- Drag-and-drop zone
- File picker button
- Progress display
- Error messages
- Upload preview
Props:
ScreenshotToast
File: src/components/overlays/ScreenshotToast.tsx
Purpose: Show upload progress and status
Displays:
- Upload progress percentage
- File name being uploaded
- Success/error state
- Time elapsed
- URL for copying
SettingsPage
File: src/components/settings/SettingsPage.tsx
Features:
- Tabbed interface (Hotkeys, Appearance, Behavior, Capture, Account)
- Real-time config updates
- Settings validation
- Reset to defaults button
Common Development Tasks
Adding a New Setting
1. Define Type in src/types.ts:
2. Add to Default Config (src/config.ts):
3. Create Setting Component (src/components/settings):
4. Add to Settings Page:
Adding a New Tauri Command
1. Implement in Rust (src-tauri/src/lib.rs):
2. Use in React (src/components/):
Adding a New Theme
1. Add to src/colors.ts:
**2. Theme will automatic appear in Settings → Appearance
Git Workflow
Branch Naming
Commit Messages
Pull Request Process
1. Create feature branch:
2. Make changes and test:
3. Commit with clear messages:
4. Push and create PR:
5. PR Description:
Debugging
Chrome DevTools
Press F12 or Ctrl+Shift+I to open DevTools:
- Console — View logs and errors
- Elements — Inspect React components
- Network — Monitor API calls to Emberly
- Sources — Debug JavaScript
- Performance — Profile app performance
Rust Debugging
See Rust logs in console:
Add debug prints:
Common Issues
Hot reload not working:
Rust compilation error:
Module not found errors:
Performance Optimization
React Optimization
Image Optimization
Lazy Loading
Security Considerations
API Keys & Tokens
- Never commit tokens to git
- Use
.envfiles (add to.gitignore) - Environment variables:
process.env.MY_TOKEN
User Data
- Passwords transmitted over HTTPS only
- Tokens stored in secure storage (Tauri plugin)
- Don't log sensitive data
File Uploads
- Validate file type before upload
- Check file size limits
- Scan for malware (Emberly does this)
- Throttle upload requests
Resources
- Tauri Docs: https://tauri.app/v1/guides/
- React Docs: https://react.dev
- Rust Book: https://doc.rust-lang.org/book/
- Tailwind CSS: https://tailwindcss.com/docs
- TypeScript: https://www.typescriptlang.org/docs/
Getting Help
Contributing
See Contributing Guide for full guidelines on:
- Code standards and style
- Testing requirements
- PR process
- Commit message conventions