Skip to content

blueraincoatli/APIkeyManager

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

API Key Manager

A lightweight, modern, and secure desktop application for managing API keys locally. Supports quick search, platform categorization, Excel batch import, and visual preview to help you systematically manage scattered keys.

πŸ‡¨πŸ‡³ δΈ­ζ–‡η‰ˆζœ¬ | English

✨ Features

Core Capabilities

  • API Key Management: Add/Edit/Delete API keys with platform categorization
  • Quick Search & Filtering: Search by name and platform keywords with floating toolbar
  • Platform View: Radial menu platform aggregation with wheel pagination
  • 🌍 Multi-language Support: Supports 9 languages including Chinese, English, Japanese, etc.

Batch Import (Excel)

  • Format Support: Supports .xlsx/.xls, reads from first worksheet
  • Preview Window: Independent window displays data before import
  • 🌐 Multi-language Header Matching: Automatically recognizes Excel file language format
  • Duplicate Detection:
    • Compares with existing database entries (by keyValue)
    • Detects duplicates within the same batch
    • Red highlighting for duplicates with row deletion option
  • Data Cleaning: Auto-removes invisible characters (zero-width, BOM, control chars)
  • Validation: Clear error messages indicating invalid characters and reasons

Interface & Interaction

  • Floating Toolbar: Always-on-top quick search and add entry
  • Radial Menu: 6 items per screen with wheel navigation and edge fading
  • Modern UI: Light/dark theme adaptation
  • 🎨 Adaptive Background Gradient: Dynamic background generation based on theme and time
  • πŸš€ Theme Switch Performance: Smooth theme transitions with requestAnimationFrame

πŸ“· Usage Guide (AVIF Animations)

1. System Shortcut Activation

System Shortcut Activate the floating toolbar using Ctrl+Shift+K global shortcut

2. Quick Search with Floating Toolbar

Search Keywords Quickly search API keys by name or platform using the floating toolbar

3. Add New API Key

Add New API Key Click the + button to add a new API key with detailed information

4. Platform Radial Menu

Radial Menu Navigate through platforms using the radial menu with mouse wheel interaction

5. Excel Batch Import

Batch Import Import multiple API keys from Excel files with multi-language header support

6. Delete API Key

Delete Key Easily delete API keys with confirmation dialog

7. Theme and Language Switching

Change Theme and Language Switch between light/dark themes and 9 different languages instantly

🧰 Tech Stack

Frontend

  • Framework: React 19 + TypeScript + Vite 7
  • Styling: Tailwind CSS + PostCSS
  • Build Tool: Vite 7
  • Icons: Lucide React

Backend

  • Framework: Tauri 2 (Rust)
  • Database: SQLite (sqlx driver)
  • Encryption: AES-256-GCM + Argon2id
  • Plugins: Global hotkeys, file dialog, FS, etc.

Cross-platform

Windows / macOS / Linux (requires Rust & Node environment)

Security Features

  • Input normalization and format validation with auto-cleanup
  • Suspicious fragment interception (XSS, path traversal, command injection)
  • Local-only operation and storage, no remote key transmission

πŸš€ Installation & Running

Prerequisites

  • Node.js 18+
  • Rust stable toolchain (with cargo)
  • npm (or compatible package manager)

Setup

git clone https://github.com/blueraincoatli/APIkeyManager.git
cd APIkeyManager
npm install

Development

npm run tauri:dev     # Equivalent to tauri dev, starts Vite then Tauri

Production Build

npm run tauri:build   # Generates platform installation packages/executables

πŸ“‹ Excel Template Requirements

Supported Header Formats

English Format:

Name | API Key | Platform | Description

Other Languages:

  • Chinese: 名称 | API Key | 提供商 | 描述
  • Traditional Chinese: 名稱 | API Key | 提供商 | 描述
  • Portuguese: Nome | API Key | Plataforma | DescriΓ§Γ£o
  • Spanish: Nombre | API Key | Plataforma | DescripciΓ³n
  • French: Nom | API Key | Plateforme | Description
  • Italian: Nome | API Key | Piattaforma | Descrizione
  • Japanese: 名前 | API Key | γƒ—γƒ©γƒƒγƒˆγƒ•γ‚©γƒΌγƒ  | θͺ¬ζ˜Ž
  • Russian: НазваниС | API Key | ΠŸΠ»Π°Ρ‚Ρ„ΠΎΡ€ΠΌΠ° | ОписаниС

Example

Name: OpenAI GPT-4
API Key: sk-xxxxxxxx...
Platform: OpenAI
Description: Used for GPT-4 access

Note: Empty lines are skipped; at least "Name" and "API Key" are required. System automatically recognizes header language format.

🧭 Project Structure

src/
β”œβ”€ components/
β”‚  β”œβ”€ FloatingToolbar/         # Floating toolbar
β”‚  β”œβ”€ RadialMenu/              # Radial menu
β”‚  β”œβ”€ AddApiKey/               # Add/batch import dialog
β”‚  β”œβ”€ SearchResults/           # Search results & list
β”‚  β”œβ”€ VirtualScroll/           # Virtual scroll component
β”‚  └─ ThemeToggle/             # Theme toggle component
β”œβ”€ services/
β”‚  β”œβ”€ apiKeyService.ts         # Backend command interaction
β”‚  β”œβ”€ inputValidation.ts       # Normalization & validation
β”‚  β”œβ”€ excelService.ts          # Excel parsing with multi-language
β”‚  β”œβ”€ searchOptimizationService.ts  # Search optimization
β”‚  β”œβ”€ securityService.ts       # Security services
β”‚  └─ toastService.ts          # Notification service
β”œβ”€ contexts/
β”‚  β”œβ”€ ThemeContext.tsx         # Theme context
β”‚  └─ LocaleContext.tsx        # Internationalization context
β”œβ”€ hooks/
β”‚  β”œβ”€ useSearch.ts             # Search functionality hook
β”‚  β”œβ”€ useAdaptiveTheme.ts      # Adaptive theme hook
β”‚  β”œβ”€ useBackgroundGradient.ts # Background gradient hook
β”‚  └─ useThemeTransition.ts    # Theme transition hook
β”œβ”€ i18n/
β”‚  └─ languages/               # Multi-language translation files
β”‚      β”œβ”€ zh-CN.ts             # Simplified Chinese
β”‚      β”œβ”€ en-US.ts             # English
β”‚      └─ ... (8 other languages)
β”œβ”€ styles/
β”‚  β”œβ”€ theme.css                # Theme styles
β”‚  └─ tokens.css               # Design tokens
└─ ...

public/
β”œβ”€ preview.html                # Independent preview window (multi-language)
β”œβ”€ preview-i18n.js             # Preview window i18n support
└─ templates/
    └─ api_key_template.xlsx   # Excel template (multi-language)

src-tauri/
β”œβ”€ src/
β”‚  β”œβ”€ commands/
β”‚  β”‚  β”œβ”€ api_key_commands.rs       # CRUD operations
β”‚  β”‚  β”œβ”€ batch_import_commands.rs  # Batch import commands
β”‚  β”‚  └─ window_commands.rs        # Window management (multi-language)
β”‚  β”œβ”€ database/                    # SQLite access (sqlx)
β”‚  β”œβ”€ security/                     # Security module
β”‚  └─ lib.rs / main.rs             # Tauri application entry
└─ tauri.conf.json                 # Tauri configuration

πŸ‘©β€πŸ’» Developer Guide

Common Scripts

  • Development: npm run tauri:dev
  • Build: npm run tauri:build
  • Unit Tests: npm run test
  • Test UI: npm run test:ui

Code Style

TypeScript + React componentization; camelCase for frontend-backend interfaces

Batch Import Interface

Backend: import_api_keys_batch(keys) (fields: name, keyValue, platform, description)

Multi-language Development Guide

Adding New Language

  1. Create new language file in src/i18n/languages/ (e.g., de-DE.ts)
  2. Reference existing format and translate all text
  3. Register new language in src/i18n/index.ts
  4. Add translation in public/preview-i18n.js
  5. Add window title translation in get_preview_window_title function

Independent Window i18n

  • Preview window uses independent i18n system (preview-i18n.js)
  • Supports data-i18n attribute for translatable elements
  • Window titles set dynamically via backend commands

Excel Header Multi-language Support

  • Define COLUMN_HEADERS mapping in src/services/excelService.ts
  • System auto-detects current language and matches headers
  • Intelligent fallback to default language when match fails

🌍 Multi-language Support

API Key Manager supports 9 languages:

Language Code Status
Simplified Chinese zh-CN βœ… Full Support
English en-US βœ… Full Support
Traditional Chinese zh-TW βœ… Full Support
Portuguese pt-BR βœ… Full Support
Spanish es-ES βœ… Full Support
French fr-FR βœ… Full Support
Italian it-IT βœ… Full Support
Japanese ja-JP βœ… Full Support
Russian ru-RU βœ… Full Support

Language Switching

  • Select desired language in settings panel
  • Interface updates immediately to selected language
  • Independent preview window syncs language
  • Excel import matches headers based on current language

🀝 Contributing

Welcome to submit Issues / PRs to improve product experience and stability.

Special Thanks

  • Thanks to all developers who contributed to multi-language translations
  • Thanks to users who provided bug feedback and feature suggestions

πŸ“„ License

MIT License


Project Status: 🌟 Multi-language internationalization support completed - 2025-09-22

Latest Version: v0.1.0 with MSI installer available in src-tauri/target/release/bundle/msi/