Skip to content

codebase 技术栈

weilong wu edited this page Mar 25, 2026 · 1 revision

技术栈

返回首页 | GSL 项目归档文档

分析日期:2026-03-25

Languages

Primary:

  • Solidity 0.8.25 - Smart contracts (gsl-contracts/src/)
  • Java 17 - Backend API and blockchain event processing (hive-gls-java/)
  • JavaScript (ES Modules) - DApp frontend (gsl-dapp/src/)
  • TypeScript 4.9.4 - Admin frontend (gsl-web-admin/src/)

Secondary:

  • SCSS - Styling in both Vue frontends

Sub-project: gsl-contracts (Solidity Smart Contracts)

Runtime & Toolchain

Toolchain:

  • Foundry (forge) - Compile, test, deploy
  • Config: gsl-contracts/foundry.toml
  • Solidity: 0.8.25, viaIR = true, optimizer 200 runs

Package Manager:

  • npm - Lockfile: gsl-contracts/package-lock.json

Frameworks & Libraries

OpenZeppelin (vendored via Foundry lib):

  • openzeppelin-contracts - ERC20, SafeERC20, Ownable, ReentrancyGuard, etc.
  • openzeppelin-contracts-upgradeable - UUPS upgradeable proxies (Initializable, UUPSUpgradeable, OwnableUpgradeable, PausableUpgradeable)
  • openzeppelin-foundry-upgrades - Upgrade scripts

Uniswap (vendored via Foundry lib):

  • v2-core - IUniswapV2Factory, IUniswapV2Pair
  • v2-periphery - IUniswapV2Router02, IWETH
  • v3-core - IUniswapV3Pool interfaces
  • v3-periphery - ISwapRouter, IQuoterV2; also @uniswap/v3-periphery npm package

Testing:

  • forge-std - Foundry standard testing library (gsl-contracts/lib/forge-std/)

Key Contracts

Contract File Pattern
HIVEToken src/HIVEToken.sol ERC20, 100M supply
StakeCore src/StakeCore.sol UUPS upgradeable, staking logic
LPStake src/LPStake.sol UUPS upgradeable, LP staking
HiveSwap src/HiveSwap.sol UUPS upgradeable, swap aggregator
FOMO3D src/FOMO3D.sol UUPS upgradeable, 48h countdown game
APYStatistics src/APYStatistics.sol APY tracking
UserRelation src/UserRelation.sol On-chain referral tree
WithdrawShadowTokenV2TokenRestake src/WithdrawShadowTokenV2TokenRestake.sol UUPS upgradeable withdrawal
DailyLimitQueue src/DailyLimitQueue.sol Daily withdrawal rate-limiting
KodiakHelper src/KodiakHelper.sol Kodiak DEX integration
Query src/Query.sol Read-only view aggregation

Configuration

Deployment configs: gsl-contracts/script/config/

  • network_80094.json - Berachain mainnet (chain ID 80094)
  • network_97.json - BSC testnet (chain ID 97)
  • mainnet.json - BSC mainnet addresses

Remappings: gsl-contracts/remappings.txt

  • @openzeppelin/lib/openzeppelin-contracts/
  • @openzeppelin-upgradeable/lib/openzeppelin-contracts-upgradeable/
  • @uniswap/v2-core/lib/v2-core/
  • @uniswap/v3-periphery/lib/v3-periphery/

Sub-project: hive-gls-java (Java Backend)

Runtime

Environment:

  • Java 17
  • Spring Boot 2.7.0
  • Spring Cloud 2021.0.3 (via BOM)
  • Maven build system - Lockfile: hive-gls-java/pom.xml

Group/Artifact: com.unknown:gsl:1.0-SNAPSHOT

Frameworks

Core:

  • Spring Boot 2.7.0 - Application container
  • Spring Cloud 2021.0.3 - Microservice infrastructure
  • Spring Cloud Consul - Service discovery and config center
  • Spring Cloud OpenFeign - Inter-service HTTP calls
  • Spring Cloud LoadBalancer - Client-side load balancing
  • Netflix Hystrix 1.5.12 - Circuit breaker

Persistence:

  • MyBatis 3.5.1 + mybatis-spring-boot-starter 2.2.2 - SQL ORM
  • MyBatis-Plus extension - Enhanced ORM utilities
  • Spring Boot Data MongoDB 2.7.0 - MongoDB integration
  • PageHelper 1.4.7 - MyBatis pagination
  • Druid - Connection pooling (Alibaba)
  • dynamic-datasource-spring-boot-starter 3.0.0 - Multi-datasource routing
  • MySQL connector

Blockchain:

  • Web3j 4.12.0 (core, contracts, utils, abi) - JVM Ethereum client

Security:

  • jasypt-spring-boot-starter 3.0.2 - Encrypted config values (ENC(...) pattern used in application.yml)
  • Spring Session Core - Session management

Caching:

  • Spring Boot Data Redis 2.7.0 + Jedis 2.9.0 + Commons Pool2
  • Redisson (via org.cloud.utils.RedissonUtil) - Distributed locking in jobs

Scheduling:

  • Quartz (via parent framework BaseQuartzJobBean) - Cron jobs

API Documentation:

  • Springfox 3.0.0 (springfox-boot-starter) - Swagger/OpenAPI
  • Knife4j 3.0.3 - Enhanced Swagger UI

Search:

  • Apache Lucene 8.9.0 (core, analyzers-common, analyzers-smartcn, highlighter, memory, queryparser)

Export/Import:

  • Apache POI 4.1.2 (poi, poi-ooxml) - Excel/Word
  • EasyExcel 3.2.0 - Excel processing
  • XDocReport 2.0.2 - Word to PDF

HTTP:

  • OkHttp 4.2.2 - Outbound HTTP calls

JSON:

  • Fastjson 1.2.73 (Alibaba)
  • Gson 2.8.5

Utilities:

  • Lombok 1.18.24
  • Commons BeanUtils 1.9.4
  • Eclipse JGit 6.5.0 - Git operations

Internal Framework (custom BOM):

  • com.unknow.first:all-dependencies:0.0.3-SNAPSHOT - Platform BOM
  • com.unknown:dapp-common-all-dependencies:1.1-SNAPSHOT - DApp platform BOM
  • com.unknow.first:auth-common - Authentication utilities
  • com.unknow.first:mybatisplus-common - Enhanced MyBatis-Plus
  • com.unknow.first:enc-dec-common - Encryption/decryption utilities
  • com.unknow.first:logs-common - Logging utilities
  • com.unknow.first:feign-common - Feign utilities
  • com.unknow.first:swagger-common - Swagger configuration
  • com.unknow.first:api-encrypt-common - API encryption
  • com.unknow.first:param-manage-api - Parameter management
  • com.unknown:dapp-product-pay-biz:1.0-SNAPSHOT - Product payment
  • com.unknown:dapp-account-biz:1.1-SNAPSHOT - Account management
  • com.unknown:dapp-withdraw-biz:1.2-SNAPSHOT - Withdrawal logic
  • com.unknown:dapp-address-bind:1.0-SNAPSHOT - Address binding
  • com.unknown:dapp-coin-manage-price:1.1-SNAPSHOT - Coin price management

Configuration

Application config: hive-gls-java/src/main/resources/application.yml

  • Primary config is externalized to Consul config center
  • Local file contains only commented-out examples
  • Passwords stored as ENC(...) values using Jasypt

Build:

  • Spring Boot Maven Plugin
  • Spotify Docker Maven Plugin (target registry: 172.16.4.24:10003)

Sub-project: gsl-dapp (DApp Frontend)

Runtime

Environment:

  • Node.js (no .nvmrc detected)
  • npm - Lockfile: gsl-dapp/package-lock.json

Frameworks & Libraries

Core:

  • Vue 3.2.47
  • Vue Router 4.1.6
  • Pinia 2.0.33 - State management
  • Vite 4.2.0 - Build tool

Blockchain:

  • ethers.js 5.7.2 - Ethereum interaction
  • web3 1.9.0 - Web3 utilities
  • @reown/appkit 1.7.5 - Wallet connection kit (formerly WalletConnect AppKit)
  • @reown/appkit-adapter-ethers5 1.7.5 - Ethers5 adapter for Reown

UI:

  • Vant 4.1.2 - Mobile-first Vue component library
  • vant-green 1.0.44 - Green-themed Vant variant
  • Swiper 11.2.10 - Touch carousel
  • flipdown 0.3.2 - Countdown timer widget

Charts/Visualization:

  • ECharts 5.4.2 - Charts
  • tsparticles / @tsparticles 3.x - Particle effects

Utilities:

  • axios 1.3.4 - HTTP client
  • vue-i18n 9.2.2 - i18n
  • qs 6.11.2 - Query string serialization
  • decimal.js 10.5.0 - Precise decimal arithmetic
  • qrcode.vue 3.3.4 - QR code generation
  • howler 2.2.4 - Audio
  • vue-clipboard3 2.0.0 - Clipboard
  • vue-countup-v3 1.4.2 - Number animation
  • @vueuse/core 13.2.0 - Vue composable utilities

Build:

  • Vite plugins: @vitejs/plugin-vue, unplugin-vue-components (with VantResolver)
  • SCSS with modern-compiler API
  • Bundle splitting: web3-vendor, ethers-vendor, vue chunks
  • Terser minification

Configuration

Env files:

  • gsl-dapp/.env - Development defaults (port 10100)
  • gsl-dapp/.env.development, .env.staging, .env.production, .env.sysUpdate, .env.locPro
  • Key vars: VITE_API_URL, VITE_PORT, VITE_OPEN

Dev proxy: /apKPbwgGRNIvRfCrb1https://honeycombhk.com/


Sub-project: gsl-web-admin (Admin Frontend)

Runtime

Environment:

  • Node.js >= 16.0.0
  • npm >= 7.0.0
  • Yarn lockfile present: gsl-web-admin/yarn.lock

Frameworks & Libraries

Core:

  • Vue 3.2.45
  • Vue Router 4.1.6
  • Pinia 2.0.28 - State management
  • Vite 4.0.0 - Build tool
  • TypeScript 4.9.4

UI:

  • Element Plus 2.2.26 - Desktop component library
  • @element-plus/icons-vue 2.0.10 - Icon set

Rich Text / Document:

  • @wangeditor/editor 5.1.23 - WYSIWYG editor
  • @wangeditor/editor-for-vue 5.1.12 - Vue wrapper

Charts:

  • ECharts 5.4.1 + echarts-gl 2.0.9 + echarts-wordcloud 2.1.0

Utilities:

  • axios 1.2.1 - HTTP client
  • vue-i18n 9.2.2 - i18n
  • qs 6.11.0 - Query string
  • js-cookie 3.0.1 - Cookie management
  • mitt 3.0.0 - Event bus
  • nprogress 0.2.0 - Page loading bar
  • screenfull 6.0.2 - Fullscreen API
  • sortablejs 1.15.0 - Drag-and-drop
  • splitpanes 3.1.5 - Resizable panels
  • cropperjs 1.5.13 - Image cropping
  • qrcodejs2-fixes 0.0.2 - QR codes
  • print-js 1.6.0 - Print utility
  • js-table2excel 1.0.3 - Table to Excel
  • countup.js 2.3.2 - Number animation
  • jsplumb 2.15.6 - Flowchart/diagram library

Dev Tools:

  • ESLint 8.29.0 + @typescript-eslint/eslint-plugin + eslint-plugin-vue
  • Prettier 2.8.1
  • vite-plugin-vue-setup-extend - <script setup name> support

Configuration

Env files:

  • gsl-web-admin/.env - Dev defaults (port 10065, VITE_API_URL=http://127.0.0.1:8100)
  • gsl-web-admin/.env.staging, .env.production
  • Key vars: VITE_API_URL, VITE_PHOTO_API_URL, VITE_PORT, VITE_PUBLIC_PATH

Path alias: /@./src/ (TypeScript alias)

tsconfig: gsl-web-admin/tsconfig.json


Platform Requirements

Development:

  • Foundry CLI (for gsl-contracts)
  • Java 17 + Maven (for hive-gls-java)
  • Node.js >= 16 + npm/yarn (for Vue frontends)
  • Consul (external config/service discovery)
  • MySQL + Redis + MongoDB (for backend)

Production:

  • Docker image deployment to private registry (172.16.4.24:10003)
  • Spring Cloud microservice topology with Consul
  • Blockchain RPC endpoints: BSC mainnet/testnet, Berachain mainnet, custom AGI chain

Stack analysis: 2026-03-25


返回首页 | GSL 项目归档文档 | 生成日期:2026-03-25

Clone this wiki locally