Skip to content

beclab/market

Repository files navigation

Market - Application Store System

Market is an application store backend service developed in Go, providing core functionalities such as application management, task scheduling, and payment processing.


System Architecture

Market System Overall Architecture

The Market system consists of two core projects that work together to provide a complete application store service:

  • Market Project: Core application store service, responsible for application information management, task processing, payment processing, and API services
  • Dynamic Chart Repository Project: Helm Chart dynamic repository, responsible for Chart rendering, image analysis, and state management

The two projects interact through API interfaces, including:

  • Application Rendering: Market synchronizes application data to Chart Repository for rendering processing
  • Data Synchronization: Market retrieves state changes and application information from Chart Repository
  • Configuration Management: Market shares market source configuration with Chart Repository
  • Status Monitoring: Market retrieves runtime status information from Chart Repository

πŸ“– Market System Architecture | δΈ­ζ–‡η‰ˆ

Market Project Internal Architecture

The Market project adopts a layered architecture design, mainly including the following layers:

  • API Service Layer: Provides RESTful API services, supporting both v1 and v2 interface versions
  • Core Business Modules: Including core functional modules such as application management, task management, payment management, and runtime status
  • Data Storage Layer: Uses Redis for persistent storage, with in-memory cache providing high-performance data access
  • Data Processing Layer: Includes data synchronizer (Syncer), data processor (Hydrator), and status monitor (DataWatcher)

The system achieves high cohesion and low coupling through modular design, with each module working together to provide complete application store service capabilities.

πŸ“– Market Project Internal Architecture | δΈ­ζ–‡η‰ˆ


Feature Modules

Core Features

πŸ“¦ Application Management

Provides complete application lifecycle management functionality, including application installation, uninstallation, upgrade, cloning, and other operations.

  • Application installation, uninstallation, upgrade, cloning
  • Application information query and synchronization
  • Application configuration management
  • Application status monitoring
  • Application version history query
  • Application lifecycle control (resume, stop, open)

πŸ“– Market Project Internal Architecture | δΈ­ζ–‡η‰ˆ
πŸ“– API Reference Documentation | δΈ­ζ–‡η‰ˆ
πŸ“– Other Features | δΈ­ζ–‡η‰ˆ

πŸ“‹ Application Information

Provides application information query and synchronization functionality, supporting batch queries and on-demand retrieval.

  • Application information query (supports batch queries)
  • Application information synchronization

πŸ“– Market Project Internal Architecture | δΈ­ζ–‡η‰ˆ
πŸ“– API Reference Documentation | δΈ­ζ–‡η‰ˆ

πŸ’³ Payment Management

Provides complete application payment process management, including payment state machine, payment polling, and frontend payment event handling.

  • Payment state machine management
  • Payment polling mechanism
  • Frontend payment event handling
  • Payment receipt management
  • Developer verification and authorization

πŸ“– Payment Module Documentation | δΈ­ζ–‡η‰ˆ
πŸ“– API Reference Documentation | δΈ­ζ–‡η‰ˆ


Core Feature Architecture & Implementation

πŸ”„ Data Synchronization

Provides efficient frontend data synchronization mechanism, supporting incremental updates and on-demand updates.

  • Hash-based data change detection
  • Incremental data synchronization
  • On-demand data retrieval
  • Data cache management

πŸ“– Incremental Update System Documentation | δΈ­ζ–‡η‰ˆ
πŸ“– API Reference Documentation | δΈ­ζ–‡η‰ˆ

βœ… Status Correction

Ensures consistency between cached application status and actual runtime status, automatically detecting and correcting status differences.

  • Status consistency checking
  • Automatic status correction
  • Status difference detection
  • Correction event recording

πŸ“– Status Correction Module Documentation | δΈ­ζ–‡η‰ˆ

βš™οΈ Task Management

Provides asynchronous task scheduling and execution mechanism, supporting task status tracking, cancellation, and retry.

  • Asynchronous task scheduling and execution
  • Task status tracking
  • Task cancellation and retry mechanism
  • Task progress query

πŸ“– Market Project Internal Architecture | δΈ­ζ–‡η‰ˆ
πŸ“– API Reference Documentation | δΈ­ζ–‡η‰ˆ


Supporting Services

βš™οΈ Settings Management

Provides system configuration management functionality, including market source configuration, Redis configuration, etc.

  • Market source configuration management
  • Redis configuration management
  • System environment variable monitoring
  • Configuration persistence

πŸ“– API Reference Documentation | δΈ­ζ–‡η‰ˆ
πŸ“– Other Features | δΈ­ζ–‡η‰ˆ


Developer Features

πŸ“œ History

Provides operation history recording and system event tracking functionality, supporting history queries and filtering.

  • Operation history recording
  • System event tracking
  • History query and filtering
  • Automatic cleanup mechanism

πŸ“– History Module Documentation | δΈ­ζ–‡η‰ˆ
πŸ“– API Reference Documentation | δΈ­ζ–‡η‰ˆ

πŸ”„ Runtime Status

Provides system runtime status collection and monitoring functionality, including application status, task status, and system component status.

  • Application runtime status collection
  • Task execution status monitoring
  • System component status monitoring
  • Real-time status query

πŸ“– Runtime Module Documentation | δΈ­ζ–‡η‰ˆ
πŸ“– API Reference Documentation | δΈ­ζ–‡η‰ˆ


API Documentation

Complete API interface reference documentation, including detailed descriptions of all endpoints, request parameters, and response formats.

πŸ“– API Reference Documentation | δΈ­ζ–‡η‰ˆ


Documentation Index

Architecture Documentation

Feature Module Documentation

API Documentation

Other Documentation

Packages

No packages published

Contributors 7

Languages