vista README

The project's README from github.com/Mantitup-Org/vista. As one markdown file: README.md.

Vista.js

Vista.js is a React 19 framework with App Router conventions, React Server Components, standalone .vista output, and a dual-engine model:

Official site: https://vista-js.vercel.app

Repository: https://github.com/Mantitup-Org/vista

Packages

Package Purpose
@vistagenic/vista Framework runtime, CLI, server/client exports, cache APIs, fonts, theme APIs
create-vista-app Scaffolds Vista apps with engine selection and package-manager prompts
vista-native Internal Rust/NAPI bridge used by the repo

Current Capabilities

Vista currently ships the following core surface:

Quick Start

Create a default app:

npx create-vista-app@latest my-app
cd my-app
npm run dev

Create a Flashpack app:

npx create-vista-app@latest my-app --engine flashpack
cd my-app
npm run dev

Create a typed API starter:

npx create-vista-app@latest my-app --typed-api

By default, generated apps use the same commands regardless of engine:

npm run dev
npm run build
npm run start

The selected engine is stored in vista.config.ts.

Package Examples

Theme provider from the package:

import { ThemeProvider, ThemeScript } from 'vista/theme';

Cache APIs from the package:

import { unstable_cache, revalidateTag, revalidatePath } from 'vista/cache';

Server helpers from the package:

import { cookies, headers, draftMode } from 'vista/server';

Monorepo Layout

vista/
├── apps/
│   └── web/                    # Official website and docs at vista.xyz
├── bench/                      # Vista-first benchmark fixtures
├── crates/                     # Top-level Rust crates and NAPI surface
├── flashpack/                  # Rust-backed Flashpack engine crates
├── packages/
│   ├── vista/                  # Framework package
│   └── create-vista-app/       # Scaffolding CLI
├── scripts/                    # Test, guard, and benchmark helpers
├── task.md                     # Execution ledger / milestone history
├── CONTRIBUTING.md
└── developer.md

Local Development

Install workspace dependencies:

pnpm install

Build the framework package after touching packages/vista/src:

npm --prefix packages/vista run build

Build the website:

npm --prefix apps/web run build

Build the native binding when you change crates/vista-napi:

npm --prefix crates/vista-napi run build

Common Commands

Command Purpose
pnpm build Build the workspace through flash-run.cjs
pnpm dev Run workspace dev tasks
pnpm test Full repo test chain
pnpm test:integrity Framework integrity guard
pnpm test:rsc-conformance RSC and route conformance suite
pnpm test:vista-output .vista standalone/output verification
pnpm test:flashpack-dev Flashpack dev/restart verification
pnpm test:flashpack-state Flashpack state reuse / cleanup verification
pnpm bench Full benchmark run
pnpm bench:quick Quick benchmark smoke run

Deployment Notes

The repo includes first-party deployment config for the official site:

apps/web is the deployment target. Its SEO route files live in app/(seo)/, not public/.

Release Flow

Maintainers publish from the development branch.

Typical sequence:

git add -A
git commit -m "release: x.y.z"
git push origin development
npx lerna publish from-package --yes
git tag vx.y.z
git push origin vx.y.z

Learn More

vista (Mantitup-Org/vista)

Searching Database…

2.3K ·GitHub
这是什么?Vista.js 是一个 React 19 Web 框架,采用 App Router 风格的文件约定、React Server Components 和流式 SSR,理念上与 Next.js 类似,但采用双引擎构建系统。
默认引擎和 Flashpack 引擎有什么不同吗?有区别。默认引擎是基于 webpack 的主 RSC/SSR 流水线,而 Flashpack 是备用的基于 Rust 的引擎,会把图和运行时状态持久化到 .flash 目录中。
怎么创建一个新的 Vista 应用?用 create-vista-app 包搭建项目,它会提示你选择默认引擎或 Flashpack 引擎以及一个包管理器;之后两种引擎使用相同的构建/开发命令。
运行 Vista 之前需要安装什么?需要 Node.js 20 或更高版本,monorepo 用 pnpm 管理,并且 Flashpack 引擎依赖一个编译好的 Rust/NAPI 原生绑定(vista-native)。
Vista 的所有功能都能用于生产环境吗?通过 vista/stack 暴露的类型化 API 明确标注为实验性,而且 Flashpack 引擎的原生 Rust 绑定在其源码变更时需要单独重新编译。
默认引擎和 Flashpack 有什么区别?默认引擎使用基于 webpack 的 RSC/SSR 流水线,而 Flashpack 是基于 Rust 的引擎,会把图和运行时状态持久化到 .flash 目录中,用于 dev、build 和 start。
独立的 .vista 输出包含什么?它打包了清单、文件追踪数据、PPR shell 产物和运行时元数据,使构建可以作为独立输出运行。
Vista 提供哪些缓存 API?它内置了 Next.js 风格的缓存原语,包括 unstable_cache、revalidateTag、revalidatePath、cacheTag 和 cacheLife。
为什么这个仓库包含一个 Rust crate?vista-native 是一个内部 Rust/NAPI 桥接,用于支撑 Flashpack 引擎的原生绑定,从 crates/vista-napi 构建。
What are similar projects?fresh, vue, ice, react-loadable, qiankun, react-router, nx, turborepo
Size
10.6 MB
Stars
2.3K
Age
1mo
Commits · 90 Days