Skip to content

LinaPro Release v0.1.0

Choose a tag to compare

@gqcn gqcn released this 06 May 13:42
· 159 commits to main since this release

Highlights

  • AI-native full-stack framework launch: LinaPro is a brand-new framework built from scratch with no legacy constraints. It combines a specification-driven AI development workflow (OpenSpec), a rich AI skill ecosystem covering the entire development lifecycle, and an integrated full-stack design with Vue 3 + GoFrame, enabling teams to leverage AI for real business development from day one.

  • Dual-mode plugin system: Introduced a comprehensive plugin architecture supporting both source plugins (compiled with the host) and WASM dynamic plugins (hot-loaded at runtime). The system includes unified lifecycle management, manifest-driven configuration, dependency resolution with topological sorting, runtime upgrade orchestration, and structured host-service contracts for storage, network, data, cache, lock, notify, and config services.

  • Multi-tenant architecture: Built native multi-tenant capability with Pool model (single database + tenant_id column), tenant resolution chain (override/JWT/session/header/subdomain/default), two-tier plugin governance (platform install + tenant enable), and tenant-aware authentication with impersonation support. When the multi-tenant plugin is disabled, the system automatically falls back to single-tenant mode with zero migration cost.

  • PostgreSQL as default database: Migrated from MySQL to PostgreSQL 14+ as the sole SQL source dialect, with SQLite retained for development and demos. This provides a cleaner translation path, better alignment with enterprise production environments, and access to modern database capabilities.

  • OpenSpec specification-driven workflow: Implemented a complete AI development workflow with explore, propose, implement, review, and archive phases. Every change is anchored to incremental specifications and mandatory E2E tests, with AI leading analysis, design, and implementation while teams focus on direction rather than execution details.

Improvements

  • Comprehensive RBAC permission system: Implemented JWT authentication paired with declarative role-based access control, supporting data scope filtering (all data, tenant data, department data, personal data), menu authorization persistence across plugin disable/enable cycles, and declarative permission middleware with access context caching.

  • Enterprise-grade audit capabilities: Added operation logs, login logs, and session management with full tenant isolation, impersonation dual-track recording, and plugin lifecycle audit trails including veto hook results and force operations.

  • Distributed infrastructure: Built-in distributed locking, key-value caching with namespace isolation, and horizontal scaling coordinated via Redis for high availability. Cluster mode requires no changes to business code, with leader election as an internal implementation detail.

  • Job scheduling management: Added scheduled job management with cron declaration, primary-node-only vs all-node task classification, cluster mode awareness, and unified job management projecting built-in cron jobs.

  • Notification and messaging system: Rebuilt notification domain with channel-based send, message records, and delivery tracking, replacing the previous user message model with a more scalable architecture.

  • File storage service: Implemented logical storage space isolation with path-prefix authorization, supporting both local and object storage with tenant-aware path separation.

  • System configuration management: Added runtime system configuration with cached parameters across services, cluster-synced runtime params, and duration-string unification for JWT expiry, session timeout, and monitor intervals.

  • Internationalization foundation: Implemented resource-driven locale support with nested runtime bundles, ETag caching, split apidoc locale bundles, and database-backed locale and message management supporting zh-CN, en-US, and zh-TW.

  • API documentation aggregation: All host and plugin API endpoints are automatically aggregated and exposed as a single browsable, debuggable documentation site with OpenAPI projection of dynamic plugin routes.

  • Public frontend configuration: Added branding and theme synchronization with public frontend configuration, including logo assets, default avatar settings, and LinaPro brand assets.

  • Plugin governance capabilities: Implemented plugin ID safety validation, dependency declaration with framework version constraints, install-and-enable shortcuts, mock data installation support, and runtime upgrade state model with explicit preview and execution APIs.

  • Demo control guard: Added demo read-only mode controlled by plugin enabled state, with clear write-blocking messages and minimal session whitelist for demonstration environments.

  • Menu governance: Enforced unique sidebar menu icons with E2E coverage, plugin menu ownership with manifest-driven sync, and visibility linkage with plugin state.

  • Runtime message governance: Completed runtime message i18n governance with backend-owned runtime data localization, removing hardcoded Chinese messages and implementing structured logging toggle.

  • Plugin workspace management: Added plugin workspace de-submodulization with hack/config.yaml based plugin source declaration, cross-platform commands for plugin initialization, installation, update, and status checking.

  • Cache coordination: Implemented distributed cache coordination with revision sync for single-node and cluster modes, scoped cache keys, and permission access caching with background sync and load deduplication.

Bug Fixes

  • Database bootstrap idempotency: Fixed host SQL bootstrap idempotency and metadata loading to ensure reliable initialization across different database states.

  • Plugin list optimization: Reduced plugin list and session writes to improve query performance and prevent excessive database operations.

  • Runtime panic elimination: Replaced runtime panics with proper error handling throughout the backend, improving system stability and error reporting.

  • Controller injection fixes: Fixed controller injections and plugin governance test cleanup to ensure proper dependency injection and test isolation.

  • I18n localization regressions: Addressed multiple localization regressions including backend hardcoded Chinese messages, menu button titles, plugin permission menu titles, and runtime locale flows.

  • Demo control guard fixes: Fixed demo-control guard payload and user dropdown E2E tests, decoupling demo-control guard from plugin auto-enable.

  • Job management validation: Tightened scheduled job validation and cron form UX, keeping built-in jobs declaration-driven.

  • Plugin runtime stability: Improved plugin runtime upload limits and route stability for better dynamic plugin management.

  • Font loading flicker: Fixed app loading font flicker and merged openspec changes for smoother user experience.

  • Documentation corrections: Corrected README.md filename case in zh-CN link and removed bold formatting from language switcher links.

  • Brand name update: Updated public frontend app name and renamed framework branding from lina to linapro.

  • Command diagnostics: Used English diagnostics for command output and updated panic allowlist for better cross-platform compatibility.

  • Config template cleanup: Disabled SQL debug logging in config template and shortened drawer tab labels for better default configuration.

Tooling and Experience

  • AI skill ecosystem: Added over a dozen built-in AI skills covering backend development, frontend design, test writing, code review, performance auditing, version upgrades, and environment diagnostics. The lina-doctor skill provides environment health checks and automated issue resolution, while lina-upgrade handles framework version upgrades with semver validation.

  • OpenSpec governance tools: Implemented change archival with semantic consolidation, automatic scanning for completable changes, and release changelog generation from Git history and OpenSpec content.

  • E2E testing framework: Built comprehensive E2E test suite with module-based directory layout, TC ID assignment conventions, execution manifests, and service dependency baselines for reliable test execution.

  • Performance audit workflow: Added automated performance audit workflow that resets databases, installs plugins, seeds load-test data, and launches concurrent testing with detailed reporting.

  • CI/CD consolidation: Replaced multiple specialized GitHub Actions workflows with consolidated main-ci workflow, preparing packed assets before running unit tests and copying config templates for database initialization.

  • Cross-platform development tools: Implemented linactl command-line tool with cross-platform make wrappers, plugin workspace management commands, and unified test matrix for host-only and plugin-full verification.

  • Docker image optimization: Added production Docker image build workflow with host-only and plugin-full build modes, separating CI matrix for different deployment scenarios.

  • Bootstrap installer: Created automated bootstrap installer with environment detection, dependency verification, and installation strategy planning for streamlined setup experience.

  • Documentation localization: Localized all skill descriptions and instructions to Chinese, added LinaPro prefix to badge labels, and refreshed project overview with logo assets.

  • Build configuration: Extracted build config from image section, localized OpenSpec specs to Chinese, and prepared packed assets for improved build reliability.


主要亮点

  • AI原生全栈框架发布:LinaPro 是一个全新构建的框架,它将规范驱动的AI开发工作流(OpenSpec)、覆盖完整开发生命周期的丰富AI技能生态系统,以及 Vue 3 + GoFrame 的集成全栈设计结合在一起,让团队从第一天起就能利用AI进行真正的业务开发。

  • 双模式插件系统:引入了全面的插件架构,支持源码插件(与宿主一起编译)和 WASM 动态插件(运行时热加载)。系统包含统一的生命周期管理、清单驱动的配置、拓扑排序的依赖解析、运行时升级编排,以及用于存储、网络、数据、缓存、锁、通知和配置服务的结构化宿主服务契约。

  • 多租户架构:构建了原生多租户能力,采用 Pool 模型(单数据库 + tenant_id 列)、租户解析链(override/JWT/session/header/subdomain/default)、两层插件治理(平台安装 + 租户启用),以及支持模拟操作的租户感知认证。当多租户插件禁用时,系统自动回退到单租户模式,零迁移成本。

  • PostgreSQL 作为默认数据库:从 MySQL 迁移到 PostgreSQL 14+ 作为唯一的 SQL 源方言,SQLite 保留用于开发和演示。这提供了更干净的翻译路径、更好的企业生产环境对齐,以及对现代数据库能力的访问。

  • OpenSpec 规范驱动工作流:实现了完整的 AI 开发工作流,包括探索、提案、实现、审查和归档阶段。每个变更都锚定到增量规范和强制性 E2E 测试,AI 主导分析、设计和实现,而团队专注于方向而非执行细节。

功能改进

  • 全面的 RBAC 权限系统:实现了 JWT 认证与声明式基于角色的访问控制相结合,支持数据范围过滤(全部数据、租户数据、部门数据、个人数据)、菜单授权在插件禁用/启用周期间的持久化,以及具有访问上下文缓存的声明式权限中间件。

  • 企业级审计能力:添加了操作日志、登录日志和会话管理,具有完整的租户隔离、模拟操作双轨记录,以及包括否决钩子结果和强制操作在内的插件生命周期审计跟踪。

  • 分布式基础设施:内置分布式锁、具有命名空间隔离的键值缓存,以及通过 Redis 协调的水平扩展以实现高可用性。集群模式不需要修改业务代码,领导者选举作为内部实现细节。

  • 定时任务管理:添加了定时任务管理,支持 cron 声明、仅主节点与全节点任务分类、集群模式感知,以及将内置 cron 作业投射到统一作业管理。

  • 通知与消息系统:重建了通知域,支持基于渠道的发送、消息记录和投递跟踪,用更具可扩展性的架构替代了之前的用户消息模型。

  • 文件存储服务:实现了逻辑存储空间隔离与路径前缀授权,支持本地存储和对象存储,并具有租户感知的路径分隔。

  • 系统配置管理:添加了跨服务缓存参数的运行时系统配置、集群同步的运行时参数,以及 JWT 过期、会话超时和监控间隔的时长字符串统一。

  • 国际化基础:实现了资源驱动的区域设置支持,具有嵌套运行时包、ETag 缓存、分离的 apidoc 区域包,以及支持 zh-CN、en-US 和 zh-TW 的数据库区域和消息管理。

  • API 文档聚合:所有宿主和插件 API 端点自动聚合作为单一可浏览、可调试的文档站点,支持动态插件路由的 OpenAPI 投射。

  • 公共前端配置:添加了品牌和主题同步的公共前端配置,包括 logo 资源、默认头像设置和 LinaPro 品牌资源。

  • 插件治理能力:实现了插件 ID 安全验证、具有框架版本约束的依赖声明、安装并启用快捷方式、模拟数据安装支持,以及具有显式预览和执行 API 的运行时升级状态模型。

  • 演示控制守卫:添加了由插件启用状态控制的演示只读模式,具有清晰的写入阻止消息和用于演示环境的最小会话白名单。

  • 菜单治理:强制侧边栏菜单图标的唯一性并具有 E2E 覆盖,插件菜单所有权具有清单驱动的同步,以及与插件状态的可见性联动。

  • 运行时消息治理:完成了运行时消息 i18n 治理,包括后端拥有的运行时数据本地化,移除硬编码的中文消息,并实现结构化日志切换。

  • 插件工作空间管理:添加了插件工作空间去子模块化,基于 hack/config.yaml 的插件源声明,以及用于插件初始化、安装、更新和状态检查的跨平台命令。

  • 缓存协调:实现了分布式缓存协调,支持单节点和集群模式的修订同步、作用域缓存键,以及具有后台同步和负载去重的权限访问缓存。

Bug 修复

  • 数据库引导幂等性:修复了宿主 SQL 引导幂等性和元数据加载,确保在不同数据库状态下可靠初始化。

  • 插件列表优化:减少了插件列表和会话写入,以提高查询性能并防止过度的数据库操作。

  • 运行时 panic 消除:在整个后端将运行时 panic 替换为适当的错误处理,提高了系统稳定性和错误报告。

  • 控制器注入修复:修复了控制器注入和插件治理测试清理,确保正确的依赖注入和测试隔离。

  • 国际化本地化回归:解决了多个本地化回归问题,包括后端硬编码的中文消息、菜单按钮标题、插件权限菜单标题和运行时区域流程。

  • 演示控制守卫修复:修复了演示控制守卫负载和用户下拉 E2E 测试,将演示控制守卫与插件自动启用解耦。

  • 作业管理验证:加强了定时任务验证和 cron 表单用户体验,保持内置作业声明驱动。

  • 插件运行时稳定性:改进了插件运行时上传限制和路由稳定性,以改善动态插件管理。

  • 字体加载闪烁:修复了应用加载时的字体闪烁并合并了 openspec 变更,以获得更流畅的用户体验。

  • 文档更正:更正了 README.md 文件名大小写在 zh-CN 链接中的问题,并移除了语言切换链接的粗体格式。

  • 品牌名称更新:更新了公共前端应用名称,并将框架品牌从 lina 重命名为 linapro。

  • 命令诊断:对命令输出使用英文诊断,并更新了 panic 允许列表以提高跨平台兼容性。

  • 配置模板清理:在配置模板中禁用了 SQL 调试日志,并缩短了抽屉标签以获得更好的默认配置。

开发体验与工具链

  • AI技能生态系统:添加了十几个内置AI技能,涵盖后端开发、前端设计、测试编写、代码审查、性能审计、版本升级和环境诊断。lina-doctor 技能提供环境健康检查和自动问题解决,而 lina-upgrade 处理具有 semver 验证的框架版本升级。

  • OpenSpec治理工具:实现了具有语义合并的变更归档、可完成变更的自动扫描,以及从 Git 历史和 OpenSpec 内容生成发布更新日志。

  • E2E测试框架:构建了全面的E2E测试套件,具有基于模块的目录布局、TC ID 分配约定、执行清单,以及用于可靠测试执行的服务依赖基线。

  • 性能审计工作流:添加了自动化性能审计工作流,重置数据库、安装插件、播种负载测试数据,并启动具有详细报告的并发测试。

  • CI/CD整合:将多个专门的 GitHub Actions 工作流替换为整合的 main-ci 工作流,在运行单元测试前准备打包资源,并复制配置模板用于数据库初始化。

  • 跨平台开发工具:实现了 linactl 命令行工具,具有跨平台 make 包装器、插件工作空间管理命令,以及用于仅宿主和插件完整验证的统一测试矩阵。

  • Docker镜像优化:添加了生产 Docker 镜像构建工作流,具有仅宿主和插件完整构建模式,为不同部署场景分离 CI 矩阵。

  • 引导安装器:创建了自动化引导安装器,具有环境检测、依赖验证和安装策略规划,以简化设置体验。

  • 文档本地化:将所有技能描述和说明本地化为中文,为徽章标签添加了 LinaPro 前缀,并使用 logo 资源刷新了项目概述。

  • 构建配置:从镜像部分提取构建配置,将 OpenSpec 规范本地化为中文,并准备打包资源以提高构建可靠性。