Skip to content

TrueNine/compose-client

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Compose-Client

Modern Frontend Development Toolkit - Vue3-based comprehensive frontend solutions

Project Overview

Compose-Client is a comprehensive frontend development toolkit built on Monorepo architecture, providing full-stack frontend solutions from UI components to platform SDKs.

๐ŸŽฏ Core Features

  • ๐ŸŽจ Vue3 Component Library - Rich UI components based on Element Plus, Vuetify, Varlet
  • ๐Ÿ› ๏ธ Development Toolkit - Unified build configurations, type definitions and utility functions
  • ๐ŸŒ Platform SDK Integration - Mainstream platform SDKs including Tencent Maps, WeChat Public Account
  • ๐Ÿ”ง Modern Build System - TypeScript + ESM with dual format output support
  • ๐Ÿงฉ Browser Extensions - Chrome extension development tools
  • ๐Ÿ“ฆ Monorepo Architecture - PNPM Workspace + Turbo build system

๐Ÿš€ Tech Stack

  • Node.js: 24.5.0+
  • PNPM: 10.15.0+
  • Turbo: 2.5.6+
  • TypeScript: 5.9.2+
  • Build Tools: TSDown + Vite + Vitest
  • CSS Framework: UnoCSS + SCSS
  • Package Management: PNPM Catalog unified version management

โšก Quick Start

# Install dependencies
pnpm install

# Build all packages
pnpm build

# Run tests
pnpm test

# Start development servers
pnpm dev

# Type checking
pnpm type-check

# Lint checks
pnpm lint

๐Ÿ“ Project Structure

compose-client/
โ”œโ”€โ”€ configs/                    # Build and development tool configurations
โ”‚   โ”œโ”€โ”€ eslint9/               # ESLint 9 configuration package
โ”‚   โ”œโ”€โ”€ tsconfig/              # TypeScript configuration package
โ”‚   โ”œโ”€โ”€ uno/                   # UnoCSS configuration package
โ”‚   โ””โ”€โ”€ vite/                  # Vite build configuration package
โ”œโ”€โ”€ types/                     # Global type definitions and TypeScript utilities
โ”œโ”€โ”€ shared/                    # Common utility functions and constants
โ”œโ”€โ”€ vue/                       # Vue3 base tools and installers
โ”œโ”€โ”€ external/                  # Third-party library wrappers (dayjs, lodash-es, vue-router, etc.)
โ”œโ”€โ”€ ui/                        # Vue3 component library (with playground)
โ”œโ”€โ”€ design/                    # Design system components (with playground)
โ”œโ”€โ”€ req/                       # Network request utilities (based on ky)
โ”œโ”€โ”€ psdk/                      # Platform SDK integrations
โ”‚   โ”œโ”€โ”€ tmap/                  # Tencent Maps SDK
โ”‚   โ””โ”€โ”€ wxpa/                  # WeChat Public Account SDK
โ”œโ”€โ”€ ext/                       # Browser extensions
โ”‚   โ””โ”€โ”€ chrome/                # Chrome extension tools
โ”œโ”€โ”€ package.json
โ”œโ”€โ”€ pnpm-workspace.yaml
โ”œโ”€โ”€ turbo.json
โ””โ”€โ”€ vitest.workspace.ts

๐Ÿ“ฆ Core Packages

๐Ÿ”ง Configuration Packages

๐Ÿ—๏ธ Foundation Libraries

๐ŸŽจ UI Components

๐ŸŒ Network and Platform

๐Ÿงฉ Extension Tools

๐Ÿ”จ Development Commands

Root Level Commands

# Build related
pnpm build                     # Build all packages
pnpm build:fast               # Force fast build
pnpm build:legacy             # Concurrent build (12 tasks)

# Test related
pnpm test                     # Run all tests
pnpm test:legacy              # Concurrent testing (10 tasks)

# Code quality
pnpm lint                     # Lint checks
pnpm type-check              # Type checking
pnpm lint:root               # Root directory lint check

# Development servers
pnpm dev                      # Start all development servers
pnpm dev:single              # Single task startup
pnpm dev:legacy              # Concurrent startup (6 tasks)

# CI related
pnpm ci:build                # CI build (includes all checks)
pnpm ci:quick                # CI quick check (excludes tests)

Package Level Commands

# Build specific package
turbo run build --filter=@truenine/ui
turbo run build --filter=package-name

# Test specific package
turbo run test --filter=@truenine/shared
cd packages/package-name && npx vitest watch

# Start development server (ui, design packages only)
turbo run dev --filter=@truenine/ui
turbo run dev --filter=@truenine/design

๐Ÿ—๏ธ Build System

Build Tools

  • TSDown: TypeScript compilation (configs, shared, types, req, vue, external, psdk, ext)
  • Vite: Modern build tool (ui, design packages with playground)
  • Gulp: CSS post-processing (style optimization for ui, design packages)
  • Turbo: Task orchestration and caching

Build Dependencies

  • build: depends on type-check, lint, ^build
  • build-c: compilation step, depends on ^build
  • build-g: post-processing step, depends on build-c
  • test: depends on ^build, type-check, lint
  • lint: depends on ^build
  • type-check: no dependencies, can run in parallel

Output Formats

  • TSDown packages: Generate ESM + CJS dual format with sourcemap and dts files
  • Vite packages: Generate ESM format with CSS extraction and Gulp post-processing

๐Ÿงช Testing

# Run all tests
pnpm test

# Test specific package
turbo run test --filter=package-name

# Run specific test file
cd packages/package-name && npx vitest run path/to/test.spec.ts

# Run tests in watch mode
cd packages/package-name && npx vitest watch path/to/test.spec.ts

Test Environment

  • Testing Framework: Vitest + jsdom environment
  • Component Testing: @vue/test-utils
  • Configuration Files: Root level vitest.workspace.ts + individual package vitest.config.ts
  • Test Directories: __tests__/ directories or .spec.ts suffix files

๐ŸŽฎ Playground

ui and design packages contain playground directories for development debugging:

# Start UI component playground
turbo run dev --filter=@truenine/ui

# Start design system playground
turbo run dev --filter=@truenine/design

Playgrounds use Vue Router for page management, providing component preview and debugging functionality.

๐Ÿ“„ Version Management

The project uses PNPM Catalog for unified version management:

  • All external dependency versions are centrally managed in pnpm-workspace.yaml
  • Workspace packages reference each other via workspace:^
  • Packages are published to npm under @truenine/ scope with LGPL-2.1-or-later license

๐Ÿค Contributing Guidelines

  1. Ensure all commits follow established code standards
  2. Include appropriate unit tests
  3. Run pnpm ci:build to ensure all checks pass
  4. Follow the project's TypeScript and ESLint configurations

๐Ÿ“œ License

This project is licensed under LGPL-2.1-or-later.

About

typescript web client dev tool kit

Resources

License

Stars

Watchers

Forks

Packages

No packages published