frontend-vue

Development rules for a Vue 3 frontend, a web interface framework, built with Vite and related tools. They cover components, views, data stores, routing, API calls, and a visual pipeline editor.

In plain words
What is it for?
Use them when editing Vue components, views, stores, routes, API clients, or pipeline-editor screens in the DataFlow WebUI.
Why use it?
They prevent inconsistent frontend changes, such as mixing component styles or adding prohibited pages and navigation items. They also require checking the project's change policy before adding UI.

Cursor rule for Cursor

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add rules/opendcai/dataflow-webui/frontend-vue
Clone the repo
git clone --depth 1 https://github.com/OpenDCAI/DataFlow-WebUI

Made for: Cursor.

Per session 0 Nothing until a file matches its globs; then the whole rule loads.
When invoked 1,905 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.01905
Opus 5 $0.00000 $0.00953
Sonnet 5 $0.00000 $0.00381
Haiku 4.5 $0.00000 $0.00191

Measured 2d ago against content hash bdb2c362c5d4, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

frontend-vue scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.cursor/rules/frontend-vue.mdc · 236 lines

How it starts

The opening of the file, as written. The whole thing — 236 lines — stays where its author put it; the contents beside it link to each section on GitHub.

DataFlow WebUI Frontend (Vue 3 + Vite)

⚠ CHANGE POLICY: Before creating any new page, route, or nav item, check webui-change-policy.mdc. Only operator rendering fixes and missing param editors are allowed. New dashboard pages, analytics views, and feature-level UI are prohibited unless the user explicitly overrides.

Tech Stack

  • Vue 3 + Vite
  • Vue Router (hash history: createWebHashHistory)
  • Pinia (setup-store style)
  • Vue Flow (@vue-flow/core) for pipeline DAG editor
  • VueFluent3 (@creatorsn/vfluent3) for UI components
  • Axios for API calls (auto-generated from OpenAPI)

Two Component Styles (both are used)

Area Style
mainFlow/nodes/, new components <script setup> + defineProps / defineEmits
mainFlow/pipeline/, panels, views Options API: export default { props, data, computed, methods }

Do NOT convert existing components between styles. Match the style of the file you're editing.

Router — Adding a New Manage Page

  1. Add route in frontend/src/router/Manage/index.js:
{
    path: 'my-page',
    component: () => AsyncLoad(() => import('@/views/manage/myPage/index.vue')),
    meta: { title: 'Dataflow-MyPage' }
}
  1. Add nav item in frontend/src/views/manage/index.vue (navList array):
{
    key: 4,
    name: () => this.local('My Page'),
    icon: 'ViewDashboard',
    route: '/m/my-page'
}
  1. Create frontend/src/views/manage/myPage/index.vue

Note: Lazy loading uses AsyncLoad wrapper (not raw import()), defined in router/tools.js.

Vue Flow Pipeline Editor

The pipeline canvas is components/manage/mainFlow/index.vue. Key architecture:

Node Types (registered via slots)

<VueFlow v-model:nodes="thisNodes" v-model:edges="thisEdges">
    <template #node-base-node="nodeProps">
        <baseNode v-bind="nodeProps" />
    </template>
    <template #node-operator-node="nodeProps">
        <operatorNode v-bind="nodeProps" @update-node-data="updateNodeData" />
    </template>
    <template #node-database-node="nodeProps">
        <databaseNode v-bind="nodeProps" />
    </template>
</VueFlow>

Read the full file on GitHub · 236 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 236 lines · 0 tokens per session scan A bdb2c362c5d4

Subscribe to this mod's changes

frontend-vue is a cursor rule published in the GitHub repository OpenDCAI/DataFlow-WebUI (224 stars, last pushed 7d ago), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 1,905 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.