Skip to content

Latest commit

 

History

History
104 lines (72 loc) · 3.01 KB

development.md

File metadata and controls

104 lines (72 loc) · 3.01 KB

Development

Prerequisites

Commands

# Start Tauri dev (frontend + backend)
npm run tauri dev

# Vite dev server only (no Tauri)
npm run dev

# Run tests
npm run test

# Run tests in watch mode
npm run test:watch

# Run a specific test file
npx vitest run src/stores/uiStore.test.ts

# Type-check
npx tsc --noEmit

# Build for production
npm run tauri build

# Rust only (from src-tauri/)
cd src-tauri && cargo build

Testing

  • Framework: Vitest + jsdom
  • Setup: src/test/setup.ts (imports @testing-library/jest-dom/vitest)
  • Config: globals: true -- no imports needed for describe, it, expect
  • Location: Tests are colocated with source files (e.g., uiStore.test.ts next to uiStore.ts)
  • Count: 130 test files across stores (8), services (70), utils (14), components (31), constants (3), router (1), hooks (2), and config (1)

Zustand test pattern

beforeEach(() => {
  useStore.setState(initialState);
});

it('does something', () => {
  useStore.getState().someAction();
  expect(useStore.getState().value).toBe(expected);
});

Building

# Build for your current platform
npm run tauri build

Produces native installers:

  • Windows -- .msi / .exe
  • macOS -- .dmg / .app
  • Linux -- .deb / .AppImage

Email Account Setup

Gmail (OAuth)

Velo connects directly to Gmail via OAuth. You need your own Google Cloud credentials:

  1. Go to Google Cloud Console
  2. Create a new project (or use an existing one)
  3. Enable the Gmail API and Google Calendar API
  4. Create OAuth 2.0 credentials (Desktop application)
  5. In Velo's Settings, enter your Client ID

Velo uses PKCE flow -- no client secret is required.

IMAP/SMTP

For non-Gmail providers (Outlook, Yahoo, iCloud, Fastmail, etc.):

  1. Click the account switcher in the sidebar → Add IMAP Account
  2. Enter your email address and password (or app-password)
  3. Velo auto-discovers server settings for well-known providers
  4. For other providers, enter IMAP/SMTP host, port, and security manually
  5. Test connection, then save

No Google Cloud project or Client ID needed. Passwords are encrypted with AES-256-GCM in the local database. Some providers (e.g., Gmail, Yahoo) require an app-specific password instead of your main password.

AI Setup (Optional)

To enable AI features, add your API key for one or more providers in Settings:

  • Anthropic Claude -- Get API key -- Haiku 4.5 (default), Sonnet 4, Opus 4
  • OpenAI -- Get API key -- GPT-4o Mini (default), GPT-4o, GPT-4.1 series
  • Google Gemini -- Get API key -- 2.5 Flash (default), 2.5 Pro

After adding an API key, select which model to use for each provider in Settings > AI.