Business Configuration Reference

Customize the behavior of iCanText through the config.json file.

In Business Mode, iCanText fetches a config.json file from the root directory during initialization. This file allows you to override the default system values to match your organization's infrastructure and security policies.

Selective Overrides: It is not necessary to include every parameter in your config.json file. The application uses a "delta" logic: any key explicitly defined in your JSON file will override the internal default, while all other parameters will retain their standard values as documented below.
Lifecycle & Consistency: This file is only processed during the initialization phase. Changes made to the server-side JSON will not affect currently connected users until they reload the application. For optimal stability, ensure all users share the same core parameters; disparate settings between nodes (such as differing TTLs or security windows) can lead to routing conflicts and message synchronization issues.

1. Infrastructure & Paths

API_BASE_URL

Type: String (URL) | Default: "https://p.sayseeshow.io"

The root URL of your private signaling server (endpoint). Change this to point to your own PHP rendezvous point to ensure total data sovereignty.

API_CANAUX_PATH

Type: String | Default: "/canaux"

The specific sub-path on the signaling server where channel data is exchanged. This is appended to the API_BASE_URL.

WHOAMI_ENDPOINT

Type: String | Default: "whoami"

The endpoint used by the application to identify the user session within a corporate portal or reverse-proxy environment.

LICENSE_FILENAME

Type: String | Default: "license.txt"

The name of the file containing the signed cryptographic license. This file is required for the application to operate in Business Mode.

REMOTE_USER_HEADER

Type: String | Default: "x-remote-user"

The HTTP header name used by your reverse proxy (Apache, Nginx) to transmit the authenticated username (LDAP/AD login) to the application.

BASE_POLLING_INTERVAL

Type: Integer (ms) | Default: 1000

The base frequency for polling the signaling server during the connection phase. Reducing this increases responsiveness but results in higher CPU and bandwidth load on the signaling endpoint.

ICE_SERVERS

Type: Array of Objects | Default: Google STUN servers

List of STUN and TURN servers used to bypass corporate firewalls. Essential for P2P connectivity in strict NAT environments.

"ICE_SERVERS": [
  { "urls": "stun:stun.l.google.com:19302" },
  {
    "urls": "turn:your-turn-server.com:3478",
    "username": "business_user",
    "credential": "secure_password"
  }
]

2. Network & P2P Tuning

DEFAULT_TTL

Type: Integer | Default: 20

Time-To-Live for gossip messages. In a very large organization (100k+ nodes), increasing this ensures messages reach isolated network clusters at the cost of slight overhead.

MAX_DIRECT_NEIGHBORS

Type: Integer | Default: 8

Limits the number of simultaneous WebRTC connections per node. Higher values improve network mesh density but increase CPU usage on client devices.

MAX_CONCURRENT_ONBOARDING

Type: Integer | Default: 5

Controls how many new users a Gatekeeper can process simultaneously. Increase this for powerful "Seed Nodes" serving as entry points for the whole company.

JOIN_TIMEOUT

Type: Integer (ms) | Default: 15000

Maximum time allowed to establish the initial network connection. On highly filtered or slow corporate networks (satellites, VPNs), increasing this value prevents premature connection failures.

PAIRING_TIMEOUT

Type: Integer (ms) | Default: 10000

The maximum duration allowed for two nodes to complete a WebRTC handshake. If the connection isn't established within this time, the attempt is aborted to save resources.

SHORTCUT_THRESHOLD

Type: Integer | Default: 5

Number of messages received through intermediaries from a specific peer before the application automatically attempts to open a direct P2P shortcut to that peer.

HYSTERESIS_FACTOR

Type: Float | Default: 0.9

Stabilizes Quality of Service (QoS) routing. A new path must be at least 10% faster than the current one to be adopted. This prevents the network from constantly "flapping" between routes due to minor latency variations.

ROUTING_UPDATE_DELAY

Type: Integer (ms) | Default: 2000

Damping period for routing tables. Multiple incoming route changes are grouped during this window before being broadcast. This significantly reduces network overhead in large, dynamic workspaces.

ELECTION_HYSTERESIS_FACTOR

Type: Float | Default: 1.10

Stability factor for Gatekeeper leadership. A new candidate collective must have a total score 10% higher than the incumbents to trigger a role transition, ensuring leadership continuity.

PUBLICLY_REACHABLE_SCORE_BONUS

Type: Integer | Default: 2000

Priority bonus for Gatekeeper selection. Nodes with a public IP or open NAT receive this boost, as they are technically superior for welcoming new members who may be behind restrictive firewalls.

SUPER_NODE_SCORE_BONUS

Type: Integer | Default: 1000

Stability bonus for core network roles. Nodes running on devices connected to permanent power (detected via the Battery API) receive this bonus, favoring desktops and servers over mobile devices for mesh coordination.

GATEKEEPER_PING_INTERVAL

Type: Integer (ms) | Default: 15000

The frequency of the coordination heartbeat between active Gatekeepers. This ensures the collective remains synchronized and detects failures within the core mesh coordination layer.

GATEKEEPER_PING_TIMEOUT

Type: Integer (ms) | Default: 40000

The grace period after which a Gatekeeper is considered offline if no heartbeats are received. Crossing this threshold triggers a new election to replace the missing node.

GUARDIAN_ELECTION_INTERVAL

Type: Integer (ms) | Default: 120000 (2 min)

The interval for electing "Channel Guardians." Guardians are responsible for maintaining the definitive history and metadata for a specific channel, ensuring data consistency even as users come and go.

UNREACHABLE_PEER_TTL

Type: Integer (ms) | Default: 600000 (10 min)

How long a peer ID remains in the "unreachable" list after a failed connection attempt. This prevents the network from wasting resources repeatedly trying to contact nodes that are likely behind non-compatible firewalls.

ACK_TIMEOUT

Type: Integer (ms) | Default: 15000

Time limit before a private message is considered undelivered. This parameter defines the responsiveness of the visual "✔✔" status indicators in the chat interface.

GATEKEEPER_COUNT

Type: Integer | Default: 10

Target number of active Gatekeepers in the workspace. A higher value increases the resilience of onboarding new members in very large organizations.

GATEKEEPER_ELECTION_TIMEOUT

Type: Integer (ms) | Default: 5000

The maximum time allowed for a node to collect votes and finalize its status during a self-triggered Gatekeeper election. This ensures that coordination roles are filled quickly without hanging the network logic.

METRICS_BROADCAST_INTERVAL

Type: Integer (ms) | Default: 60000

Frequency at which a node broadcasts its routing health and neighbor list to its peers. A shorter interval speeds up network convergence after a node joins or leaves, at the cost of higher background traffic.

GOSSIP_LAZY_INTERVAL

Type: Integer (ms) | Default: 60000

The interval for "Lazy Gossip" operations. Peers exchange summaries of message IDs they possess, allowing nodes that missed data (due to churn) to request the specific missing content.

MESSAGE_CACHE_SIZE

Type: Integer | Default: 1000

The size of the volatile buffer used to store recent messages specifically for gossip repair. A larger cache improves the network's ability to "heal" missed messages for users with unstable connections.

MAX_UNREACHABLE_PEERS_TO_GOSSIP

Type: Integer | Default: 10

Limits how many "down" peer IDs are shared in each health update. This prevents network metadata from growing too large while still informing the mesh about connectivity issues.

MIN_DIRECT_NEIGHBORS

Type: Integer | Default: 4

The safety threshold for connections. A node will refuse to prune redundant links if its neighbor count falls below this number, ensuring a minimum degree of mesh stability for every participant.

OUTBOX_RETRY_INTERVAL

Type: Integer (ms) | Default: 30000

The interval between attempts to resend private messages stored in the local outbox. This handles cases where a recipient was temporarily offline or unreachable.

HISTORY_SYNC_DELAY

Type: Integer (ms) | Default: 6000

The time the application waits after connecting to a workspace before initiating a full history synchronization. This delay prevents network congestion during the initial handshake phase.

3. Transfers & Content

MAX_FILE_SIZE

Type: Integer (Bytes) | Default: 5242880 (5MB)

The maximum size in Bytes for file attachments. Since files are transmitted via DataChannels in memory, keep this under 10MB to avoid browser performance issues.

CHUNK_SIZE

Type: Integer (Bytes) | Default: 16384 (16KB)

The size of binary fragments used for file transmission over WebRTC DataChannels. 16KB is the optimized standard to prevent buffer overflow and ensure compatibility across different browsers.

MAX_REASSEMBLY_SIZE

Type: Integer (Bytes) | Default: 6291456 (6MB)

A security limit that prevents memory exhaustion attacks. The application will refuse to reassemble any incoming file or message that exceeds this total size in RAM.

MAX_PARALLEL_REASSEMBLIES

Type: Integer | Default: 20

Limits the number of simultaneous file transfers or large message reassemblies. This acts as a circuit breaker to prevent memory exhaustion if a node is flooded with large data packets.

CHUNK_REASSEMBLY_TIMEOUT

Type: Integer (ms) | Default: 30000

The maximum time allowed between two fragments (chunks) of the same file. If no new data is received within this window, the partial transfer is discarded to free up RAM.

MESSAGE_HISTORY_LENGTH

Type: Integer | Default: 50

The number of messages kept in active RAM. Increasing this allows for longer scrolling without fetching from history guardians.

HISTORY_PAGE_SIZE

Type: Integer | Default: 50

Determines the number of messages retrieved per request during history synchronization. Balancing this value is key to providing fast initial channel loading without overloading the "History Guardian" nodes.

BANNED_FILE_EXTENSIONS

Type: Array of Strings | Default: ['exe', 'com', 'hta', 'bat', 'vbs', 'vbe', 'jse', 'jar', 'msi']

Security filter to prevent the transmission of executable or dangerous files within the workspace.

PRUNE_INTERVAL

Type: Integer (ms) | Default: 60000

Internal timer for memory management. Every interval, the application clears expired ephemeral messages and stale peer profiles from RAM to ensure long-term stability on low-memory devices.

4. Security & Integration

OAUTH_GOOGLE_CLIENT_ID

Type: String | Default: "a1b2c3....apps.googleusercontent.com" (iCanText Standard)

If provided, enables the "Google Workspace" identity flow. Users can identify themselves using their corporate Google account.

AUTH_GOOGLE

Type: Boolean | Default: true

Enables or disables the Google Identity Provider (IdP) for new users. When active, a Google login button is displayed in the identity selection modal for users who haven't established a local keystore yet. Organizations using Google Workspace can keep this enabled to streamline the enrollment process.

AUTH_LINKEDIN

Type: Boolean | Default: true

Enables or disables the LinkedIn Identity Provider (IdP). When active, users can verify their professional identity and retrieve their pseudonym via LinkedIn. Disable this if your corporate security policy restricts the use of social networks for professional authentication.

REQUIRE_CREATION_TOKEN

Type: Boolean | Default: true

Enforces a cryptographic authorization check during the initial creation of a workspace in Business Mode. When enabled, any user with an empty local identity (newly enrolled) who discovers an uninitialized workspace will be prompted to provide a valid Creation Token. Note: Existing members or administrators with a valid proofWallet in their local storage will automatically "wake up" the workspace without being prompted for a token.

MAX_CHANNELS_PER_USER

Type: Integer | Default: 3

Restricts the number of channels non-admin users can create. This prevents workspace clutter in large organizations.

MAX_MESSAGE_AGE

Type: Integer (ms) | Default: 900000 (15 min)

Anti-replay security window. Cryptographic signatures are only considered valid if the message was emitted within this timeframe. This prevents old intercepted messages from being re-injected into the network.

MAX_PROOF_CHAIN_DEPTH

Type: Integer | Default: 10

Security recursion limit. Defines the maximum number of administrative delegations (certificates) the system will traverse to verify a user's authority back to the Workspace Founder.

PASSWORD_ENTRY_TIMEOUT

Type: Integer (ms) | Default: 30000

The time window given to a user to type the network password into the UI prompt. If the timer expires, the connection attempt is cancelled for security and resource management.

ELECTION_COOLDOWN_PERIOD

Type: Integer (ms) | Default: 300000 (5 min)

Prevents "flapping" in the Gatekeeper collective. Once an election is completed, the network enforces a mandatory waiting period before a new election can be triggered by peers.

DUEL_POLL_DURATION

Type: Integer (ms) | Default: 500

The duration a node listens for concurrent "Founder" attempts on the signaling server. This is a critical anti-collision mechanism that prevents "Split Brain" scenarios where two users create the same workspace simultaneously.

DUEL_TOTAL_TIMEOUT

Type: Integer (ms) | Default: 2000

The absolute time limit for resolving a "Founder Duel." If the conflict isn't settled within this window, the node aborts the creation process to prevent network fragmentation.

CHALLENGE_RESPONSE_TIMEOUT

Type: Integer (ms) | Default: 32000

The maximum duration a Gatekeeper node waits for a cryptographic challenge response from a new arrival. Important: This value is strictly dependent on PASSWORD_ENTRY_TIMEOUT. It must always be set higher (recommended: +2000ms) than the entry timeout to account for network travel time. If this value is too low, the Gatekeeper will drop the connection before the user has finished typing and submitting their password.

TOAST_DURATION

Type: Integer (ms) | Default: 4000

Controls how long system notifications (Toasts) remain visible on the screen before automatically disappearing. Critical security errors are exempt from this timer and remain persistent.

WALLET_SAVE_DELAY

Type: Integer (ms) | Default: 2000

A debounce delay used before writing the cryptographic identity and certificates to persistent storage. This prevents unnecessary disk I/O when receiving large batches of certificates during initial sync.

DATA_CHANNEL_LABEL

Type: String | Default: "ican-text-channel"

Advanced: Rename the WebRTC data flow to masquerade traffic and bypass certain network traffic inspectors.

UI_DEBOUNCE_RENDER

Type: Integer (ms) | Default: 200

Throttles the UI refresh rate when multiple network events occur (e.g., rapid peer connections). Increasing this value significantly reduces CPU usage on older terminals or mobile devices during peak activity.

VIRTUAL_LIST_ITEM_HEIGHT

Type: Integer (px) | Default: 40

The fixed pixel height of individual rows in the peer list. This constant is used by the high-performance virtual rendering engine to support smooth scrolling with up to 100,000 members.

MAX_TEXTAREA_HEIGHT

Type: Integer (px) | Default: 150

Limits the vertical expansion of the message input field. This ensures that long messages don't accidentally obscure the chat history while the user is typing.

RESET_KEYWORD

Type: String | Default: "RESET"

The security keyword the user must type to confirm the permanent deletion of their local identity in case of a forgotten password. Essential for IT support procedures.

Sample config.json

Below is an example of a typical corporate configuration file.

{
  "API_BASE_URL": "https://p2p.acme-corp.internal",
  "REMOTE_USER_HEADER": "Auth-User",
  "AUTH_GOOGLE": true,
  "AUTH_LINKEDIN": false,
  "MAX_FILE_SIZE": 10485760,
  "ICE_SERVERS": [
    { "urls": "turn:turn.acme-corp.internal", "username": "...", "credential": "..." }
  ],
  "MAX_CHANNELS_PER_USER": 5,
  "OAUTH_GOOGLE_CLIENT_ID": "12345-abc.apps.googleusercontent.com"
}