概述
Quark ERP 是 TypeScript 优先的插件化 ERP。Base 与所有插件共享同一条 @quan-erp/* 版本线(当前 1.x)。
- 后端 — 基于 Express 的 @quan-erp 框架
- 前端 — React + Vite,运行时注册到核心
- Web / Electron / Capacitor — 同一套 UI
- 将插件依赖与 requiredBasedVersion 对齐 base 1.x
后端
主版本取自 quan-erp-node-core/base。
| 技术 | 角色 | 版本 | 说明 |
|---|---|---|---|
| TypeScript | Language | 5 | All backend services and entities; ESM builds with .js import extensions |
| Quark ERP Framework | Plugin host / DI / HTTP | 1 | Based on Express.js — IPlugin, @Module, controllers, middleware, lifecycle hooks |
| TypeORM | ORM | 0 | Entities, repositories, QueryRunner, synchronize (dev), and migrations (staging/prod) |
| PostgreSQL | Primary database | 17 | Persistent ERP data (often via pgbouncer in compose) |
| Redis | Cache / sessions / jobs | 7 | Caching, sessions, and queue / cron helpers |
前端
主版本取自 base/frontend/package.json。
| 技术 | 角色 | 版本 | 说明 |
|---|---|---|---|
| React | UI library | 19 | Plugin screens, core chrome, and shared components |
| TypeScript | Language | 5 | All frontend packages; keep types aligned with shared-types / export surfaces |
| Tailwind CSS | Styling | 4 | Utility-first styling; match core / shared-ui patterns |
| TanStack React Query | Server state | 5 | Fetching, caching, and mutations for backend APIs |
| Zustand | Client state | 5 | Lightweight stores for core/plugin UI state |
| Capacitor | Mobile runtime | 7 | Native iOS / Android (@capacitor/core); prefer Platforms helpers from shared-frontend-core |
部署与平台
同一前端产物可运行在多种目标上。
| 目标 | 运行时 | 版本 | 交付方式 | 说明 |
|---|---|---|---|---|
| Web | Browser + Nginx | — | Base frontend container / static host | Default local compose target on :80 |
| Desktop | Electron | 39 | Desktop app wrapping the web app | Use Platforms.isDesktop() for desktop-only paths |
| Mobile | Capacitor | 7 | Native iOS / Android app | Camera, haptics, filesystem, etc. via shared-frontend-core |
| Server / host | Docker Compose | 1 | Postgres, Redis, backend, frontend | See Deployment for install.sh / compose layout |
桌面端
Electron 39
移动端
Capacitor 7
Web
Web