Busflow Docs

Internal documentation portal

Skip to content

@busflow/core

Status: Scaffold — not yet implemented

Purpose

Pure, isomorphic utility functions. No Vue, no DOM, no API calls — runs identically in Node.js (backend validation) and the browser (real-time UI warnings).

Design Rules

  • Input → Calculation → Output only
  • Zero side effects, zero dependencies on Vue/DOM
  • Designed for 100% test coverage with Vitest
  • "sideEffects": false

Key Modules (planned)

  • compliance.ts — EU VO 561/2006 rest-time calculations
  • date.ts — Date formatting, duration calculation
  • price.ts — Price formatting, tax calculations
  • validation.ts — Shared validation helpers

Consumers

All apps, all services.

Public API / Entrypoints

  • Planned package entrypoint: src/index.ts
  • Export pure functions only; consumers should not depend on internal file paths.

Key Commands

  • No package-specific commands yet; use root pnpm lint / pnpm test once implemented.

Common Pitfalls

  • No Vue, DOM, network, database, or clock side effects in core calculations.
  • Prefer explicit inputs over hidden global configuration.

Internal documentation — Busflow