Using the TUI (Text User Interface)

Flux does not have a web-based dashboard. Instead, it offers a fast, keyboard-driven interface accessed entirely through your terminal via SSH.

To access the TUI, connect to your instance:

ssh -p 2222 admin@localhost

Interface Layout

The TUI is designed to be intuitive. Every screen follows a consistent layout:

  1. Header (Breadcrumbs or info): Located at the top, this shows exactly where you are in the application hierarchy (e.g., Home > Forms > Contact Us > Fields). In case of actions to be taken or errors, it displays some info.
  2. Main Content: The center area where you view lists, fill out inputs, or read logs.
  3. Footer (Action Bar): Located at the bottom, this lists the available keyboard shortcuts for the current screen.
    • Example: ↑/↓: Navigate • Enter: Select • /: Filter • Esc: Back

Unlocking the database

If the server has just restarted, you will land on the Locked Screen.

  • Action: Enter your Master Password.
  • Behavior:
    • Flux derives the encryption key in RAM.
    • If successful, you are immediately taken to the Main Dashboard.
    • The HTTP server (port 8080) switches from "Sealed" to "Active" mode.

Dashboard

The first screen that appears after unlocking the database. Here you can select the different screens based on what you need to manage, either Forms, Captcha or SMTP.

Managing Forms

From the Main Dashboard, select Forms to see a list of all your current forms.

Creating a New Form

  1. Press n or select "New Form".
  2. Slug (ID): Enter a URL-safe identifier (e.g., contact-us). This determines the URL: mysite.com/form/contact-us.
  3. Title: The human-readable name displayed on the web page.
  4. Allowed Origins: (Optional) Enter domains like https://mysite.com to prevent other sites from embedding your form.

Adding Fields

Once inside a Form's dashboard, navigate to Fields.

  1. Press n to add a field.
  2. Type: Select from Text, Email, Number, Textarea, Checkbox, etc.
  3. Name: The internal key for the JSON data (e.g., user_email).
  4. Label: What the user sees (e.g., "Your Email Address").
  5. Validations: You can attach rules to the field, such as:
    • Required: Field cannot be empty.
    • Max Length: Limit character count.
    • Regex: Enforce specific patterns.

Adding Notifications

Notifications define what happens after a submission.

  1. Navigate to Notifications inside a Form.
  2. Method: Select SMTP (Email).
  3. Provider: Choose which SMTP server configuration to use (see "Infrastructure" below).
  4. Target: Enter the destination email (e.g., [email protected]).
  5. Config: Set the Subject line (supports templates like New message from {{Name}}).

Managing infrastructure

Infrastructure components are shared configurations. You define them once and reuse them across multiple forms.

Adding an SMTP Server

Navigate to Dashboard > SMTP.

  1. Name: Give it a recognizable ID (e.g., gmail-marketing or aws-ses).
  2. Host & Port: e.g., smtp.gmail.com : 587.
  3. Credentials: Enter the Username and Password.
    • Security Note: The password is encrypted immediately upon saving.
  4. From Address: The default sender (e.g., [email protected]).

Adding a Captcha provider

Navigate to Dashboard > Captcha.

  1. Name: ID for reference (e.g., cloudflare-main).
  2. Type: Choose Turnstile or ReCaptcha.
  3. Keys: Enter your Site Key (Public) and Secret Key.
  4. Usage: Once saved, go back to a Form and select this provider in the "Captcha" setting to enable protection.