Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
208 commits
Select commit Hold shift + click to select a range
0a8f65f
add-tax
galshubeli Aug 18, 2025
3438c44
move-const-config
galshubeli Aug 18, 2025
b61598b
fix-bug
galshubeli Aug 18, 2025
05b70b0
fix-comments
galshubeli Aug 18, 2025
f6b2898
fix-bug
galshubeli Aug 18, 2025
e99998e
fix-tests
galshubeli Aug 18, 2025
4f6e6d5
single-func
galshubeli Aug 19, 2025
3d99fea
Update api/config.py
galshubeli Aug 19, 2025
94ede81
Merge branch 'main' into add-taxonomy
gkorland Aug 19, 2025
acaade4
gen-queries
galshubeli Aug 19, 2025
4dc93b1
add user login support
gkorland Aug 22, 2025
9d96d9a
Potential fix for code scanning alert no. 124: Log Injection
gkorland Aug 22, 2025
4d36bfa
Merge branch 'staging' into add-taxonomy
galshubeli Aug 24, 2025
9f7f3ae
rm-rw-condition
galshubeli Aug 24, 2025
fc0389d
rm-max-rw
galshubeli Aug 24, 2025
dcfb5fc
Update api/config.py
galshubeli Aug 24, 2025
62c448e
Merge branch 'staging' into add-taxonomy
gkorland Aug 24, 2025
9d82047
Initial plan
Copilot Aug 25, 2025
aa61444
Initial analysis and setup for user token generation feature
Copilot Aug 25, 2025
d088b36
Implement token management API and frontend UI
Copilot Aug 25, 2025
2e700cf
Complete token management implementation with tests and documentation
Copilot Aug 25, 2025
7647f6e
Implement user API token management system
Copilot Aug 25, 2025
0f8f049
Fix spellcheck errors by adding technical terms to wordlist
Copilot Aug 25, 2025
0175560
Bump litellm from 1.75.9 to 1.76.0
dependabot[bot] Aug 27, 2025
034bb7f
Merge branch 'staging' into dependabot/pip/staging/litellm-1.76.0
gkorland Aug 27, 2025
c89a793
Merge branch 'staging' into copilot/fix-120
gkorland Aug 27, 2025
d1b51a2
add MCP server
gkorland Aug 29, 2025
337c0f2
Merge branch 'staging' into user-login
gkorland Aug 29, 2025
e6332dd
fix PR
gkorland Aug 29, 2025
106b474
fix user signup process
gkorland Aug 29, 2025
6d22da0
Merge branch 'staging' into copilot/fix-120
gkorland Aug 29, 2025
58e26d7
Merge branch 'staging' into dependabot/pip/staging/litellm-1.76.0
gkorland Aug 30, 2025
7eaa369
Merge pull request #134 from FalkorDB/dependabot/pip/staging/litellm-…
gkorland Aug 30, 2025
9fbb26c
polish the README
gkorland Aug 30, 2025
7a10e70
move intro
gkorland Aug 30, 2025
1cfeec6
Merge pull request #157 from FalkorDB/CLEAR-README
gkorland Aug 30, 2025
f465a43
Merge branch 'main' into mcp
gkorland Aug 30, 2025
21bfea2
add configuration
gkorland Aug 30, 2025
71fcbd1
update the copilot
gkorland Aug 30, 2025
3463773
Remove MCP server configuration comments
gkorland Aug 30, 2025
090a24b
Merge branch 'staging' into mcp
gkorland Aug 30, 2025
5bd1855
update lock
gkorland Aug 30, 2025
b6f8dbe
fix lint
gkorland Aug 30, 2025
a0c94c9
Merge pull request #153 from FalkorDB/mcp
gkorland Aug 30, 2025
d5db163
Merge branch 'staging' into user-login
gkorland Aug 30, 2025
891218c
fix spelling
gkorland Aug 30, 2025
19d9695
Merge branch 'staging' into user-login
gkorland Aug 30, 2025
9b75abb
Merge branch 'staging' into copilot/fix-120
gkorland Aug 30, 2025
f002768
remove dead code
gkorland Aug 30, 2025
7f540d3
fix token
gkorland Aug 30, 2025
cefd25c
Merge pull request #121 from FalkorDB/copilot/fix-120
gkorland Aug 30, 2025
7143cb3
add steps in db load
gkorland Aug 30, 2025
a62da10
fix date presentention
gkorland Aug 31, 2025
e80f371
Merge branch 'staging' into load-steps
gkorland Aug 31, 2025
93ab17e
show steps
gkorland Aug 31, 2025
ebba6ab
add REST API to README
gkorland Aug 31, 2025
900f2f5
fix typo
gkorland Aug 31, 2025
cb18acc
fix makefile install
gkorland Aug 31, 2025
c12572e
Merge branch 'staging' into swagger
gkorland Aug 31, 2025
9c72e1a
Merge branch 'staging' into add-taxonomy
galshubeli Aug 31, 2025
423e2f1
Merge pull request #162 from FalkorDB/swagger
gkorland Aug 31, 2025
68b489c
Merge branch 'staging' into load-steps
gkorland Aug 31, 2025
d0097a0
Merge pull request #161 from FalkorDB/load-steps
gkorland Aug 31, 2025
a10617d
set APP_ENV
gkorland Aug 31, 2025
70815c3
Merge branch 'staging' into APP_ENV
gkorland Aug 31, 2025
bd455cc
Merge pull request #164 from FalkorDB/APP_ENV
gkorland Aug 31, 2025
69949c9
fix type
gkorland Aug 31, 2025
48a8049
rm-tax-agent
galshubeli Aug 31, 2025
35faa8e
Merge branch 'staging' into add-taxonomy
galshubeli Aug 31, 2025
cbe2897
fix-queries
galshubeli Aug 31, 2025
2d2e9aa
Merge pull request #113 from FalkorDB/add-taxonomy
gkorland Aug 31, 2025
964f26b
set session middleware
gkorland Aug 31, 2025
7ac836a
Fix Lint Errors
Naseem77 Aug 31, 2025
17bade0
Merge branch 'staging' into fix-lint-errors1
Naseem77 Aug 31, 2025
893b81c
Revert Pipfile changes - only keep lint fixes
Naseem77 Aug 31, 2025
aa5ce1e
fix google token
gkorland Aug 31, 2025
0e5bc05
Merge branch 'fix-lint-errors1' of https://github.com/FalkorDB/QueryW…
Naseem77 Aug 31, 2025
7f22c0d
Remove test_refactor.py - not needed for lint fixes
Naseem77 Aug 31, 2025
3356bfd
put lax back
gkorland Aug 31, 2025
72ca9c2
add session
gkorland Aug 31, 2025
5cf662b
clean session on logout
gkorland Aug 31, 2025
fe7d18f
fix cross token issues
gkorland Aug 31, 2025
854d6db
Merge branch 'staging' into fix-lint-errors1
galshubeli Aug 31, 2025
4397e5b
add bottons
gkorland Aug 31, 2025
147afb3
Merge branch 'main' into staging
gkorland Aug 31, 2025
5b27cc4
fix lock file
gkorland Aug 31, 2025
16edbe0
fix db access
gkorland Aug 31, 2025
b06c3e9
fix unit tests
gkorland Aug 31, 2025
82d08fb
Merge branch 'staging' into fix-lint-errors1
gkorland Aug 31, 2025
0bffe52
fix lint
gkorland Aug 31, 2025
b4fb529
fix lint
gkorland Aug 31, 2025
31ffece
set bottons
gkorland Aug 31, 2025
96710af
add buttons at the left toolbar
gkorland Aug 31, 2025
a600f60
fix style
gkorland Aug 31, 2025
726189b
Merge branch 'staging' into bottons
gkorland Aug 31, 2025
4e507a7
Merge pull request #166 from FalkorDB/bottons
gkorland Sep 1, 2025
341f61c
Update README.md
gkorland Sep 1, 2025
654c90d
Merge branch 'staging' into fix-lint-errors1
galshubeli Sep 1, 2025
d1f0bc7
Fix Lint Errors
Naseem77 Aug 31, 2025
b037370
Revert Pipfile changes - only keep lint fixes
Naseem77 Aug 31, 2025
8acbb2c
Fix e2e tests
Naseem77 Sep 1, 2025
1e66b77
Merge branch 'staging' into user-login
gkorland Sep 1, 2025
186d803
Update CI
Naseem77 Sep 1, 2025
368920b
fix ai comments
Naseem77 Sep 1, 2025
ce09501
fix schema
Anchel123 Sep 1, 2025
96a13fb
fix query result
Anchel123 Sep 1, 2025
44eaaf0
commit
Anchel123 Sep 1, 2025
f72e45f
commit
Anchel123 Sep 1, 2025
c93f0f3
commit
Anchel123 Sep 1, 2025
b90ebdd
fix tests
Naseem77 Sep 1, 2025
d3bb94a
fix tests
Naseem77 Sep 1, 2025
ec5280f
clean-up
galshubeli Sep 1, 2025
4b5183c
update auth tests and add unauth tests
Naseem77 Sep 1, 2025
79dabcc
fix tests
Naseem77 Sep 1, 2025
95c191f
rev-pipe
galshubeli Sep 1, 2025
ca1c4f5
exception
galshubeli Sep 1, 2025
23e2687
Merge pull request #165 from FalkorDB/fix-lint-errors1
galshubeli Sep 1, 2025
7468126
fix tests
Naseem77 Sep 1, 2025
04f1f8e
Merge branch 'staging' into fix-e2e-tests
Naseem77 Sep 1, 2025
55d4c63
fix uint tests
Naseem77 Sep 1, 2025
bb668bb
Merge remote-tracking branch 'origin/main' into fix-schema
Anchel123 Sep 1, 2025
75870cf
commit
Anchel123 Sep 1, 2025
5e0d3c8
Merge branch 'fix-schema' into add-refresh
Anchel123 Sep 1, 2025
534c556
fix-lint-agents
galshubeli Sep 1, 2025
2944b5a
Fix Routes lint errors
Naseem77 Sep 1, 2025
5130eee
fix lint
Naseem77 Sep 1, 2025
f24ec68
Merge branch 'fix-schema' into fix-query-result
Anchel123 Sep 1, 2025
5bc6bcc
fix lint
Naseem77 Sep 1, 2025
35341c5
Merge remote-tracking branch 'origin/staging' into fix-query-result
Anchel123 Sep 1, 2025
d9ae6d9
Merge remote-tracking branch 'origin/staging' into fix-schema
Anchel123 Sep 1, 2025
a0131de
Merge remote-tracking branch 'origin/staging' into add-refresh
Anchel123 Sep 1, 2025
828ec8d
clean-up
galshubeli Sep 1, 2025
7a20268
Merge pull request #168 from FalkorDB/fix-lint-agents
galshubeli Sep 1, 2025
fc6845e
Merge branch 'staging' into clean-up
galshubeli Sep 1, 2025
e7b3730
Merge pull request #172 from FalkorDB/clean-up
galshubeli Sep 1, 2025
fab85e2
fix codeQL
Naseem77 Sep 1, 2025
bfd8f82
fix codeQL
Naseem77 Sep 1, 2025
5d9e52c
Merge branch 'staging' into fix-routes-lint-errors
Naseem77 Sep 1, 2025
aac787b
trig-con-ref
galshubeli Sep 1, 2025
6d68809
remove graph_id from logging
Naseem77 Sep 1, 2025
8d7711a
Merge branch 'fix-routes-lint-errors' of https://github.com/FalkorDB/…
Naseem77 Sep 1, 2025
897a879
fix lint
Naseem77 Sep 1, 2025
a88d7f9
Update graph.py
Naseem77 Sep 1, 2025
6ba8697
Merge remote-tracking branch 'origin/fix-ref-schema' into add-refresh
Anchel123 Sep 1, 2025
ee9100a
commit
Anchel123 Sep 1, 2025
83fd99c
Fix Loaders lint
Naseem77 Sep 1, 2025
4b0f627
fix lint
Naseem77 Sep 1, 2025
b346421
openai-config
galshubeli Sep 1, 2025
7d85d1c
fix users
gkorland Sep 1, 2025
6de1dbf
remove landing page
gkorland Sep 1, 2025
de2df08
Merge branch 'staging' into fix-e2e-tests
gkorland Sep 1, 2025
191e289
Merge pull request #177 from FalkorDB/remove-landing
galshubeli Sep 2, 2025
2548bf1
spellcheck
galshubeli Sep 2, 2025
8213294
Merge pull request #175 from FalkorDB/fix-loaders-lint
galshubeli Sep 2, 2025
a57dedb
Merge pull request #169 from FalkorDB/fix-routes-lint-errors
galshubeli Sep 2, 2025
72a7494
Merge branch 'staging' into openai-config
galshubeli Sep 2, 2025
b5e9936
Merge branch 'staging' into fix-e2e-tests
Naseem77 Sep 2, 2025
8ee697e
Update api/memory/graphiti_tool.py
galshubeli Sep 2, 2025
83a6fec
Merge pull request #176 from FalkorDB/openai-config
galshubeli Sep 2, 2025
2f54a95
fix tests
Naseem77 Sep 2, 2025
f158f81
Merge branch 'staging' into fix-e2e-tests
Naseem77 Sep 2, 2025
8a972f0
Merge pull request #167 from FalkorDB/fix-e2e-tests
galshubeli Sep 2, 2025
63c227a
commit
Anchel123 Sep 2, 2025
e5fbb42
commit
Anchel123 Sep 2, 2025
3fa4567
Merge branch 'staging' into fix-schema
Naseem77 Sep 2, 2025
8c58350
fix-skip-lint
galshubeli Sep 2, 2025
fbd3feb
spell
galshubeli Sep 2, 2025
9a2107b
Merge pull request #178 from FalkorDB/fix-avoid-lint
galshubeli Sep 2, 2025
af3b75a
Merge branch 'staging' into user-login
galshubeli Sep 2, 2025
4467058
Merge branch 'staging' into fix-query-result
Naseem77 Sep 2, 2025
cf0e694
commit
Anchel123 Sep 2, 2025
cd058f8
Merge branch 'staging' into fix-schema
Naseem77 Sep 2, 2025
05ca14c
Merge pull request #170 from FalkorDB/fix-schema
Naseem77 Sep 2, 2025
75b231c
Merge branch 'staging' into fix-query-result
Anchel123 Sep 2, 2025
428d8fc
fix user login
gkorland Sep 2, 2025
0245bf0
commit
Anchel123 Sep 2, 2025
da214e5
update-logo
galshubeli Sep 2, 2025
cf845e1
Merge branch 'staging' into update-logo
galshubeli Sep 2, 2025
6f43108
Merge pull request #183 from FalkorDB/update-logo
galshubeli Sep 2, 2025
4b1d65a
Update .env.example
Anchel123 Sep 2, 2025
84699d2
Merge branch 'staging' into fix-query-result
Naseem77 Sep 2, 2025
f3a2ccd
Update .env.example
Anchel123 Sep 2, 2025
0187ad3
Merge pull request #171 from FalkorDB/fix-query-result
Naseem77 Sep 2, 2025
3a52f22
update _is_email_auth_enabled
galshubeli Sep 2, 2025
c398091
fix-lint
galshubeli Sep 2, 2025
6ffc78b
commit
Anchel123 Sep 2, 2025
6568f24
Merge remote-tracking branch 'origin/staging' into add-refresh
Anchel123 Sep 2, 2025
469c69f
Revert "commit"
Anchel123 Sep 2, 2025
a3d803f
commit
Anchel123 Sep 2, 2025
bf71824
Update menu.css
Anchel123 Sep 2, 2025
f33b5b8
fix-lint
galshubeli Sep 2, 2025
75d9438
fix-lint
galshubeli Sep 2, 2025
18b5d0c
Merge remote-tracking branch 'origin/staging' into fix-input
Anchel123 Sep 2, 2025
aaf9156
Merge pull request #184 from FalkorDB/add-refresh
galshubeli Sep 2, 2025
f781e81
Merge branch 'staging' into fix-input
Naseem77 Sep 2, 2025
21785f9
Merge branch 'staging' into replcae-fonts
Naseem77 Sep 2, 2025
fcac6dd
Merge pull request #182 from FalkorDB/fix-input
Naseem77 Sep 2, 2025
ee82b3f
commit
Anchel123 Sep 2, 2025
d0a0b81
Merge branch 'staging' into replcae-fonts
Naseem77 Sep 2, 2025
a66d7db
Merge pull request #186 from FalkorDB/six-css
galshubeli Sep 2, 2025
935cfcd
Merge branch 'staging' into replcae-fonts
galshubeli Sep 2, 2025
666f5c1
commit
Anchel123 Sep 2, 2025
752eb2a
Merge pull request #185 from FalkorDB/replcae-fonts
Naseem77 Sep 2, 2025
3651063
remove duplicate imports
Naseem77 Sep 2, 2025
9e9c631
Merge branch 'staging' into fix-nodes-collision
Naseem77 Sep 2, 2025
9df075d
Merge pull request #187 from FalkorDB/fix-nodes-collision
Naseem77 Sep 2, 2025
f1df24c
Merge branch 'staging' into user-login
galshubeli Sep 2, 2025
1147551
Merge pull request #110 from FalkorDB/user-login
galshubeli Sep 2, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
120 changes: 96 additions & 24 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,37 +1,109 @@
# Example configuration for text2sql with AI-generated user responses
# QueryWeaver example environment file
# Copy this to `.env` and edit values before running the app or the Docker image:
#
# cp .env.example .env
# # edit .env
#
# Minimal required variables for a basic run (these are left uncommented below):
# - FASTAPI_SECRET_KEY (REQUIRED)
# - FALKORDB_URL (REQUIRED) — preferred single connection string for FalkorDB
#
# Optional (commented) variables are provided as examples; uncomment and set them
# only if you need the functionality (OAuth, AI keys, local host/port overrides, etc.).

## API Keys for LiteLLM (required for AI functionality)
# Azure OpenAI
# -----------------------------
# Application / Server settings
# -----------------------------
# REQUIRED: secret used by FastAPI session middleware — change this before running in production
FASTAPI_SECRET_KEY=your_super_secret_key_here

# Optional: enable debug/reload when running the app directly
# FASTAPI_DEBUG=False

# Optional: set application environment (development, staging, production)
# Default: development
# APP_ENV=development

# Optional: allow OAuth over HTTP in development (disable in production)
# OAUTHLIB_INSECURE_TRANSPORT=1

# -----------------------------
# FalkorDB connection (REQUIRED / preferred)
# -----------------------------
# Preferred: single connection URL. Edit to point at your FalkorDB/Redis instance.
# Example: redis://localhost:6379/0
FALKORDB_URL=redis://localhost:6379/0 # REQUIRED - change to your FalkorDB URL

# Optional: separate host/port settings for local testing (only used if FALKORDB_URL is not set)
# FALKORDB_HOST=localhost
# FALKORDB_PORT=6379

Comment on lines +33 to +40
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Inline comment breaks FALKORDB_URL parsing; fix quoting per dotenv-linter.

The value currently includes a trailing comment, which many dotenv parsers treat as part of the value unless quoted. Static analysis already flagged this (ValueWithoutQuotes at Line 28).

Apply:

-# Example: redis://localhost:6379/0
-FALKORDB_URL=redis://localhost:6379/0  # REQUIRED - change to your FalkorDB URL
+# Example: redis://localhost:6379/0
+# REQUIRED - change to your FalkorDB URL
+FALKORDB_URL="redis://localhost:6379/0"

Optional additions to help users with auth/TLS:

 # Optional: separate host/port settings for local testing (only used if FALKORDB_URL is not set)
 # FALKORDB_HOST=localhost
 # FALKORDB_PORT=6379
+# Examples with auth/TLS:
+# FALKORDB_URL="redis://:password@localhost:6379/0"
+# FALKORDB_URL="rediss://localhost:6380/0"
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
# Preferred: single connection URL. Edit to point at your FalkorDB/Redis instance.
# Example: redis://localhost:6379/0
FALKORDB_URL=redis://localhost:6379/0 # REQUIRED - change to your FalkorDB URL
# Optional: separate host/port settings for local testing (only used if FALKORDB_URL is not set)
# FALKORDB_HOST=localhost
# FALKORDB_PORT=6379
# Preferred: single connection URL. Edit to point at your FalkorDB/Redis instance.
# Example: redis://localhost:6379/0
# REQUIRED - change to your FalkorDB URL
FALKORDB_URL="redis://localhost:6379/0"
# Optional: separate host/port settings for local testing (only used if FALKORDB_URL is not set)
# FALKORDB_HOST=localhost
# FALKORDB_PORT=6379
# Examples with auth/TLS:
# FALKORDB_URL="redis://:password@localhost:6379/0"
# FALKORDB_URL="rediss://localhost:6380/0"
🧰 Tools
🪛 dotenv-linter (3.3.0)

[warning] 28-28: [ValueWithoutQuotes] This value needs to be surrounded in quotes

(ValueWithoutQuotes)

🤖 Prompt for AI Agents
In .env.example around lines 26 to 33 the FALKORDB_URL value has an inline
comment after it which many dotenv parsers treat as part of the value; remove
the trailing inline comment or wrap the URL value in quotes so the parser
ignores the comment (alternatively move the explanatory comment to its own line
above or below the variable), and optionally add separate commented examples for
authenticated and TLS connection strings on new lines for clarity.

# -----------------------------
# Optional API / secret tokens
# -----------------------------
# API token for internal API access (optional)
# SECRET_TOKEN=your_secret_token
# SECRET_TOKEN_ERP=your_erp_token

# -----------------------------
# AI / LLM configuration (optional)
# -----------------------------
# The default is to use Azure OpenAI if all three variables are set.
# If the OPENAI_API_KEY is set, it will use OpenAI directly.

# Azure OpenAI (example)
# AZURE_API_KEY=your_azure_api_key
# AZURE_API_BASE=https://your-resource.openai.azure.com/
# AZURE_API_VERSION=2023-05-15

# OpenAI
# OpenAI (example)
# OPENAI_API_KEY=your_openai_api_key

# Google OAuth for authentication
GOOGLE_CLIENT_ID=your_google_client_id
GOOGLE_CLIENT_SECRET=your_google_client_secret

# GitHub OAuth for authentication
GITHUB_CLIENT_ID=your_github_client_id
GITHUB_CLIENT_SECRET=your_github_client_secret
# Optional: override default model names from api/config.py
# COMPLETION_MODEL=azure/gpt-4.1
# EMBEDDING_MODEL=azure/text-embedding-ada-002

Comment on lines 54 to -65
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Verification agent

🧩 Analysis chain

Validate model override env var names against config/litellm usage.

Placeholders look fine, but ensure COMPLETION_MODEL and EMBEDDING_MODEL match what api/config.py and litellm expect.

Run:


🏁 Script executed:

#!/bin/bash
# Check consumption points for model envs
rg -n -C2 '\b(COMPLETION_MODEL|EMBEDDING_MODEL)\b' -- .
# Check litellm/provider-specific envs referenced
rg -n -C2 -i 'AZURE_API_(KEY|BASE|VERSION)|OPENAI_API_KEY' -- .

Length of output: 4270


🏁 Script executed:

#!/bin/bash
# Display the beginning of api/config.py to inspect default values and loading logic
sed -n '1,200p' api/config.py

# Search for environment variable access patterns in api/config.py
rg -n 'getenv' -C3 -- api/config.py

Length of output: 7570


Align or remove model override env vars
.env.example lists COMPLETION_MODEL and EMBEDDING_MODEL but api/config.py hard-codes those values and never reads those env vars. Either update Config to use

COMPLETION_MODEL = os.getenv("COMPLETION_MODEL", "azure/gpt-4.1")
EMBEDDING_MODEL_NAME = os.getenv("EMBEDDING_MODEL", "azure/text-embedding-ada-002")

(or rename placeholders to match), or remove those lines from .env.example.
[api/config.py: EMBEDDING_MODEL_NAME & COMPLETION_MODEL] [.env.example]

# FASTAPI configuration
FASTAPI_SECRET_KEY=your_super_secret_key_here
# -----------------------------
# OAuth configuration (optional — uncomment to enable login flows)
# -----------------------------
# Google OAuth
# GOOGLE_CLIENT_ID=your_google_client_id
# GOOGLE_CLIENT_SECRET=your_google_client_secret

# FalkorDB configuration
FALKORDB_HOST=localhost
FALKORDB_PORT=6379
# GitHub OAuth
# GITHUB_CLIENT_ID=your_github_client_id
# GITHUB_CLIENT_SECRET=your_github_client_secret

# Optional tokens for API access
SECRET_TOKEN=your_secret_token
SECRET_TOKEN_ERP=your_erp_token
# If your OAuth app uses a different base URL than the request base (e.g., using 127.0.0.1 vs localhost)
# you can override the base used for building callback URLs. Example:
# OAUTH_BASE_URL=http://localhost:5000

# AI Model Configuration (adjust as needed)
# These are set in api/config.py but can be overridden via environment variables
# COMPLETION_MODEL=azure/gpt-4.1 # Model used for SQL generation and response formatting
# EMBEDDING_MODEL=azure/text-embedding-ada-002 # Model used for embeddings
# -----------------------------
# Email Configuration (optional - for sending invitation emails)
# -----------------------------
# MAIL_SERVER=smtp.mailgun.org
# MAIL_PORT=587
# MAIL_USE_TLS=True
# MAIL_USERNAME=your_mail_username
# MAIL_PASSWORD=your_mail_password
# MAIL_DEFAULT_SENDER=noreply@yourdomain.com
# EMAIL_AUTH_ENABLED=false

# Google Tag Manager (optional)
# -----------------------------
# Frontend / analytics (optional)
# -----------------------------
# Google Tag Manager ID (optional)
# GOOGLE_TAG_MANAGER_ID=GTM-XXXXXXX

# -----------------------------
# Optional MCP (Model Context Protocol) settings
# -----------------------------
# Control QueryWeaver's built-in MCP endpoints (default: enabled)
# Set to "true" to disable mounting the MCP HTTP surface without editing code
# DISABLE_MCP=false

# Notes
# -----------------------------
# - Keep secrets out of source control. Use your local `.env` (ignored by git) or a secrets manager in production.
# - For Docker runs, pass `--env-file .env` to `docker run` or provide individual `-e` args.
# - See api/config.py for additional runtime configuration defaults and model overrides.
89 changes: 72 additions & 17 deletions .github/copilot-instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,27 @@ QueryWeaver is an open-source Text2SQL tool that transforms natural language int

## Essential Build & Validation Commands

**CRITICAL**: Always run these commands in the exact order specified. Many commands will fail if prerequisites are not met.
Follow this order for a reliable local setup; if you customize the steps, ensure each prerequisite (dependencies, `.env`, Playwright) is completed.

### 1. Initial Setup (Required for all operations)
### 1. Initial Setup (recommended for new contributors)
```bash
# Install pipenv if not available
pip install pipenv

# Install all dependencies (ALWAYS run this first)
# Install dependencies (backend + frontend) and prepare dev tools
# Recommended: use the Make helper which installs Python deps and frontend deps
make install
# OR manually: pipenv sync --dev

# Set up environment file (REQUIRED)
# Prepare the full development environment (installs Playwright browsers too)
# This runs `make install` then Playwright install steps.
make setup-dev

# OR manual steps if you prefer more granular control:
# pipenv sync --dev
# pipenv run playwright install chromium
# pipenv run playwright install-deps

# Set up environment file
cp .env.example .env
# Edit .env with required values (see Environment Setup section)
```
Expand All @@ -50,7 +59,7 @@ pipenv run playwright install-deps
### 3. Testing Commands
```bash
# IMPORTANT: Unit tests require FalkorDB running or will fail with connection errors
# Start FalkorDB for testing (requires Docker)
# You can start a local test FalkorDB using the included Make helper
make docker-falkordb

# Run unit tests only (safer, doesn't require browser)
Expand Down Expand Up @@ -122,22 +131,28 @@ make clean

## Environment Setup Requirements

**CRITICAL**: Create `.env` file from `.env.example` and configure these essential variables:
Create `.env` file from `.env.example` and configure these essential variables:

```bash
# REQUIRED for FastAPI to start
FASTAPI_SECRET_KEY=your_super_secret_key_here
FASTAPI_DEBUG=False

# REQUIRED for database connection (most functionality)
FALKORDB_HOST=localhost
FALKORDB_PORT=6379
# Optional: set application environment (development, staging, production)
# Default: development (affects session cookie security for OAuth)
APP_ENV=development

# REQUIRED for database connection (preferred)
# Use a single connection string if possible. Example:
# FALKORDB_URL=redis://localhost:6379/0

# Optional: enable debug/reload when running the app directly
# FASTAPI_DEBUG=False

# REQUIRED for full functionality (OAuth)
GOOGLE_CLIENT_ID=your_google_client_id
GOOGLE_CLIENT_SECRET=your_google_client_secret
GITHUB_CLIENT_ID=your_github_client_id
GITHUB_CLIENT_SECRET=your_github_client_secret
# REQUIRED for full functionality (OAuth, only if you use login flows)
# GOOGLE_CLIENT_ID=your_google_client_id
# GOOGLE_CLIENT_SECRET=your_google_client_secret
# GITHUB_CLIENT_ID=your_github_client_id
# GITHUB_CLIENT_SECRET=your_github_client_secret

# OPTIONAL: AI model configuration (defaults in api/config.py)
# AZURE_API_KEY=your_azure_api_key
Expand All @@ -147,6 +162,7 @@ GITHUB_CLIENT_SECRET=your_github_client_secret
**For testing in CI/development**, minimal `.env` setup:
```bash
FASTAPI_SECRET_KEY=test-secret-key
APP_ENV=development
FASTAPI_DEBUG=False
FALKORDB_HOST=localhost
FALKORDB_PORT=6379
Expand Down Expand Up @@ -267,7 +283,7 @@ All workflows follow this pattern:
- Python 3.12 setup
- pipenv installation
- pipenv sync --dev
- .env file creation with test values
- .env file creation with test values (use FALKORDB_URL in CI)
- FalkorDB service startup (for tests requiring DB)
- Playwright browser installation (for E2E tests)
```
Expand Down Expand Up @@ -307,6 +323,45 @@ Before submitting any changes, run these validation steps:
- `tests/e2e/README.md`: Comprehensive E2E testing documentation
- `setup_e2e_tests.sh`: Automated test environment setup script

### MCP (Model Context Protocol)

QueryWeaver optionally exposes an MCP HTTP surface (mounted at `/mcp`) to allow external MCP clients to call QueryWeaver's Text2SQL operations. Key points for coding agents and reviewers:

- Runtime toggle: the built-in MCP endpoints can be disabled with the env var `DISABLE_MCP=true`. Default behavior is enabled.
- Client config: consumers typically use an `mcp.json` (or client-specific config) that points to the MCP URL, for example:

```json
{
"servers": {
"queryweaver": {
"type": "http",
"url": "http://127.0.0.1:5000/mcp",
"headers": {
"Authorization": "Bearer your_token_here"
}
}
},
"inputs": []
}
```

- Tools and examples: projects like GitMCP show common client configurations for Cursor, VSCode, and other MCP-capable tools; use those patterns for guidance when writing docs or adding examples in this repo.
- Security: avoid embedding bearer tokens in repo files. Prefer runtime injection via env files or secret managers. If you need to demonstrate a token in tests, use mocked tokens and don't commit them.

Example: generate `mcp.json` from an environment token (pseudo):

```bash
export MQW_TOKEN="secret-token"
cat > mcp.json <<EOF
{
"servers": {"queryweaver": {"type":"http","url":"http://127.0.0.1:5000/mcp","headers":{"Authorization":"Bearer ${MQW_TOKEN}"}}},
"inputs": []
}
EOF
```

If you change MCP wiring or add integrations, update `README.md` and `.env.example` accordingly and add tests that run with MCP enabled/disabled to cover both code paths.

## Trust These Instructions

These instructions have been validated by running all commands and testing the complete workflow. Only search for additional information if:
Expand Down
31 changes: 30 additions & 1 deletion .github/wordlist.txt
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,33 @@ frontend
Frontend
js
npm
deps
deps
backend
Backend
dropdown
cryptographically
SHA
auth
lookups
http
Quickstart
MCP
QueryWeaver's
dev
FastAPI

ai
https
queryweaver
json
JSON
openapi
OpenAPI
CLI
namespace
namespaced

CSRF
LLM
OpenAI
OpenAI's
4 changes: 2 additions & 2 deletions .github/workflows/e2e-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: E2E Tests

on:
push:
branches: [ main, develop ]
branches: [ main, staging ]
pull_request:
branches: [ main, develop ]
branches: [ main, staging ]

permissions:
contents: read
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: Tests

on:
push:
branches: [ main, develop ]
branches: [ main, staging ]
pull_request:
branches: [ main, develop ]
branches: [ main, staging ]

permissions:
contents: read
Expand Down Expand Up @@ -63,7 +63,6 @@ jobs:

e2e-tests:
runs-on: ubuntu-latest
needs: unit-tests

services:
falkordb:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,4 @@ tmp_*
node_modules/
/app/public/js/*
.jinja_cache/
demo_tokens.py
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ help: ## Show this help message

install: ## Install dependencies
pipenv sync --dev
npm install ./app
npm install --prefix ./app


setup-dev: install ## Set up development environment
Expand Down
3 changes: 2 additions & 1 deletion Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ name = "pypi"
[packages]
fastapi = "~=0.116.1"
uvicorn = "~=0.35.0"
litellm = "~=1.75.9"
litellm = "~=1.76.0"
falkordb = "~=1.2.0"
psycopg2-binary = "~=2.9.9"
pymysql = "~=1.1.0"
Expand All @@ -16,6 +16,7 @@ jsonschema = "~=4.25.0"
tqdm = "~=4.67.1"
python-multipart = "~=0.0.10"
jinja2 = "~=3.1.4"
fastapi-mcp = "~=0.4.0"
graphiti-core = {ref = "staging", git = "git+https://github.com/FalkorDB/graphiti.git"}

[dev-packages]
Expand Down
Loading
Loading