Playbooks
Scene ConfigStarter90% · Ready

Excel to Web Collaborative Dashboard: Business User Vibe Coding Configuration

Achieve 90% automation based on clear specifications, delivering a lightweight web application with charts and CSV import/export capabilities.

Est. time: 90 minUpdated: 2026-11-26
CSV / ExcelWeb App StarterSQLite / LocalStorageChart View
Excel to Web Collaborative Dashboard: Business User Vibe Coding Configuration

Completion Score

Overall completion is 90%. AI performed excellently in generating CRUD logic, chart bindings, and CSV parsing code, greatly boosting development efficiency. The main bottlenecks lie in complex permission control and concurrent conflict handling, requiring manual intervention for logic fine-tuning and security hardening.

90%Ready

Dimension breakdown

Form Entry, Search, and Multi-Condition Filtering95%

AI accurately generates validated forms and dynamic filtering components based on YAML specifications, with clear logic and high code reusability.

Summary Statistics Cards and Visualization Charts92%

Chart library integration is smooth, but complex aggregation logic (e.g., year-over-year, month-over-month) requires manual SQL or JS aggregation functions; AI generates basic charts efficiently.

One-Click Excel/CSV Import and Export94%

CSV parsing and export logic is mature. However, handling special Excel formats (e.g., merged cells) requires additional configuration; basic CSV scenarios are nearly error-free.

Multi-User Concurrent Permissions and Enterprise Audit78%

Basic session management is feasible, but fine-grained permission control and audit log generation logic are complex. AI is prone to security vulnerabilities here, requiring extensive manual code review.

Human checkpoint

Before deployment, manual review of data cleansing rules in the CSV import logic is mandatory to ensure dirty data does not pollute the database. Additionally, verify locking mechanisms or optimistic locking implementations during multi-user concurrent writes to prevent data overwrites.

Upgrade / downgrade path

If budget is limited, downgrade to a pure frontend LocalStorage solution, removing backend APIs and databases while retaining single-user local data persistence. If an upgrade is needed, introduce PostgreSQL to replace SQLite and integrate OAuth2.0 for enterprise-grade single sign-on.

When to use & prerequisites

Target users are non-technical business managers or administrative staff; the environment requires only a local Node.js or Python setup and a browser. Ideal use cases include reimbursement approval, inventory counting, or shift management, with data volumes under a thousand rows and no need for complex backend architecture.

Ready-to-copy configs

table-spec.yamlyaml

定义数据表结构、字段类型、默认值及业务约束的规格说明书。

table_name: expense_records
version: 1.0.0
description: 团队报销记录管理表,支持多条件筛选与统计。
fields:
  - name: id
    type: integer
    primary_key: true
    auto_increment: true
  - name: employee_name
    type: string
    required: true
    max_length: 50
    description: 报销人姓名
  - name: category
    type: string
    required: true
    enum: ["差旅", "办公", "餐饮", "其他"]
    description: 报销类别
  - name: amount
    type: decimal
    required: true
    precision: 10
    scale: 2
    min_value: 0.01
    description: 报销金额
  - name: date
    type: date
    required: true
    format: YYYY-MM-DD
    description: 报销日期
  - name: status
    type: string
    required: true
    default: "pending"
    enum: ["pending", "approved", "rejected"]
    description: 审批状态
indexes:
  - name: idx_category_date
    columns: [category, date]
  - name: idx_status
    columns: [status]
validation-rules.jsonjson

定义前端表单校验逻辑与后端数据一致性检查规则。

{
  "rules": [
    {
      "field": "employee_name",
      "type": "string",
      "required": true,
      "pattern": "^\\S+$",
      "message": "姓名不能为空且不能包含空格"
    },
    {
      "field": "amount",
      "type": "number",
      "required": true,
      "min": 0.01,
      "max": 1000000,
      "message": "金额必须大于0且小于100万"
    },
    {
      "field": "date",
      "type": "date",
      "required": true,
      "max": "now",
      "message": "日期不能晚于今天"
    },
    {
      "field": "category",
      "type": "enum",
      "required": true,
      "values": ["差旅", "办公", "餐饮", "其他"],
      "message": "类别必须为预定义值之一"
    }
  ],
  "global": {
    "uniqueConstraint": ["employee_name", "date", "category"],
    "message": "同一人同一天同一类别只能有一条记录"
  }
}

AI Vibe Coding in 4 steps

  1. 1

    Initialize Project and Data Model

    Goal: Generate database Schema and basic CRUD APIs based on table-spec.yaml.

    Prompt
    Initialize a Node.js + Express + SQLite project based on the provided table-spec.yaml file.
    1. Create the database table structure, ensuring indexes and constraints comply with specifications.
    2. Generate RESTful API endpoints: GET /api/records (supports query parameter filtering), POST /api/records, PUT /api/records/:id, DELETE /api/records/:id.
    3. Perform data validation at the API layer using rules from validation-rules.json.
    4. Provide package.json and necessary dependency installation commands.

    Verify: Run npm install && npm start. Use Postman to send a POST request to create a record, then use a GET request to verify the data is stored in SQLite and complies with constraints.

  2. 2

    Build Frontend Interface and Filtering Logic

    Goal: Generate React frontend components to implement data table display and multi-condition filtering.

    Prompt
    Based on the API from the previous step, build the frontend interface using React + Tailwind CSS.
    1. Create a data table component displaying all fields with pagination support.
    2. Implement a top filtering bar supporting combined filtering by category (dropdown), date (date range), and status (multi-select).
    3. Automatically call GET /api/records and update table data when filtering conditions change.
    4. Add an 'Add Record' button; clicking it opens a modal form where form fields must comply with validation-rules.json logic.

    Verify: Start the frontend development server. Operate the filtering bar in the browser to confirm that table data refreshes in real-time based on filtering conditions, and that the new record form displays error prompts for invalid input.

  3. 3

    Integrate Statistical Charts and KPI Cards

    Goal: Add a data visualization module to display key business metrics.

    Prompt
    Add a KPI card area and chart area to the top of the page.
    1. KPI cards should display: Total reimbursement amount, number of reimbursements this month, and pending approval count.
    2. Use Recharts or Chart.js to generate a bar chart showing the summary of reimbursement amounts by category for the last 6 months.
    3. The data source is the newly added GET /api/stats/summary endpoint; please generate this backend endpoint as well.
    4. Ensure the chart displays a Loading state during data loading and an empty state prompt when no data is available.

    Verify: Check if the correct KPI values are displayed at the top of the page, if the chart renders correctly based on backend statistical data, and if there are no console errors.

  4. 4

    Implement CSV Import/Export Functionality

    Goal: Add file upload and download features to support bulk data migration.

    Prompt
    Add CSV import/export functionality to the application.
    1. Export: Add an 'Export CSV' button. Clicking it calls GET /api/records/export, returning all data under current filtering conditions as a CSV file download.
    2. Import: Add an 'Import CSV' button. Clicking it opens a file selection dialog to upload a CSV file.
    3. Implement the POST /api/records/import backend endpoint to parse CSV content, validate line by line, and batch insert into the database, returning success and failure row counts.
    4. The frontend must display an import progress bar and result prompts (e.g., '100 successful, 2 failed').

    Verify: Export current data as a CSV file, modify one row in the file, and re-import it. Check if the database updates correctly and if the frontend displays the correct success/failure counts.

Pitfalls & fixes

  • CSV Encoding Issues: CSV files exported from Excel often use UTF-8 BOM or GBK encoding, causing garbled text during parsing. Fix: Use the iconv-lite library in the backend to automatically detect and convert encoding.
  • Inconsistent Date Formats: Frontend sends ISO strings, while SQLite stores them as TEXT, leading to filtering comparison failures. Fix: Uniformly convert dates to YYYY-MM-DD format at the API layer and use the strftime function in SQL queries.
  • Concurrent Write Conflicts: Multiple users editing the same record simultaneously can cause data overwrites. Fix: Add a version field to the database table to implement optimistic locking. Check if the version matches upon update; if not, return a 409 Conflict.

FAQ

Why choose SQLite over MySQL?

For data volumes in the thousands and single-server deployment scenarios, SQLite requires no independent service, is simple to deploy, and has sufficient performance. If data volume exceeds millions of rows or multi-node read/write is needed in the future, migrate to PostgreSQL.

How to handle merged cells in Excel?

Standard CSV does not support merged cells. It is recommended to use Excel's 'Text to Columns' feature or a Python script for preprocessing before import to split merged cells into independent rows, or ignore merge logic during backend parsing and only read non-empty values.

Can AI-generated code be used directly in production?

Not recommended for direct use. While AI code performs well in logical correctness, it lacks security hardening (e.g., SQL injection protection, XSS filtering) and error handling. It must undergo manual code review, unit testing, and penetration testing before going live.

Related blueprints

Excel to Web Collaborative Dashboard: Business User Vibe Coding Configuration · GrokHome