Skip to content

feat: Add PostgreSQL database connection support - #19

Open
SatyamPandey-07 wants to merge 1 commit into
mainfrom
feature/postgresql-database-connection
Open

feat: Add PostgreSQL database connection support#19
SatyamPandey-07 wants to merge 1 commit into
mainfrom
feature/postgresql-database-connection

Conversation

@SatyamPandey-07

Copy link
Copy Markdown
Collaborator
  • Enable users to connect their own PostgreSQL databases via credentials
  • Added database connection form at /connect-database with credential testing
  • Extended Prisma schema with connectionType (FILE/DATABASE) and db credentials
  • Created PostgreSQLConnectionManager for connection handling and schema extraction
  • Updated backend workflow to detect connectionType and route to appropriate executor
  • Added plan_generator converters for database schema to graph/metadata format
  • Updated interpreter to execute queries on PostgreSQL via psycopg2
  • Modified dashboard to show Database icon for databases vs FileSpreadsheet for files
  • Added 'Connect Database' and 'Upload File' buttons to navbar
  • Created comprehensive documentation and testing guides

Backend:

  • backend/main.py: /query detects DATABASE type, /connect_database endpoint
  • backend/utils/database_utilities.py: PostgreSQLConnectionManager class
  • backend/llm/plan_generator.py: Schema converters, State class updates
  • backend/llm/interpretor.py: execute_postgres_query() support

Frontend:

  • my-app/app/connect-database/page.tsx: Full connection form with validation
  • my-app/app/api/datasources/connect-db/route.ts: API proxy
  • my-app/app/dashboard/page.tsx: Conditional icons for FILE vs DATABASE
  • my-app/components/layout/navbar.tsx: Database connection link

Database:

  • Prisma migration: 20260101113219_add_database_connection
  • New fields: connectionType, dbHost, dbPort, dbName, dbUsername, dbPassword, displayName

- Enable users to connect their own PostgreSQL databases via credentials
- Added database connection form at /connect-database with credential testing
- Extended Prisma schema with connectionType (FILE/DATABASE) and db credentials
- Created PostgreSQLConnectionManager for connection handling and schema extraction
- Updated backend workflow to detect connectionType and route to appropriate executor
- Added plan_generator converters for database schema to graph/metadata format
- Updated interpreter to execute queries on PostgreSQL via psycopg2
- Modified dashboard to show Database icon for databases vs FileSpreadsheet for files
- Added 'Connect Database' and 'Upload File' buttons to navbar
- Created comprehensive documentation and testing guides

Backend:
- backend/main.py: /query detects DATABASE type, /connect_database endpoint
- backend/utils/database_utilities.py: PostgreSQLConnectionManager class
- backend/llm/plan_generator.py: Schema converters, State class updates
- backend/llm/interpretor.py: execute_postgres_query() support

Frontend:
- my-app/app/connect-database/page.tsx: Full connection form with validation
- my-app/app/api/datasources/connect-db/route.ts: API proxy
- my-app/app/dashboard/page.tsx: Conditional icons for FILE vs DATABASE
- my-app/components/layout/navbar.tsx: Database connection link

Database:
- Prisma migration: 20260101113219_add_database_connection
- New fields: connectionType, dbHost, dbPort, dbName, dbUsername, dbPassword, displayName
@vercel

vercel Bot commented Jan 1, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
nl-to-sql Error Error Jan 1, 2026 0:01am

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant