An open API service indexing awesome lists of open source software.

https://github.com/vanengine/van

A Vue-style server-side template engine for any framework.
https://github.com/vanengine/van

pebble server-side-rendering template-engine template-engine-html twig vue

Last synced: 25 days ago
JSON representation

A Vue-style server-side template engine for any framework.

Awesome Lists containing this project

README

          

Van


Language-agnostic template engine with Vue syntax

Server-side HTML rendering · Signal-based client interactivity · WASM-powered


License
Release
Crates.io
Platforms


Features ·
Installation ·
Usage ·
Example


🌐 English · 简体中文

---

## Features

- **Vue Syntax** — Write templates with familiar ``, ``, `<style scoped>` blocks
- **Signal-based Reactivity** — Lightweight client-side interactivity with direct DOM updates (~4KB runtime)

## Installation

**One-line install** (Linux / macOS):

```bash
curl -fsSL https://raw.githubusercontent.com/vanengine/van/main/install.sh | sh
```

**Manual download**: grab the latest `van-*` binary from [GitHub Releases](https://github.com/vanengine/van/releases) and place it in your `PATH`.

## Usage

```bash
van init my-project # Scaffold a new Van project
van dev # Start dev server with hot reload
van generate # Static site generation
```

### Framework Integration

Van compiles `.van` files to HTML via a WASM binary — integrate with multiple backends:

- **Spring Boot** — [van-spring-boot-starter](https://github.com/van-java/van-spring-boot-starter)

## Example

```vue
<template>
<h1>{{ title }}</h1>
<button @click="count++">Clicked {{ count }} times</button>
</template>

<script setup>
let count = 0

h1 { color: steelblue; }

```

Server-side `{{ title }}` is interpolated by the host framework; `count` becomes a reactive signal with automatic DOM updates on the client.

## Related

- [**van-spring-boot-starter**](https://github.com/van-java/van-spring-boot-starter) — Spring Boot integration

## License

[MIT](LICENSE)