Skip to main content

Connections between blocks

Connections are the mechanism that links your blocks together on the canvas. When you draw a link between two blocks, Fransys automatically injects the environment variables needed for communication between services.

How it works​

  1. Drag a database or service block onto the canvas
  2. Draw a link between your application block and the service
  3. Done — Fransys generates and injects all variables automatically

No copy-pasting credentials, no .env file to maintain manually, no risk of inconsistency between services.

Automatically injected variables​

Application → Database (PostgreSQL, MariaDB)​

VariableDescription
DB_HOSTInternal address of the database service
DB_PORTService port
DB_DATABASEDatabase name
DB_USERNAMEConnection username
DB_PASSWORDPassword (automatically generated)

Application → Redis​

VariableDescription
REDIS_HOSTInternal address of the Redis service
REDIS_PORTService port
REDIS_PASSWORDPassword (automatically generated)

Application → Soketi​

When you connect a Soketi block, Fransys injects the variables and lets you rename them to match your framework's convention. Each variable displays its original name and the new name on the application side:

Soketi variables injected with automatic renaming

Original variableRenamed toDescription
SOCKET_HOSTPUSHER_HOSTWebSocket server address
SOKETI_DEFAULT_APP_IDPUSHER_APP_IDApplication identifier
SOKETI_DEFAULT_APP_KEYPUSHER_APP_KEYPublic key
SOKETI_DEFAULT_APP_SECRETPUSHER_APP_SECRETSecret key

This automatic renaming allows your Laravel application to directly use standard Pusher variables without any code adaptation.

Custom variables​

In addition to automatically injected variables, you can add your own environment variables in the Environment variables tab of each block:

Adding custom variables

  • Click + Add a variable to add a variable
  • Define the Name and Value
  • Click Export variables to export all variables in .env format

Passwords are hidden by default (displayed as ••••••••••) for security reasons.

Environment variable expansion​

Fransys supports variable expansion: you can reference a variable inside another using the ${VARIABLE_NAME} syntax.

The most common example: database connection URLs. Rather than duplicating host, port, user, password, and database name values in a long connection string, you define each value once and compose your URL from these variables:

DATABASE_URL = postgres://${DB_USER}:${DB_PASSWORD}@${DB_HOST}:${DB_PORT}/${DB_NAME}

If the password changes, you modify it in one single place. No more copy-paste errors between variables and inconsistencies across environments.

Other expansion examples​

# Full URL of an internal API
API_BASE_URL = https://${API_HOST}:${API_PORT}/api/v1

# Composed Redis URL
REDIS_URL = redis://:${REDIS_PASSWORD}@${REDIS_HOST}:${REDIS_PORT}/0

# Soketi configuration
BROADCAST_URL = ws://${SOKETI_HOST}:6001/app/${PUSHER_APP_KEY}
tip

Variable expansion greatly simplifies managing your configurations. Define each value once, and compose complex variables from these elementary building blocks.

Best practices​

  • Connect your blocks on the canvas rather than manually entering variables — you benefit from automatic injection and synchronization.
  • Use variable expansion for complex connection URLs — a single point of modification in case of change.
  • Export your variables regularly to keep a record of your configuration.