Skip to main content

Architecture

Tech Stack

Frontend

  • React
  • GraphQL
  • Sigi

Backend

  • NestJS

Directory Structure

Perfsee is a monorepo and uses Yarn 3 and some custom scripts to manage. All projects are stored in the packages directory. The general directory structure is as follows:

.
├── .local-object-storage // Local object storage, used to store development storage for easy viewing
├── assets // Project resource files, such as logo, favicon, etc.
├── db // Database snapshots and migration files generated during development
├── docs // The directory where this document is stored
├── examples // Some brief examples of using the platform tools
├── packages // The directory where all source code is stored, each project exists as a subdirectory
│ ├── bundle-analyzer // Bundle analysis implementation
│ ├── bundle-report // Display logic for analyzing the bundle report
│ ├── components // Custom components that are not related to the front-end business logic
│ ├── dls // Front-end page design related definitions
│ ├── flamechart // WebGL-based flame chart component
│ ├── ori // Source analysis implementation
│ ├── platform // Front-end business code
│ ├── platform-server // Backend business code
│ ├── plugins // The directory where all packaging tool plugins are stored, each plugin source code is stored by name
│ │ ├── esbuild
│ │ ├── rollup
│ │ ├── utils
│ │ └── webpack
│ ├── runner // Analysis task execution Runner logic
│ │ ├── executor // Analysis task control logic, containing content related to interaction with the platform backend
│ │ ├── bundle // bundle analysis runner script
│ │ ├── lab // Lab analysis runner script
│ │ ├── source // Source analysis runner script
│ │ └── shared // Analysis task shared logic
│ ├── shared // Shared code between the frontend and backend
│ ├── treemap // WebGL-based treemap component
│ ├── utils // Common utilities
│ └── vscode-extension // VSCode extension
├── tools // Some tools used in the development process
├── tsconfigs // TypeScript configuration files for different scenarios
└── types // Type definition files

System Architecture

This is a simplified architecture diagram for understanding the architecture of the entire Perfsee project.

Components & Dependencies

In the architecture diagram above, we can see that to run Perfsee, we need to prepare some components and dependencies. The role of these components and dependencies is as follows:

Components list

  • ✅ - Installed by default
  • ⚙️ - Requires additional configuration
  • ⬇️ - Manual installation required
  • ❌ - Not supported or need to be implemented
ComponentDescriptionPerfsee.comSelf Hosted
NginxRoutes requests⬇️
RedisCache⬇️
MySQLDatabase⬇️
Object StorageLocal non-persistent single machine object storage
Object Storage ServicePersistent object storage service provider❌ ️
PrometheusMonitoring⬇️
LoggerCommand line log
Logger ServicePersistent log service provider❌ ️
RunnerAnalysis task executor⚙️
Email (SMTP)Send platform, task status notifications to users⚙️
GitHub BotUsed to feedback PRs as a robot⚙️
Notification ServiceOther notification service providers❌ ️
Github OAuthGithub OAuth login⚙️
Custom OAuthOther OAuth service providers❌ ️