Skip to content

Feat/integrate portal (WIP) #1507

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 23 commits into
base: development
Choose a base branch
from
Open
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
80f6d97
feat: integrate portal directly into main repository to simplify deve…
thomageanderson Jan 25, 2025
ac0c710
docs: improve installation guides and fix portal structure
thomageanderson Jan 25, 2025
27e6eea
docs: clarify portal database initialization and seeding steps in ins…
thomageanderson Jan 26, 2025
afae8a6
docs: standardize installation guides and add architecture overview
thomageanderson Jan 26, 2025
eae1395
docs: add critical URL configurations to env.example
thomageanderson Jan 26, 2025
46cde6d
Remove submodule references and commands
thomageanderson Jan 26, 2025
c804317
docs: simplify README.md to defer to OS-specific installation guides
thomageanderson Jan 29, 2025
8608cc2
docs: add Clerk authentication setup to installation guides
thomageanderson Jan 29, 2025
2460dc6
docs: update installation guides to specify Python 3.11 and remove re…
thomageanderson Jan 29, 2025
b3f8f59
docs: remove pipx installation as it's no longer needed
thomageanderson Jan 29, 2025
2657bbe
docs: reorder installation steps to ensure proper service startup seq…
thomageanderson Jan 29, 2025
1817fcc
docs: add M1/M2 Mac platform compatibility note for Docker containers
thomageanderson Jan 29, 2025
6bec9fe
Add cross platform compatibility regex to handling of behave-graph pa…
thomageanderson Feb 8, 2025
ea4d111
docs: add nvm-windows installation instructions to Windows guide
thomageanderson Feb 8, 2025
2be0fc9
docs: add NX workspace reset troubleshooting for Windows
thomageanderson Feb 8, 2025
8ff9267
docs: add node-gyp Visual C++ requirements for Windows
thomageanderson Feb 8, 2025
5c52c7c
Preserve incoming spell ids on create, temp fix for complex spell imp…
thomageanderson Feb 13, 2025
05aa5fc
Improve complex self-referential uuid updates during import agent
thomageanderson Feb 28, 2025
99acdba
Update common-setup script with cross-env prefix
thomageanderson Mar 17, 2025
835fc24
Update docs to correct required services scripts
thomageanderson Mar 17, 2025
7e67584
Update env.example with better defauls, consolidate access to environ…
thomageanderson Mar 17, 2025
4138d39
Feature flag user service attempt in coreLLMSerivce
thomageanderson Mar 17, 2025
8d75e70
Disable user service in .env and .env.example
thomageanderson Mar 18, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
2 changes: 1 addition & 1 deletion .env
Original file line number Diff line number Diff line change
@@ -98,5 +98,5 @@ EMBEDDER_AUTH_ROUTE_MATCHER=/api
NEXT_PUBLIC_EMBEDDER_SERVER_URL=http://localhost:4010/api

ENABLE_SERAPH=false
ENABLE_USER_SERVICE=true
ENABLE_USER_SERVICE=false
AGENT_EMBEDDER_API_KEY=
265 changes: 134 additions & 131 deletions .env.example
Original file line number Diff line number Diff line change
@@ -7,115 +7,162 @@

# REQUIRED VARIABLES

# The node environment to run the server in. Should be "production" or "development"
# The node environment to run the server in. Should be "production" or "development"
NODE_ENV

# Standalone mode is the ide running locally.
# Standalone mode is the IDE running locally
STANDALONE
VITE_APP_STANDALONE

# Production mode flag
PRODUCTION

## Main database URL
# Main database URL
DATABASE_URL

# The shadow database URL used for prisma migrations
SHADOW_DATABASE_URL

# API key for pinecone used by the memory service
PINECONE_API_KEY
# Keywords API configuration
KEYWORDS_API_KEY
KEYWORDS_API_URL

# telemetry key for the platform
HYPERDX_API_KEY
# The main JWT secret used by the server to authenticate requests. Shared with the portal API.
JWT_SECRET=magick_nextauth_secret_key_123

# Generic hard coded API access key for server to server communication
API_ACCESS_KEY

# Used to encrypt the credentials in the database
CREDENTIALS_ENCRYPTION_KEY

# URL of the portal
PORTAL_URL

# Url of the IDE server itself
# URL of the IDE server itself
API_URL
API_ROOT_URL

# The main JWT secret used by the server to authenticate requests. Shared with the portal API.
JWT_SECRET
# Trusted parent URL
TRUSTED_PARENT_URL

# Generic hard coded API access key for server to server communication
API_ACCESS_KEY
# The URL for the main redis server
REDIS_URL
REDIS_PRIVATE_URL

# Used to encrypt the credentials in the database.
CREDENTIALS_ENCRYPTION_KEY
# Used by the cloud to validate any API requests coming from the agent server
PORTAL_AGENT_KEY

# Posthos API key for doing posthog stuff in the app
POSTHOG_API_KEY
# Portal bot URL for notifications
PORTAL_BOT_URL

# The URL for teh main redis server. Often set as an environment by hosting services.
REDIS_URL
# User service configuration
ENABLE_USER_SERVICE=false

# Used by the cloud to validate any API requests coming from the agent server. Needs to be the same in the portal
PORTAL_AGENT_KEY
# Seraph configuration
ENABLE_SERAPH
NITRO_JWT_SECRET

# AWS CONFIGURATION KEYS
AWS_ACCESS_KEY
AWS_SECRET_KEY
AWS_REGION
AWS_BUCKET_NAME
AWS_BUCKET_ENDPOINT
# ML SERVICE API KEYS
OPENAI_API_KEY
DEFAULT_OPENAI_KEY
ANTHROPIC_API_KEY
GROQ_API_KEY
TOGETHERAI_API_KEY
GEMINI_API_KEY
DEFAULT_GOOGLEAI_API_KEY
UNSTRUCTURED_KEY

# MEMORY/VECTOR DATABASES
PINECONE_API_KEY
PINECONE_INDEX_NAME

# VOICE SERVICES
AAI_KEY
ELEVENLABS_API_KEY

# TELEMETRY CONFIGURATION
POSTHOG_API_KEY
POSTHOG_ENABLED
VITE_APP_POSTHOG_ENABLED
VITE_APP_POSTHOG_API_KEY
PINO_LOG_LEVEL
BUDGET_LOGGING
LITELLM_LOCAL_MODEL_COST_MAP

# Open meter configuration
# OPENMETER CONFIGURATION
OPENMETER_ENABLED
OPENMETER_ENDPOINT
OPENMETER_TOKEN
OPENMETER_SOURCE

# EXTERNAL ML SERVICES
MAGICK_OPENAI_API_KEY
MAGICK_GEMINI_API_KEY
MAGICK_PALM_API_KEY
MAGICK_TOGETHERAI_API_KEY
VERTEXAI_PROJECT
VERTEXAI_LOCATION
# FEATURE FLAGS
VITE_APP_COMPOSER_V2
COMPOSER_V2
NEXT_PUBLIC_BETA_FEATURES_FUNCTIONS

# GOOGLE CLOUD CONFIGURATION
GOOGLE_CLOUD_PROJECT_ID
GOOGLE_CLOUD_CLIENT_EMAIL
GOOGLE_CLOUD_PRIVATE_KEY
GOOGLE_PRIVATE_BUCKET_NAME
GOOGLE_PUBLIC_BUCKET_NAME
PROJECT_BUCKET_PREFIX

# AWS CONFIGURATION KEYS
AWS_ACCESS_KEY
AWS_SECRET_KEY
AWS_REGION
AWS_BUCKET_NAME
AWS_BUCKET_ENDPOINT
NEXT_PUBLIC_BUCKET_PREFIX

# OPTIONAL VARIABLES

# Prevents the server form crashing on unhandled exceptions.
# Defaults to true
# Prevents the server from crashing on unhandled exceptions
DONT_CRASH_ON_ERROR

# The port the server should listen on.
# Default: 3030
# The port the server should listen on
PORT
SERVER_PORT

# The host of the server
# Default: localhost
HOST
SERVER_HOST

# Algorithm used for credential encryptian
# Algorithm used for credential encryption
CREDENTIALS_ALGORITHM

# How many items are returned from a paginated endpoint
# default: 10
# Pagination configuration
PAGINATE_DEFAULT

# The maximum number of items that can be returned from a paginated endpoint
# default: 100
PAGINATE_MAX

# The log level for pino. Can be "trace", "debug", "info"
# Defaults to "info"
PINO_LOG_LEVEL

# The interval in milliseconds that the agent manager should send a heartbeat to check for agents
# default: 3000
# Agent configuration
HEARTBEAT_MSEC

# How long the agent manager should wait before checking for agents after starting
# default: 5000
MANAGER_WARM_UP_MSEC
AGENT_HEARTBEAT_INTERVAL_MSEC
AGENT_RESPONSE_TIMEOUT_MSEC

# Slack developer mode is used to developer slack apps locally
# Defaults to false
# Plugin configuration
SLACK_DEVELOPER_MODE

# The directory plugins live in.
# Defaults to ./plugins
PLUGINS_DIRECTORY

DISCORD_DEVELOPER_MODE
PLUGIN_DIRECTORY

# Embedder configuration
EMBEDDER_DB_URL
EMBEDDER_REDIS_URL
EMBEDDER_REDIS_HOST
EMBEDDER_REDIS_PORT
EMBEDDER_PINECONE_PROJECT
EMBEDDER_PINECONE_CLOUD
EMBEDDER_PINECONE_REGION
EMBEDDER_JWT_SECRET
EMBEDDER_JWT_EXPIRES_IN
EMBEDDER_AUTH_ROUTE_MATCHER
AGENT_EMBEDDER_API_KEY

# Frigade configuration
FRIGADE_PRIVATE_KEY

# ██╗██████╗ ███████╗ ██████╗██╗ ██╗███████╗███╗ ██╗████████╗
# ██║██╔══██╗██╔════╝ ██╔════╝██║ ██║██╔════╝████╗ ██║╚══██╔══╝
@@ -125,46 +172,16 @@ PLUGINS_DIRECTORY
# ╚═╝╚═════╝ ╚══════╝ ╚═════╝╚══════╝╚═╝╚══════╝╚═╝ ╚═══╝ ╚═╝

# The URL of the app portal
VITE_APP_PORTAL_URL

# The root url of the IDE server
SERVER_ROOT_URL
NEXT_PUBLIC_APP_URL=http://localhost:3000

# The root url of the API server
# defaults to localhost:SERVER_PORT (3030)
VITE_APP_API_ROOT_URL

# Enabled posthog. Defaults to false.
VITE_APP_POSTHOG_ENABLED

# The posthog API key for the app
VITE_APP_POSTHOG_API_KEY

# The frigade API key
VITE_APP_FRIGADE_KEY


# IDE CLIENT VARIABLES - optional

# The port the server is running on
# Default: 3030
# IDE CLIENT VARIABLES
VITE_APP_SERVER_PORT

# The node environment to run the server in. Should be "production" or "development".
# Defaults to development
VITE_APP_NODE_ENV

# used for running the IDE locally
VITE_APP_STANDALONE

# Used by the client to set up a single project space.
# Needs to also be on the server, and have a JWT key encoded with it.
VITE_APP_DEFAULT_PROJECT_ID

# Used by the client to set up a single user space.
VITE_APP_DEFAULT_USER_ID

# A default jwt token used to authenticate the default user with the default project id.
VITE_APP_DEFAULT_USER_TOKEN

# ██████╗ ██████╗ ██████╗ ████████╗ █████╗ ██╗
@@ -174,63 +191,49 @@ VITE_APP_DEFAULT_USER_TOKEN
# ██║ ╚██████╔╝██║ ██║ ██║ ██║ ██║███████╗
# ╚═╝ ╚═════╝ ╚═╝ ╚═╝ ╚═╝ ╚═╝ ╚═╝╚══════╝

# Database stuff
PORTAL_DATABASE_URL
PORTAL_SHADOW_DATABASE_URL
# Note: The following are client/portal specific variables and may not
# be directly used in the server config.ts, but are kept for reference.

# The URL of the app portal
NEXT_PUBLIC_APP_URL

# URL of the IDE API
NEXT_PUBLIC_API_URL

# The root url of the IDE server
IDE_SERVER_UR
# Database configuration
PORTAL_DATABASE_URL

APP_URL
# URLs for portal
NEXT_PUBLIC_API_URL=http://localhost:3030
IDE_SERVER_URL=http://localhost:3030
APP_URL=http://localhost:3000
API_URL=http://localhost:3030
SERVER_ROOT_URL

# Stripe stuff
# Stripe configuration
NEXT_PUBLIC_STRIPE_PUB_KEY
STRIPE_SIGNING_SECRET
STRIPE_WEBHOOK_SECRET
STRIPE_DATABASE_URL

# POSTHOG
NEXT_PUBLIC_POSTHOG_KEY
NEXT_PUBLIC_POSTHOG_HOST

# AWS CONFIGURATION KEYS
NEXT_AWS_ACCESS_KEY
NEXT_AWS_SECRET_KEY
NEXT_AWS_REGION
NEXT_AWS_BUCKET_NAME
NEXT_AWS_BUCKET_ENDPOINT
NEXT_PUBLIC_BUCKET_PREFIX

# Next auth secret (shared with IDE)
NEXTAUTH_SECRET
NEXTAUTH_SECRET=magick_nextauth_secret_key_123

# Needed to talk directly to the IDE server
# API key for the agent
AGENT_API_KEY

# Clerk configuration
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY
# The clerk secret key.
CLERK_SECRET_KEY
CLERK_WEBHOOK_SECRET
CLERK_WEBHOOK_LOGGING
CLERK_MIDDLEWARE_LOGGING

# The URL for sign in
NEXT_PUBLIC_CLERK_SIGN_IN_URL

# The URL for sign up
NEXT_PUBLIC_CLERK_SIGN_UP_URL

# The URL to redirect to after sign up
NEXT_PUBLIC_CLERK_AFTER_SIGN_UP_URL
NEXT_PUBLIC_CLERK_AFTER_SIGN_IN_URL

# The URL to redirect to after sign in
NEXT_PUBLIC_CLERK_SIGN_IN_URL
# Posthog configuration - portal specific
NEXT_PUBLIC_POSTHOG_ENABLED=false
NEXT_PUBLIC_POSTHOG_KEY=dummy_key
NEXT_PUBLIC_POSTHOG_HOST=https://app.posthog.com

# Embedder client URL - portal specific
NEXT_PUBLIC_EMBEDDER_SERVER_URL

#Webhook secret for clerk
CLERK_WEBHOOK_SECRET
# Frigade key - portal specific
VITE_APP_FRIGADE_KEY
3 changes: 0 additions & 3 deletions .gitmodules

This file was deleted.

Loading