Ziya/README.md
2025-06-27 07:27:24 +07:00

4.6 KiB
Raw Blame History

Ziya - Slint Edition

One stop shop for your trading habit - Now powered by Slint and Rust!

/dˤiˈjaːʔ/, "zeeyah" — Proper noun, meaning "light"
A bismillahDAO creation

Overview

This is a modern rewrite of the Ziya trading platform using Slint for the UI and Rust for the backend logic. Slint provides a declarative UI language that makes it easy to create beautiful, native desktop applications.

Features

  • Modern Native UI: Built with Slint's declarative UI language
  • Fast Performance: Native Rust performance with efficient rendering
  • Clean Architecture: Separated UI and business logic
  • Async Operations: Non-blocking token fetching and user management
  • Modular Design: Well-organized codebase with clear separation of concerns

Application States

  • Loading: Initial app startup and initialization
  • Login: User authentication interface
  • Dashboard: Main trading dashboard with token search
  • Hunting Ground: Advanced trading tools (placeholder)
  • Profile: User profile and wallet information

Project Structure

ziya-slint/
├── src/
│   ├── main.rs              # Application entry point
│   ├── lib.rs               # Module organization
│   ├── app_state.rs         # Application state management
│   └── services/            # Business logic services
│       ├── mod.rs
│       ├── token_service.rs # Token data and search
│       └── user_service.rs  # User authentication and profiles
├── ui/
│   └── app-window.slint     # Main UI definition
├── Cargo.toml               # Project dependencies
└── build.rs                 # Build configuration

Getting Started

Prerequisites

  • Rust 1.70+ (recommended via rustup)
  • Git

Installation

  1. Clone the repository:

    git clone <repository-url>
    cd ziya-slint
    
  2. Build and run:

    cargo run
    

Development

Running in Development Mode

# Run with debug logging
RUST_LOG=debug cargo run

Building for Release

cargo build --release

Architecture

UI Layer (Slint)

The UI is defined in ui/app-window.slint using Slint's declarative language. Key features:

  • State-based rendering: Different UI states for loading, login, dashboard, etc.
  • Reactive properties: Automatic UI updates when data changes
  • Component composition: Reusable UI elements
  • Modern styling: Clean, professional design

Business Logic (Rust)

  • Services Pattern: Separate services for different concerns
  • Async/Await: Non-blocking operations for better UX
  • Error Handling: Proper error propagation with anyhow
  • Type Safety: Strong typing throughout the application

Key Components

  1. TokenService: Handles token data fetching and search
  2. UserService: Manages user authentication and profiles
  3. AppState: Central application state management
  4. Main: Coordinates UI and business logic

Comparison with Vue/Electron Version

Aspect Vue/Electron Slint/Rust
Performance ~50MB memory, slower startup ~10MB memory, instant startup
Bundle Size ~100MB with Node.js ~5MB standalone binary
Development Hot reload, web tools Fast compilation, native debugging
Deployment Requires Node.js runtime Single self-contained binary
UI Development HTML/CSS/JS knowledge required Slint DSL (QML-like, simpler)
Type Safety TypeScript (optional) Full Rust type safety

Contributing

This is part of the bismillahDAO ecosystem. When contributing:

  1. Follow Rust conventions and best practices
  2. Keep UI logic in Slint files, business logic in Rust
  3. Write tests for business logic
  4. Update documentation for new features

Migration Status

Completed Features

  • Basic application structure
  • Loading, login, and dashboard states
  • Token list display and search
  • User profile management
  • Navigation between views
  • Mock data services

🚧 In Progress

  • Real API integration
  • Advanced token analysis
  • Wallet integration
  • Trading features

📋 Planned Features

  • Real-time token price updates
  • Advanced charting
  • Portfolio tracking
  • Trading automation
  • Export/import functionality

License

MIT License - see LICENSE file for details.

About bismillahDAO

This project is created by bismillahDAO, focused on building ethical and innovative trading tools for the cryptocurrency community.