HuLa Documentation

repository·master·Indexed 27 days ago

https://github.com/hulaspark/hula

A high-performance, cross-platform instant messaging system built with Vue 3, Vite 7, TypeScript, and the Tauri framework. Supports Windows 10/11, macOS 10.5+, Ubuntu 22.0+, iOS 9.0+, and Android 12+ (SDK30+). Documentation covers environment configuration, Android SDK setup, emulator and physical device debugging, and local development using pnpm and Rust.

Tokens
19.8K
Snippets
33
Records
170
Agent score
92%

What's inside HuLa

  1. Overview of HuLa features

    master

    HuLa is a cross-platform communication application with the following feature sets:

    User Authentication

    • Username/Password Login
    • QR Code Scan Login
    • Multi-device Login Management

    Message Communication

    • One-on-one Private Chat & Group Chat
    • Message Recall, @Mentions, and Replies
    • Message Read Status and Emoji support
    • Link Preview Cards and Message Likes
    • Chat History Management

    Social Management

    • Friend management (Add/Remove, Search, Online Status, Badges)
    • Group management (Creation, Announcements)
    • Block & Do Not Disturb features
    • Location sharing and Message forwarding

    System & UX

    • Modern UI with Dark/Light themes and Skin switching
    • Multi-window management and System Tray notifications
    • Voice and Video calling
    • File uploads (via Qiniu Cloud)
    • AI Chat Assistant with multi-platform support
    • Cross-platform: Windows, macOS, Linux, iOS, and Android
  2. Overview of HuLa Instant Messaging System

    master

    HuLa is an instant messaging system designed for efficient, secure, and user-friendly communication. It is built using a modern tech stack to provide a high-performance experience across multiple platforms.

    Core Tech Stack:

    • Tauri: Lightweight, high-performance desktop application container.
    • Vite 7: Modern frontend build tool for fast development and optimized production packaging.
    • Vue 3: Progressive JavaScript framework for reactive user interfaces.
    • TypeScript: Provides type safety and improved developer tooling.
  3. Overview of HuLa

    master

    HuLa is an instant messaging system built using a modern web and desktop technology stack. It provides a secure, efficient, and user-friendly communication solution across multiple platforms including desktop and mobile.

    Key components of the stack include:

    • Tauri: Lightweight, high-performance desktop application container.
    • Vite 7: Fast frontend build tool and development server.
    • Vue 3: Progressive JavaScript framework for reactive user interfaces.
    • TypeScript: Type-safe superset of JavaScript.
  4. HuLa Technology Stack

    master

    The project is built with the following technologies:

    • Tauri: Provides a lightweight, high-performance desktop application container for cross-platform development.
    • Vite 7: A modern frontend build tool used for a fast development server and optimized production bundling.
    • Vue 3: A progressive JavaScript framework used for building the user interface via the Composition API.
    • TypeScript: A superset of JavaScript that adds static typing for improved error catching and editor support.
  5. Understand the HuLa project stack

    master

    HuLa is built using a hybrid stack designed for cross-platform desktop and mobile applications:

    • Backend/Desktop Core: Tauri v2 and Rust.
    • Frontend Framework: Vue 3 (Composition API) with Vite 7 and TypeScript.
    • State Management: Pinia, supplemented by pinia-plugin-persistedstate and pinia-shared-state.
    • Styling: UnoCSS and Sass.
    • UI Components: Naive UI for desktop interfaces and Vant for mobile interfaces.
    • Database: SeaORM with SQLite (using SQLCipher for encryption).
    • Internationalization: vue-i18n.
  6. System Requirements for HuLa

    master

    Before developing with HuLa, ensure your system meets the following requirements:

    Required Environments

    EnvironmentVersion RequirementDescription
    Node.js^20.19.0 or >=22.12.0JavaScript runtime
    pnpm>=10.xPackage manager (mandatory)
    RustLatest stable versionRequired for Tauri backend development
    Git2.0+Version control

    Supported Operating Systems

    • Windows: Windows 10, Windows 11
    • macOS: macOS 10.15+
    • Linux: Ubuntu 20.04+
    • iOS/iPadOS: iOS 13.0+, iPadOS 13.0+
    • Android: Android 8.0+ (API 26+)
  7. Navigate the HuLa repository layout

    master

    The repository is organized into frontend, backend, and plugin directories:

    Frontend (src/)

    Contains the Vue application source code:

    • views/, components/, layout/: UI structure.
    • services/: API and logic services.
    • stores/: Pinia state management.
    • hooks/: Vue composition functions.
    • router/: Routing configuration.
    • utils/: Helper functions.
    • mobile/: Specific views, components, and layouts optimized for mobile.

    Backend (src-tauri/)

    Contains the Rust application logic:

    • src/: Core application logic, Tauri commands, and desktop/mobile modules.
    • entity/: SeaORM database entities.
    • migration/: SeaORM database migrations.

    Plugin (tauri-plugin-hula/)

    • Contains the local Tauri plugin implementation.
  8. Understand the HuLa Project Structure

    master

    The project is divided into frontend and backend directories:

    • src/: Vue 3 frontend source code (TypeScript + Vite).
      • src/components/: Reusable Vue components.
      • src/stores/: State management using Pinia.
      • src/services/: API service layer using Axios.
      • src/hooks/: Vue 3 Composition API Hooks.
      • src/styles/: Global styles (Sass + UnoCSS).
    • src-tauri/: Tauri Rust backend source code.
      • src-tauri/src/: Core Rust logic.
      • src-tauri/entity/: Database entities.
      • src-tauri/migration/: Database migrations.
      • src-tauri/tauri.conf.json: Main Tauri configuration.
    • public/: Static assets (AI resources, avatars, emojis, sounds, etc.).
    • scripts/: Build and development scripts.
  9. Quickstart: Clone, Install, and Run HuLa

    master

    Follow these steps to get the project running locally:

    1. Clone the repository from GitHub or Gitee.
    2. Install dependencies using pnpm install. If you are in China, you may need to set the registry to https://registry.npmmirror.com/.
    3. Run the development environment using the appropriate command for your target platform.
    4. Build the production version using the build command.
  10. Implement Frontend Changes

    master

    When modifying the frontend, follow these requirements:

    • Confirm the target platform (desktop/mobile) and the specific window or view being modified.
    • Maintain consistency by reusing existing view and component patterns from adjacent files.
    • If adding a new view, you must update the routes in src/router/index.ts.
    • For any new user-facing strings, add corresponding i18n keys under the locales/ directory.
    • Use UnoCSS utilities and shared design tokens defined in src/styles/scss/global/variable.scss.
  11. Configure Android Environment Variables

    master

    Ensure the following environment variables and path entries are configured (assuming C:\env\android\ is your base directory):

    HOME Variables:

    • JAVA_HOME: Must be JDK 17.0 or higher.
    • ANDROID_HOME: C:\env\android\
    • NDK_HOME: C:\env\android\ndk\28.2.13676358

    Path Entries:

    • C:\env\android\cmdline-tools\latest\bin
    • C:\env\android\ndk\28.2.13676358
    • C:\env\android\emulator
    • C:\env\android\platforms\android-35
    • C:\env\android\platform-tools