Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/davidG97/qa-flow/llms.txt

Use this file to discover all available pages before exploring further.

QA Flow uses Prisma ORM to talk to its database, which means the same application code runs against SQLite for simple local setups, Turso (libsql) for cloud-backed deployments, or a full PostgreSQL server for teams that need robust multi-user persistence. Out of the box, no database configuration is required — the server creates a SQLite file automatically on first start.

Default Setup: SQLite

When you start QA Flow with Docker, the server writes its SQLite database to /app/data/qa-flow.db inside the container. A named Docker volume (qa-flow-data) is mounted at /app/data, so the database survives container restarts and upgrades.
docker run -it --rm \
  -p 3001:3001 \
  -v qa-flow-data:/app/data \
  davidg1997/qa-flow
The corresponding DATABASE_URL for this path is:
DATABASE_URL=file:/app/data/qa-flow.db
SQLite is a great choice for single-user or small-team deployments because it requires zero additional infrastructure.

Database Schema

QA Flow’s Prisma schema defines six models that cover users, projects, test execution history, and generated reports.

User

Stores registered accounts. Fields: id (UUID), email (unique), name, passwordHash, role (ADMIN or USER), createdAt, updatedAt.

Project

Represents a test flow. Stores name, description, nodes (JSON array), edges (JSON array), and config (JSON ProjectConfig), plus timestamps.

ProjectMember

Junction table linking users to projects. Each record holds projectId, userId, and role (OWNER or MEMBER). The combination of project + user is unique.

TestRun

Records each execution. Tracks status (pendingrunningcompleted / failed), startedAt, completedAt, totalTests, passedTests, failedTests, duration (ms), and an optional error message.

TestResult

Individual node-level results within a run. Stores nodeId, nodeType, nodeLabel, success, message, error, duration (ms), and an optional screenshot path or base64 string.

Report

Holds the generated Playwright-style HTML report for a test run. Contains htmlContent (the full HTML string) and summary (a JSON object with aggregate statistics).

Switching Databases

No changes needed. The default DATABASE_URL points to a local SQLite file.
server/.env
DATABASE_URL=file:./data/qa-flow.db
For Docker, the file lives inside the named volume:
DATABASE_URL=file:/app/data/qa-flow.db
The Prisma schema uses provider = "sqlite" by default, so no schema changes are required.
Before upgrading QA Flow to a new version, back up your SQLite file by copying the volume contents or running:
docker cp qa-flow:/app/data/qa-flow.db ./qa-flow-backup.db

Prisma Commands

These commands are used during local development to manage the database schema and client.
CommandDescription
pnpm db:generateRegenerate the Prisma client after any schema change
pnpm db:migrateApply pending migrations to the database
pnpm db:studioOpen Prisma Studio — a visual GUI for browsing and editing records
pnpm --filter qa-flow-server db:resetDrop and recreate the database, then re-run all migrations
1

Edit the Schema

Make your changes to server/prisma/schema.prisma.
2

Create and Apply a Migration

pnpm db:migrate
This generates a new SQL migration file and applies it to the development database.
3

Regenerate the Prisma Client

pnpm db:generate
Updates the type-safe client used by the server’s services to match the new schema.
4

Verify with Prisma Studio

pnpm db:studio
Opens a browser-based GUI at http://localhost:5555 where you can inspect tables and individual records.
Running pnpm --filter qa-flow-server db:reset permanently deletes all data in the development database and re-applies migrations from scratch. Never run this command against a production or shared staging database. Always back up your SQLite file (or export projects as JSON) before resetting, and never run db:reset in a production environment.

Build docs developers (and LLMs) love