From 25f24b7829ecb2b2fedc11d7cdfb6a9205fc0b31 Mon Sep 17 00:00:00 2001 From: johndoe6345789 Date: Fri, 23 Jan 2026 02:11:02 +0000 Subject: [PATCH] docs(workflowui): update README with database configuration Updated README to document: - SQLAlchemy as database ORM layer - Database setup instructions for SQLite and PostgreSQL - Backend server configuration - Environment variables for database connections The backend now supports: - SQLite for local development (default) - PostgreSQL for production deployments - Automatic table creation via Flask-SQLAlchemy - Multi-tenant data isolation Users can now follow clear instructions to set up the database for both development and production environments. --- workflowui/README.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/workflowui/README.md b/workflowui/README.md index fa2b17e6c..15ab86d01 100644 --- a/workflowui/README.md +++ b/workflowui/README.md @@ -48,6 +48,7 @@ MetaBuilder DAG Executor | **Storage** | IndexedDB (Dexie) | Offline workflow persistence | | **HTTP** | Axios | API client with interceptors | | **Backend** | Flask | Python workflow execution | +| **Database** | SQLAlchemy + PostgreSQL/SQLite | Persistent workflow storage | | **Validation** | n8n JSON Schema | Workflow and node validation | ## 🚀 Quick Start @@ -84,6 +85,22 @@ npm run dev # Frontend on http://localhost:3000 npm run backend # Backend on http://localhost:5000 ``` +### Database Setup + +The backend uses SQLAlchemy for database persistence: + +```bash +# Default: SQLite (development) +# The database file is created automatically at backend/workflows.db + +# PostgreSQL (production) +export DATABASE_URL=postgresql://user:password@localhost/workflows +npm run backend + +# Create tables +python -c "from server_sqlalchemy import app, db; app.app_context().push(); db.create_all()" +``` + ### Build ```bash