Skip to main content
BoardPulse AI can connect to any PostgreSQL or MySQL database you own. Once connected, the AI inspects the schema of the tables you approve, and uses that schema to generate accurate SQL queries in response to natural-language questions. This page walks through the full setup process.

Supported databases

PostgreSQL

Primary supported database. Use the postgresql+psycopg:// driver prefix in your connection URL.

MySQL

Supported via the pymysql driver. Use mysql+pymysql:// in your connection URL.

Connect your database

1

Set DEFAULT_SOURCE_DATABASE_URL

Add the SQLAlchemy connection URL for your source database to .env. Use the appropriate driver prefix for your database:
The URL format follows the SQLAlchemy connection URL convention: dialect+driver://user:password@host:port/database.
Use a dedicated read-only database user. BoardPulse AI only needs SELECT access on the tables you approve. A read-only user limits blast radius if credentials are ever compromised.
2

Set DEFAULT_SOURCE_INCLUDE_TABLES

Specify the exact table names the AI is allowed to query, as a comma-separated list:
DEFAULT_SOURCE_INCLUDE_TABLES is a security boundary. Only tables listed here are exposed to the AI model and can appear in generated SQL. Omitting a table is the safest way to keep it private — the AI cannot query tables that are not on this list, even if the database user has access to them.
3

Set DEFAULT_SOURCE_SCHEMA (optional)

If your tables live in a schema other than public, set it explicitly:
Leave this variable blank to use the database default (public for PostgreSQL). The application normalizes empty strings to null and falls back to the database default automatically.
4

Disable demo data

When connecting a real database, disable the built-in demo data so the AI works with your schema instead:
5

Restart the API container

Docker Compose does not reload .env automatically. Use up — not restart — to pick up the new environment variables:
Using docker compose restart api will not reload .env and your changes will not take effect.

Example: connecting to Supabase

Supabase provides a direct PostgreSQL connection URL in Project Settings → Database → Connection string. Use the Session mode (port 5432) URL for BoardPulse AI, since the application holds a persistent connection pool.
Create a dedicated read-only role in Supabase and grant SELECT only on the tables in your allowlist. Do not use the postgres superuser for production connections.

Verify the connection

After restarting the API container, open the admin panel at http://localhost:3001 and navigate to the workspace settings. The schema inspector will attempt to connect and display the discovered columns for each table in your allowlist. If the connection fails, the admin panel shows an error. Common causes:

Security recommendations

Use a read-only user

Grant SELECT only on the tables in your allowlist. BoardPulse AI never writes to your source database, so no write permissions are needed.

Keep the allowlist minimal

Only add tables the AI genuinely needs to answer business questions. Sensitive tables such as users or payments should stay off the list unless required.

Rotate credentials regularly

Use a database user dedicated to BoardPulse AI so credentials can be rotated independently of other applications.

Use internal networking

Where possible, run BoardPulse AI in the same VPC or private network as your database to avoid exposing database ports to the internet.