Skip to content

Commit b8bb818

Browse files
Reorganize project structure: separate LangBuilder and OpenWebUI stacks (#18)
* Reorganize project structure: separate LangBuilder and OpenWebUI stacks * branch clean --------- Co-authored-by: Joaquin Robador <joaquinrobador@gmail.com>
1 parent 2b628c2 commit b8bb818

File tree

8,140 files changed

+756961
-83749
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

8,140 files changed

+756961
-83749
lines changed

.alucify/AppGraph_langbuilder.json

Lines changed: 0 additions & 77357 deletions
This file was deleted.

.alucify/FINAL_UIDL_SUMMARY.md

Lines changed: 0 additions & 487 deletions
This file was deleted.

.alucify/architecture-specification-v1.2-corrected.md

Lines changed: 0 additions & 3152 deletions
This file was deleted.

.env.example

Lines changed: 114 additions & 123 deletions
Original file line numberDiff line numberDiff line change
@@ -1,123 +1,114 @@
1-
# Description: Example of .env file
2-
# Usage: Copy this file to .env and change the values
3-
# according to your needs
4-
# Do not commit .env file to git
5-
# Do not change .env.example file
6-
7-
# Config directory
8-
# Directory where files, logs and database will be stored
9-
# Example: LANGBUILDER_CONFIG_DIR=~/.langbuilder
10-
LANGBUILDER_CONFIG_DIR=
11-
12-
# Save database in the config directory
13-
# Values: true, false
14-
# If false, the database will be saved in LangBuilder's root directory
15-
# This means that the database will be deleted when LangBuilder is uninstalled
16-
# and that the database will not be shared between different virtual environments
17-
# Example: LANGBUILDER_SAVE_DB_IN_CONFIG_DIR=true
18-
LANGBUILDER_SAVE_DB_IN_CONFIG_DIR=
19-
20-
# Database URL
21-
# Postgres example: LANGBUILDER_DATABASE_URL=postgresql://postgres:postgres@localhost:5432/langbuilder
22-
# SQLite example:
23-
LANGBUILDER_DATABASE_URL=sqlite:///./langbuilder.db
24-
25-
# Database connection retry
26-
# Values: true, false
27-
# If true, the database will retry to connect to the database if it fails
28-
# Example: LANGBUILDER_DATABASE_CONNECTION_RETRY=true
29-
LANGBUILDER_DATABASE_CONNECTION_RETRY=false
30-
31-
# Cache type
32-
LANGBUILDER_LANGCHAIN_CACHE=SQLiteCache
33-
34-
# Server host
35-
# Example: LANGBUILDER_HOST=localhost
36-
LANGBUILDER_HOST=
37-
38-
# Worker processes
39-
# Example: LANGBUILDER_WORKERS=1
40-
LANGBUILDER_WORKERS=
41-
42-
# Server port
43-
# Example: LANGBUILDER_PORT=7860
44-
LANGBUILDER_PORT=
45-
46-
# Logging level
47-
# Example: LANGBUILDER_LOG_LEVEL=critical
48-
LANGBUILDER_LOG_LEVEL=
49-
50-
# Path to the log file
51-
# Example: LANGBUILDER_LOG_FILE=logs/langbuilder.log
52-
LANGBUILDER_LOG_FILE=
53-
54-
# Time/Size for log to rotate
55-
# Example: LANGBUILDER_LOG_ROTATION=‘10 MB’/‘1 day’
56-
LANGBUILDER_LOG_ROTATION=
57-
58-
# Path to the frontend directory containing build files
59-
# Example: LANGBUILDER_FRONTEND_PATH=/path/to/frontend/build/files
60-
LANGBUILDER_FRONTEND_PATH=
61-
62-
# Whether to open the browser after starting the server
63-
# Values: true, false
64-
# Example: LANGBUILDER_OPEN_BROWSER=true
65-
LANGBUILDER_OPEN_BROWSER=
66-
67-
# Whether to remove API keys from the projects saved in the database
68-
# Values: true, false
69-
# Example: LANGBUILDER_REMOVE_API_KEYS=false
70-
LANGBUILDER_REMOVE_API_KEYS=
71-
72-
# Whether to use RedisCache or ThreadingInMemoryCache or AsyncInMemoryCache
73-
# Values: async, memory, redis
74-
# Example: LANGBUILDER_CACHE_TYPE=memory
75-
# If you want to use redis then the following environment variables must be set:
76-
# LANGBUILDER_REDIS_HOST (default: localhost)
77-
# LANGBUILDER_REDIS_PORT (default: 6379)
78-
# LANGBUILDER_REDIS_DB (default: 0)
79-
# LANGBUILDER_REDIS_CACHE_EXPIRE (default: 3600)
80-
LANGBUILDER_CACHE_TYPE=
81-
82-
# Set LANGBUILDER_AUTO_LOGIN to false if you want to disable auto login
83-
# and use the login form to login. LANGBUILDER_SUPERUSER and LANGBUILDER_SUPERUSER_PASSWORD
84-
# must be set if AUTO_LOGIN is set to false
85-
# Values: true, false
86-
LANGBUILDER_AUTO_LOGIN=
87-
88-
# SET LANGBUILDER_ENABLE_SUPERUSER_CLI to false to disable
89-
# superuser creation via the CLI
90-
LANGBUILDER_ENABLE_SUPERUSER_CLI=
91-
92-
# Superuser username
93-
# Example: LANGBUILDER_SUPERUSER=admin
94-
LANGBUILDER_SUPERUSER=
95-
96-
# Superuser password
97-
# Example: LANGBUILDER_SUPERUSER_PASSWORD=123456
98-
LANGBUILDER_SUPERUSER_PASSWORD=
99-
100-
# Should store environment variables in the database
101-
# Values: true, false
102-
LANGBUILDER_STORE_ENVIRONMENT_VARIABLES=
103-
104-
# Should enable the MCP composer feature in MCP projects
105-
# Values: true, false
106-
# Default: false
107-
LANGBUILDER_MCP_COMPOSER_ENABLED=
108-
109-
# STORE_URL
110-
# Example: LANGBUILDER_STORE_URL=https://api.langbuilder.store
111-
# LANGBUILDER_STORE_URL=
112-
113-
# DOWNLOAD_WEBHOOK_URL
114-
#
115-
# LANGBUILDER_DOWNLOAD_WEBHOOK_URL=
116-
117-
# LIKE_WEBHOOK_URL
118-
#
119-
# LANGBUILDER_LIKE_WEBHOOK_URL=
120-
121-
# Value must finish with slash /
122-
#BACKEND_URL=http://localhost:7860/
123-
BACKEND_URL=
1+
# Ollama URL for the backend to connect
2+
# The path '/ollama' will be redirected to the specified backend URL
3+
OLLAMA_BASE_URL='http://localhost:11434'
4+
5+
OPENAI_API_BASE_URL=''
6+
OPENAI_API_KEY=
7+
8+
# Port Configuration - ONLY PLACE TO DEFINE PORTS
9+
FRONTEND_PORT=5175
10+
BACKEND_PORT=8002
11+
12+
# For production, you should only need one host as
13+
# fastapi serves the svelte-kit built frontend and backend from the same host and port.
14+
# To test with CORS locally, you can set something like
15+
# NOTE: Using '*' is not recommended for production deployments
16+
CORS_ALLOW_ORIGIN="http://localhost:${FRONTEND_PORT};http://localhost:${BACKEND_PORT}"
17+
18+
# For production you should set this to match the proxy configuration (127.0.0.1)
19+
FORWARDED_ALLOW_IPS='*'
20+
21+
# DO NOT TRACK
22+
SCARF_NO_ANALYTICS=true
23+
DO_NOT_TRACK=true
24+
ANONYMIZED_TELEMETRY=false
25+
26+
# =================================
27+
# Google OAuth Configuration
28+
# =================================
29+
30+
# Google OAuth Credentials (from Google Cloud Console)
31+
GOOGLE_CLIENT_ID='your-google-client-id.apps.googleusercontent.com'
32+
GOOGLE_CLIENT_SECRET='your-google-client-secret'
33+
GOOGLE_REDIRECT_URI="http://localhost:${BACKEND_PORT}/oauth/google/callback"
34+
35+
# In your backend/.env file
36+
GOOGLE_DRIVE_CLIENT_ID='your-google-drive-client-id.apps.googleusercontent.com'
37+
GOOGLE_DRIVE_CLIENT_SECRET='your-google-drive-client-secret'
38+
WEBUI_URL="http://localhost:${FRONTEND_PORT}"
39+
40+
# OAuth Settings
41+
ENABLE_OAUTH_SIGNUP=true
42+
OAUTH_ALLOWED_DOMAINS='*'
43+
OAUTH_MERGE_ACCOUNTS_BY_EMAIL=true
44+
OAUTH_UPDATE_PICTURE_ON_LOGIN=true
45+
46+
# OpenID Provider URL for proper logout functionality
47+
OPENID_PROVIDER_URL='https://accounts.google.com/.well-known/openid_configuration'
48+
49+
# Additional OAuth Settings
50+
ENABLE_SIGNUP=true
51+
ENABLE_LOGIN_FORM=true
52+
ENABLE_API_KEY=true
53+
54+
# Database Configuration
55+
DATA_DIR='./data'
56+
DATABASE_URL='sqlite:///./data/webui.db'
57+
58+
# Application Settings
59+
WEBUI_NAME='ActionBridge'
60+
WEBUI_SECRET_KEY='your-secret-key-here'
61+
JWT_EXPIRES_IN='24h'
62+
OPEN_WEBUI_PORT=${BACKEND_PORT}
63+
PORT=${BACKEND_PORT}
64+
HOST=0.0.0.0
65+
66+
# =================================
67+
# Session Configuration (OAuth Fix)
68+
# =================================
69+
70+
# Session cookie settings for OAuth state management
71+
WEBUI_SESSION_COOKIE_SAME_SITE='lax'
72+
WEBUI_SESSION_COOKIE_SECURE='false'
73+
74+
# Enable debug logging for OAuth troubleshooting
75+
GLOBAL_LOG_LEVEL='DEBUG'
76+
77+
# =================================
78+
# Corporate Authentication (Optional)
79+
# =================================
80+
81+
# Corporate Authentication Config File
82+
CORPORATE_AUTH_CONFIG='/app/corporate_config.json'
83+
84+
# Google Workspace Setup (Required for corporate authentication)
85+
GOOGLE_WORKSPACE_DOMAIN='actionbridge.com'
86+
GOOGLE_WORKSPACE_ADMIN_EMAIL='admin@actionbridge.com'
87+
GOOGLE_SERVICE_ACCOUNT_KEY_FILE='/app/secrets/google-service-account.json'
88+
89+
# Corporate Group Mappings (JSON format)
90+
CORPORATE_GROUP_MAPPINGS="{\"actionbridge-admin@actionbridge.com\": \"admin\", \"actionbridge-users@actionbridge.com\": \"user\", \"engineering@actionbridge.com\": \"user\", \"management@actionbridge.com\": \"admin\"}"
91+
92+
# =================================
93+
# Zoho OAuth Configuration
94+
# =================================
95+
96+
# Zoho OAuth Credentials (from Zoho Developer Console)
97+
# EUGENE
98+
ZOHO_CLIENT_ID='your-zoho-client-id'
99+
ZOHO_CLIENT_SECRET='your-zoho-client-secret'
100+
ZOHO_REDIRECT_URI="http://localhost:${BACKEND_PORT}/api/v1/services/zoho/callback"
101+
# TEST
102+
#ZOHO_CLIENT_ID='your-alt-zoho-client-id'
103+
#ZOHO_CLIENT_SECRET='your-alt-zoho-client-secret'
104+
#ZOHO_REDIRECT_URI="http://localhost:\${BACKEND_PORT}/api/v1/services/zoho/callback"
105+
106+
# =================================
107+
# GoogleDriveAgent Configuration
108+
# =================================
109+
GOOGLE_DRIVE_TOKEN='your-google-drive-access-token'
110+
GOOGLE_DRIVE_USER_ID='your-google-drive-user-id'
111+
GOOGLE_DRIVE_AGENT_URL='http://localhost:8000/process'
112+
GOOGLE_DRIVE_AGENT_PATH='/home/eugene/proj/GoogleDriveAgent'
113+
KMS_MASTER_KEY='dGVzdC1rZXktMzItYnl0ZXMtYmFzZTY0LWVuY29kZWQ='
114+

.gitattributes

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,5 @@ Dockerfile text
3333
*.svg binary
3434
*.csv binary
3535
*.wav binary
36-
*.raw binary
36+
*.raw binary
37+
*.ttf binary

.gitignore

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# Backup folder (old structure before consolidation)
2+
_backup_old_structure/
3+
14
# This is to avoid Opencommit hook from getting pushed
25
prepare-commit-msg
36
# Logs
@@ -134,7 +137,6 @@ dist/
134137
downloads/
135138
eggs/
136139
.eggs/
137-
lib/
138140
lib64/
139141
parts/
140142
sdist/
@@ -260,8 +262,6 @@ langbuilder.db
260262
.docusaurus/
261263

262264
/tmp/*
263-
src/backend/langbuilder/frontend/
264-
src/backend/base/langbuilder/frontend/
265265
.docker
266266
scratchpad*
267267
chroma*/*
@@ -279,4 +279,11 @@ src/frontend/temp
279279
*.db
280280
*.mcp.json
281281

282-
member_servers.json
282+
member_servers.json
283+
284+
.claude
285+
.vscode
286+
langbuilder/.claude
287+
openwebui/.vscode
288+
langbuilder/.alucify
289+
langbuilder/.cursor

0 commit comments

Comments
 (0)