hasyx
v0.1.339
😈 Hasyx
🧪 Diagnostics
🟡 PWA Diagnostics
🟢 Constructor
🟠 A-Frame
🟢 Cyto
🟡 Payments
🟢 Telegram
🟠 Roadmap
📚 Documentation
AI Architecture
Core Components
1. Dialog Class
Usage
Dialog Events (`DialogEvent`)
2. AIProvider Interface
3. Tooler and Tool Classes
Tool Execution Flow
Apollo Client
useCreateApolloClient
Purpose
Arguments
Return Value
Key Features
How `roleLink` Works
AI Assistant CLI (`ask`)
Quick Start
Non-Interactive Mode (`-e`)
Provider and Model Selection
Interactive Mode
How It Works
Features
🎨 Beautiful Terminal Output
Formatted Output Features
Example Formatted Output
🎯 Real-time Progress Indicators
Progress Indicators
Example Output with Syntax Highlighting
Automatic Code Execution
Multi-iteration Processing
Installation & Setup
1. Install Hasyx
2. Get OpenRouter API Key
3. Configure Environment
Usage
Direct Question Mode
Interactive Chat Mode
Examples
Coding Questions
Math and Calculations
General Knowledge
Interactive Session Example with Real-time Streaming
Available Models
List Available Models
Provider Support
Example Output
Using Specific Models
Programmatic Access
Model Information
Configuration
Default Settings
Model Information
Error Handling
Missing API Key
API Errors
Interactive Mode Issues
Integration with Hasyx Projects
npm Scripts
Environment Loading
CLI Integration
Advanced Usage
Coding Assistance Workflow
Learning and Documentation
Problem Solving
Tips and Best Practices
Effective Question Asking
Interactive Mode Tips
Performance Tips
Troubleshooting
Common Issues
Debug Mode
Related Documentation
API Reference
Command Syntax
Options
Exit Codes
Environment Variables
Examples Repository
Contributing
Command Options
Architecture
Class Hierarchy
Key Files
AskOptions Configuration
Example Usage in Child Projects
Execution Engine Control
Auth Helpers
Purpose
Usage
`WsClientsManager` (WebSocket Authentication)
`getTokenFromRequest` (HTTP/WebSocket Token Retrieval)
Test Authentication Helper
`testAuthorize` (Development & Testing Only)
Dependencies
Telegram Login Authentication
CloudFlare DNS Management
Purpose
Core Features
DNS Record Management
SSL Integration Support
API Integration
Idempotent Operations
Prerequisites and Configuration
Environment Configuration with Assist
Manual Environment Configuration
Getting CloudFlare Credentials
Environment Variables Usage
Usage
Basic Usage
Environment-Based Configuration
Advanced Usage
Configuration Options
CloudflareConfig Interface
SubdomainDnsConfig Interface
Environment Variables
Core Methods
DNS Record Information
DNS Record Operations
Idempotent Operations
SSL Integration Methods
DNS Record Structure
DnsRecord Interface
Integration with Other Modules
With SSL Management
With Nginx Configuration
Complete Subdomain Setup
Error Handling
Common Error Scenarios
Configuration Validation
Best Practices
1. Use Define/Undefine for Idempotency
2. Configure TTL Appropriately
3. Use Proxied Records Wisely
4. Environment-Based Configuration
Security Considerations
API Token Security
DNS Security
Domain Management
Troubleshooting
Common Issues
🏗️ Hasyx Query Constructor
🚀 Quick Start
🧩 Component Architecture
Core Components
Integration Examples
🔍 Interface Overview
Left Panel: Query Builder
Right Panel: Multi-View Tabs
Modal Dialog Interface
📖 Core Features
Smart Primary Key Detection
Primary Key Visual Indicators
Auto-populated Physical Fields
Pagination Controls
Multi-field Sorting
Nested Relations
🎛️ Query Builder Sections
Table Selection
Where Conditions
Pagination Section
Order By Section
Returning Fields
📊 Result Tabs
`exp` Tab
`gql` Tab
`query` Tab
`subscription` Tab
🔧 Complete State Interface
🎯 Field Type Support
String Fields
Numeric Fields (Int, Float, BigInt)
Boolean Fields
DateTime Fields
UUID Fields
JSONB Fields
🚀 Schema Integration
Automatic Schema Loading
Field Detection Logic
Primary Key Detection
Smart Query Optimization
⚡ Performance Features
Efficient Field Sorting
Smart Auto-population
Optimized Queries
🎨 UI/UX Design
Minimal Inline Design
Visual Organization
Accessibility
Graph Visualizations
Overview
Core Components
1. `<Cyto />`
2. `<CytoNode />`
3. `<CytoEdge />`
4. `<CytoStyle />`
5. `useGraph()`
Comprehensive Usage Example
Automated Graph Rendering with `hasyx/lib/renderer`
Key Aspects and Benefits
Events System Documentation
Overview
Supported Trigger Types
Event Triggers (Data Triggers)
Cron Triggers (Scheduled Tasks)
Architecture Flow
Trigger Definitions
Directory Structure
Event Trigger Configuration Format
Configuration Options
CLI Commands
API Route Handlers
Default Handler: `/app/api/events/[name]/route.ts`
Custom Handlers
Payload Structure
Security
HASURA_EVENT_SECRET
Request Verification
Environment Variables
Required Variables
Optional Variables
Workflow Examples
1. Adding a New Event Trigger
2. Adding a New Cron Trigger
3. Handling User Registration Events
4. Debugging Events
Cron Schedule Format
Common Cron Examples
Cron Expression Tools
Troubleshooting
Common Issues
Debug Commands
Advanced Usage
Manual Event Triggers
Custom Retry Configuration
Multiple Environment Support
Advanced Cron Trigger Features
Integration with Other Systems
Email Notifications
Analytics Tracking
External API Synchronization
Best Practices
General Practices
Event Trigger Specific
Cron Trigger Specific
Related Documentation
TypeScript Execution
Features
Persistent State Management
Using results[uuid] for Persistent State
TypeScript Browser Automation Example
Database Connection with Types
Benefits for TypeScript Development
Installation
Usage
Basic Usage
With Context
Factory Function
Configuration
Compiler Options
Strict Mode
TypeScript Features Supported
Type Annotations
Interfaces
Type Aliases
Generics
Enums
Type Assertions
API Reference
Class: ExecTs
Interface: ExecTsOptions
Configuration Loading
TypeScript Detection
Error Handling
Integration with CLI
Best Practices
Examples
Working with Hasyx Client
Complex Type Operations
Troubleshooting
Common Issues
Debug Mode
See Also
Code Execution
Purpose
Core Features
Environment Detection
Execution Context Management
Usage
Basic Usage
Factory Function
Advanced Context Management
Execution with Context Extension
Configuration Options
ExecOptions Interface
Example with Options
Dynamic Module Loading with use-m
Basic use-m Usage
Package Version Specification
How use-m Works
use-m Features
Error Handling with use-m
Performance Considerations
Async/Await Support
Built-in Objects and Functions
Available Globals
Environment-Specific Globals
Error Handling
Syntax Errors
Runtime Errors
Timeout Handling
Advanced Examples
Complex Data Processing
Async Data Processing
Function Definitions and Execution
Environment Detection
Static Methods
Usage in Code
Security Considerations
Context Isolation
Timeout Protection
Environment Safety
Testing
Integration Examples
CLI Tool Integration
Dynamic Code Evaluation
Dynamic Package Loading with use-m
Microservice with Dynamic Dependencies
Best Practices
Query Generator
Purpose
Usage
Accessing the Schema
Options (`GenerateOptions` Interface)
Examples
JSONB Operations
1. Advanced Nested Query (Appending to Defaults)
2. Basic Query with `where`
3. Query with Pagination and Sorting
4. Query by Primary Key
5. Nested Query with Parameters and Alias
6. Aggregate Query
7. Insert Mutation (Single Object)
8. Insert Mutation (Bulk)
9. Update Mutation by Primary Key
10. Update Mutation by `where` Condition
11. Delete Mutation by Primary Key
12. Delete Mutation by `where` Condition
13. Subscription
14. Query with `distinct_on`
15. Advanced Nested Query with `where` Conditions
16. Deeply Nested Relations (Multiple Levels)
17. Complex `where` Clauses with Logical Operators
18. Using Field Aliases with Parameters
19. Mixed Array and Object Notation for Relations
20. Multiple Nested Relationships with Different Parameters
21. Nested Aggregate Query (Relations with Aggregation)
22. Combined Aggregate with Regular Data
23. Aggregate Functions with Column Specifications
24. Top-level Aggregate Query with Nodes
25. Upsert (Insert with `on_conflict`)
Advanced Aggregation Patterns
Real-world Tournament Example
GraphQL Proxy
🎯 Purpose
🤔 Why is it needed?
⚙️ How it Works
1. GET Requests
2. POST Requests (Queries / Mutations)
3. WebSocket Connections (Subscriptions) - via `SOCKET`
🔧 Configuration
🔗 Client Integration
✅ Summary
Hasura Client
Overview
Constructor
Options
Core Methods
Schema Operations
Table Operations
Column Operations
Function Operations
Trigger Operations
Foreign Key Operations
View Operations
Relationship Operations
Hasyx Class
Core Components
Key Features (Both Class & Hooks)
User Management
User Properties
Automatic Session Sync
Session Hook
Diagnostics
`Hasyx` Class Usage
`Hasyx` Class Methods
`Hasyx` Class Properties
`HasyxClient` Class (Client-Side)
Key Features
Usage with `useClient()` Hook
`HasyxClient` Methods
React Hooks Usage
HID Standard
Overview
Format
Components:
Segment Rules:
`lib/hid.ts` Utility
Initialization
`HidInstance` Methods
Environment Variable: `NEXT_PUBLIC_HID_NAMESPACE`
Use Cases
Hasyx View and Automated HID Generation
Computed Columns for Relationships
`public.hasyx` View Structure
Automated Relationships
Hasyx Logs System
Overview
Architecture
Database Schema
Configuration
hasyx.config.json
CLI Commands
Apply Configuration
Testing
Diffs System
Features
Workflow
Implementation
States System
Features
Workflow
Implementation
Event Triggers
Diffs Event Trigger
Workflow Example
Security & Permissions
Database Protections
Trigger Protection
Testing
Test Coverage
Test Strategy
Dependencies
Migration
Migration File Structure
Apply Migration
Production Considerations
Performance
Monitoring
Security
Scalability
Integration
CLI Integration
Markdown Terminal
Features
Installation
Basic Usage
Simple Formatting
Code Blocks
Lists and Tables
Advanced Usage
Custom Themes
Utility Functions
Supported Markdown Elements
Headers
Text Formatting
Code Blocks
Lists
Links and Images
Blockquotes
Tables
Horizontal Rules
Configuration Options
FormatMarkdownCustom Options
Integration Examples
With Ask Command
With Custom CLI Tools
With Documentation Generators
API Reference
Functions
Examples
Complete Example
Testing Example
Best Practices
1. Use Appropriate Functions
2. Handle Long Content
3. Choose Appropriate Themes
4. Error Handling
Troubleshooting
Common Issues
Debug Mode
Dependencies
Related Documentation
Nginx Configuration Management
Purpose
Core Features
Path Auto-Detection
Site Management
Safety Features
Prerequisites
Usage
Basic Usage
Custom Path Configuration
SSL Configuration
Configuration Options
NginxConfig Interface
SiteConfig Interface
Core Methods
Site Information
Site Operations
Idempotent Operations
Enable/Disable Operations
Configuration Examples
Basic HTTP Reverse Proxy
HTTPS with SSL Certificates
Custom Configuration with Multiple Locations
Integration with Other Modules
With SSL Management
With CloudFlare DNS
Generated Configuration
HTTP Only Configuration
HTTPS with Redirect Configuration
Path Detection Logic
Supported Distributions
Error Handling
Common Error Scenarios
Configuration Validation
Best Practices
1. Use Define/Undefine for Idempotency
2. Always Use SSL in Production
3. Configure Proper Proxy Headers
4. Use Custom Configuration for Complex Setups
Security Considerations
SSL Configuration
Proxy Security
File Permissions
Troubleshooting
Common Issues
Web Push Notifications with Firebase Cloud Messaging (FCM) in Hasyx
How It Works: End-to-End Flow
Prerequisites & Setup
Customizing Notifications
Advanced FCM Options
Client-Side Service Worker (`firebase-messaging-sw.js`)
Firebase Notifications
How It Works: End-to-End Flow
Prerequisites & Setup
Customizing Notifications
Advanced FCM Options
Client-Side Service Worker (`firebase-messaging-sw.js`)
Telegram Bot Integration in Hasyx
Features
Setup
How it Works
Customization
Push Notifications
Core Concepts
Workflow Overview
Platform Support Status
Ollama Integration
1. Installation and Setup
Install Ollama
Download Models
Manage Models
2. Usage with Hasyx `ask` CLI
Non-Interactive Mode
Interactive Mode
OpenRouter Integration
1. Setup
2. Usage with Hasyx `ask` CLI
Non-Interactive Mode
Interactive Mode
PWA Support
Features
Quick Start
1. Generate PWA Assets
2. Enable PWA in Your App
3. Use PWA Components
4. Use PWA Hooks
Configuration
Environment Variables
Customizing the Web App Manifest
Customizing App Icons
Service Worker Caching Strategies
Network First (API Calls)
Cache First (Static Assets)
Stale While Revalidate (Pages)
Offline Support
GraphQL Offline Handling
Custom Offline Pages
Platform-Specific Features
iOS Safari
Android Chrome
Desktop Browsers
Testing PWA Features
1. Chrome DevTools
2. PWA Checklist
3. Testing Installation
4. Testing Offline
Deployment Considerations
HTTPS Requirement
Service Worker Scope
CDN and Caching
Integration with Existing Features
Firebase Notifications
GraphQL Subscriptions
Authentication
Troubleshooting
Service Worker Not Registering
Install Prompt Not Showing
Offline Functionality Not Working
Notifications Not Working
Best Practices
1. Progressive Enhancement
2. User Communication
3. Graceful Degradation
4. Performance Optimization
Advanced Usage
Custom Service Worker
Background Sync
Push Notification Customization
API Reference
`usePWA()` Hook
PWA Utility Functions
Development Mode
Development vs Production Behavior
Enabling PWA in Development
Development Utilities
Development Cache Management
Service Worker Development Behavior
Troubleshooting Development Issues
Configuration
Best Practices for Development
Migration from Previous Versions
Learn More
Development Mode
Development vs Production Behavior
Enabling PWA in Development
Development Utilities
Development Cache Management
Service Worker Development Behavior
Troubleshooting Development Issues
Configuration
Best Practices for Development
Migration from Previous Versions
Hasyx Data Renderer for Graph Visualizations
Overview
Core Components
1. `<QueriesManager />`
2. `<QueriesRenderer />`
3. `<CytoNodeRenderer />`
4. `<CytoEdgeRenderer />`
5. `RowParser()`
Comprehensive Usage Example
Summary
SSL Certificate Management
Purpose
Core Features
Certificate Management
Wildcard SSL Support
DNS Integration
Idempotent Operations
Prerequisites and Configuration
System Requirements
Environment Configuration with Assist
Manual Environment Configuration
Environment Variables Usage
Usage
Basic Individual Certificate Usage
Wildcard Certificate Usage
Environment-Based Configuration
Advanced Usage with DNS Waiting
Configuration Options
SSLConfig Interface
WildcardCertificateInfo Interface
Environment Variables
Core Methods
Certificate Information
Certificate Operations
Idempotent Operations
DNS and Renewal Operations
Helper Methods
Integration with Other Modules
With CloudFlare DNS
With Nginx
Certificate Information Structure
CertificateInfo Interface
DNSPropagationResult Interface
Error Handling
Common Error Scenarios
Validation Checks
Best Practices
1. Use Define/Undefine for Idempotency
2. Always Wait for DNS Propagation
3. Monitor Certificate Expiration
4. Environment Configuration
Security Considerations
Certificate Storage
Email Security
DNS Security
Troubleshooting
Common Issues
Subdomain Management
Purpose
CLI Command 🌐
CLI Subcommands
CLI Environment Requirements
Core Features
Integrated Workflow
Wildcard SSL Optimization
Compatibility & Migration
Safety and Reliability
Error Handling
Prerequisites and Configuration
Environment Configuration with Assist
Manual Environment Configuration
Environment Variables Usage
Usage
Basic Usage
Environment-Based Configuration
Advanced Usage - Wildcard SSL Benefits
Configuration Options
SubdomainConfig Interface
SubdomainManagerConfig Interface
Environment Variables
Core Methods
Subdomain Operations
Workflow Details
Complete Subdomain Creation Process
Error Handling and Cleanup
Integration Examples
With Express.js Application
Multi-Service Deployment
SubdomainStatus Structure
Error Handling
Common Error Scenarios
Configuration Validation
Best Practices
1. Use Environment Configuration
2. Always Use Define/Undefine
3. Check Status Before Operations
4. Monitor SSL Expiration
Troubleshooting
Common Issues
TBank Payments
Хранение конфигурации
Реализованные методы адаптера
1. `initiatePayment`
2. `handleWebhook`
3. `getPaymentStatus`
4. `createSubscription`
5. `cancelSubscription`
6. `addPaymentMethod`
Вспомогательные/внутренние методы
Структуры данных TBank (используемые адаптером)
Полный список методов для поддержки сценариев
TBank Recurrent
📊 Текущий Статус Реализации
✅ Что Полностью Реализовано
🔄 Что Работает в Автоматическом Режиме
🎯 Готово к Тестированию
📋 План Тестирования
🚀 Готовность к Продакшену
📈 Метрики для Мониторинга
🎉 Заключение
🔒 Безопасность API Эндпоинтов
✅ Completed Features
1. Database Schema
2. Automatic Billing System
3. API Endpoints
4. UI Components
🔄 Architecture Change: Computed vs Stored Dates
Previous Approach (Stored Dates)
**NEW Approach (Computed Fields)**
Benefits of Computed Approach
PostgreSQL Functions Created
🧪 Testing Status
Manual Testing Required
Test Commands Updated
📋 Implementation Checklist
🚀 Ready for Production
Next Steps
TBank Payment Testing Guide
🎯 Полная Система Готова к Тестированию
📋 Пошаговый План Тестирования
Этап 1: Подготовка Окружения
Этап 2: Настройка Провайдера
Этап 3: Создание Тестового Плана
Этап 4: Добавление Метода Оплаты
Этап 5: Создание Подписки
Этап 6: Мониторинг Автоматических Списаний
Этап 7: Тестирование Обработки Ошибок
🔍 Команды для Диагностики
Общий Статус Системы
Debug Логи по Категориям
Детальная Информация о Подписке
📊 Ожидаемые Результаты
После Создания Подписки
После Первого Автоматического Списания
При Ошибке Списания
После Исчерпания Retry
🚨 Возможные Проблемы и Решения
Cron Событие Не Срабатывает
Методы Оплаты Не Становятся Recurrent Ready
Автоматические Списания Не Работают
✅ Критерии Успешного Тестирования
Telegram Ask Integration
Features
Architecture
Основные компоненты
Схема работы
Quick Start
1. Environment Setup
2. Basic Integration in route.ts
3. Testing
API Reference
Instance Management
Advanced Usage
Custom Ask Options
Manual AskHasyx Creation with Custom Handlers
Error Handling
Automatic Error Handling
Custom Error Handling
Performance & Optimization
Instance Lifecycle
Message Buffering
Rate Limiting
Monitoring & Debugging
Statistics
Debug Logging
Health Check
Examples
Simple Math Bot
Code Generation Bot
Telegram Bot
Features
Setup
Implementation Details
Core Components
Notification System Integration
Usage Examples
Simple Echo Bot
Command Handler
Future Enhancements
Implementation Roadmap
Resources
Telegram WebApp Integration
Архитектура
OAuth провайдеры:
Credentials провайдеры:
Telegram WebApp Integration
Компоненты
Настройка
Безопасность
Функционал WebApp
Тестирование
Развертывание
Отладка
SDK Dependencies
Заключение
Telegram Bot Webhook Configuration
Overview
Features
Automatic Webhook Setup
Security Features
Usage
CLI Commands
Configuration Process
Environment Variables
Webhook Endpoint
Technical Implementation
URL Processing
API Call
Error Handling
Testing
Integration
Security Notes
Troubleshooting
Common Issues
Debug Information
GitHub → Telegram Bot Integration
🎯 Overview
🏗️ Architecture
Components:
🔧 Setup Instructions
1. Enable in Your Project
2. Configure Environment Variables
3. GitHub Repository Secrets
4. Telegram Bot Setup
📋 Configuration Options
GITHUB_TELEGRAM_BOT Modes:
Target Workflows:
🔄 How It Works
Workflow Sequence:
Message Content:
🧪 Testing
Test Mode:
Local Testing:
📊 API Integrations
GitHub API:
OpenRouter AI API:
Telegram Bot API:
🛠️ Customization
Message Templates:
Workflow Timing:
Target Workflows:
🔍 Troubleshooting
Common Issues:
🔗 Related Documentation
🤝 Contributing
Terminal Library
Table of Contents
Installation
Basic Usage
Configuration
Default Configuration
API Reference
Constructor
Lifecycle Methods
Command Execution
Input Methods
Terminal Control
State Methods
Information Methods
Factory Functions
Shell Terminals
Interactive Environments
System Terminals
Remote Terminals
Event Handling
Event Emitter Interface
Event Handler Options
Session Management
Command History
Session Information
Output Management
Error Handling
Common Error Scenarios
Global Cleanup
Best Practices
Resource Management
Error Handling
Performance
Examples
Basic Command Execution
Interactive Shell Session
Development Environment Setup
File Operations
Process Management
Testing
Test Categories
Test Design Principles
Dependencies
Platform Support
Security Considerations
Contributing
License
Tinkoff API Documentation
Base URL
Available Endpoints
Init
GetState
Confirm
Cancel
AddCard
GetCardList
RemoveCard
Charge
Authentication and Security
Token Generation
Response Format
Resources
Note
Use-Query Hook
Features
Installation
Basic Usage
1. Create Individual Query Hooks
2. Create Multiple Queries at Once
3. Utility Hooks for Common Types
API Reference
Utility Hooks
Setter Functions
Direct Value Setting
Functional Updates
URL Behavior
Parameter Serialization
URL Examples
Empty Values
Real-World Example
Best Practices
1. Choose Meaningful Parameter Names
2. Provide Sensible Defaults
3. Use TypeScript for Complex Objects
4. Keep URLs Clean
5. Group Related Queries
Integration with Next.js
Performance Considerations
Troubleshooting
Common Issues
Debug Tips
Migration from Other State Management
From useState
From Zustand
From Redux
Wstunnel Integration
⚠️ КРИТИЧЕСКИ ВАЖНО: Системные требования
Обязательная установка wstunnel binary
Обзор
Архитектура
Компоненты
1. API Endpoint
2. Основная логика
3. Утилиты
Переменные окружения
Использование
Программный API
HTTP API
Тестовый клиент
Безопасность
Vercel Protection
Изоляция процессов
Тестирование
Запуск тестов
Структура тестов
Условное выполнение
Требования системы
Обязательные зависимости
Проверка зависимостей
Примеры интеграции
Express.js приложение
Next.js API Route
Troubleshooting
Частые проблемы
Логирование
Производительность
Лимиты
Мониторинг
Changelog
v1.0.0 (2025-01-XX)
Sidebar Components
Components
SidebarLayout
UserProfileDropdown
Features
Dependencies
Usage with Authentication
Styling
Library Structure
Import Structure
Client-Safe Imports
Server-Only Imports
Files
Migration Guide
Toggle Sidebar
hasyx
Loading...