Lotus 1.1 and Lotus Web 1.2 are out

Business intelligence that lives inside your Phoenix app.

A SQL editor, dashboards, charts and an AI assistant, mounted in your router and run against the databases you already have. Open source, read-only by default, no second service to deploy.

The parts you use every day

An editor that knows your schema

Autocomplete from the tables you may see, a schema browser beside the editor, and variables with widgets so one saved query serves many questions.

  • Variables in {{variable}} syntax, with date pickers, dropdowns and optional clauses
  • Right-click a cell to filter or sort; hover a column for its statistics
  • Streaming CSV export for results that do not fit in memory

From a result to a dashboard in minutes

Sixteen chart types, a drag-and-drop grid, filters that live in the URL, auto-refresh, and public links for people who never sign in.

  • Bar, line, area, scatter, heatmap, funnel, KPI cards, gauges and more
  • Filters with cascading options and relative date defaults
  • Light and dark themes that follow the host app

An assistant that writes SQL from your schema

Ask a question in plain language and get a query you can run, explain, fix or optimise. Bring your own key; the model sees only the tables you allow.

  • OpenAI, Anthropic, Google, Groq, Mistral and any provider ReqLLM supports
  • Multi-turn: refine the query until it answers the question
  • Same visibility rules as the editor, same actor on every call

Runs against the databases you have

  • PostgreSQL
  • MySQL
  • SQLite
  • ClickHouse
  • Elasticsearch
  • OpenSearch
  • your adapter

Safe against a production database

Read-only by default
Lotus refuses write statements before they run, then runs each query in a read-only transaction: transaction_read_only on PostgreSQL, a read-only session on MySQL, query_only on SQLite and readonly = 1 on ClickHouse. On MySQL and SQLite it puts the connection's previous settings back afterwards. read_only: false turns this off.
Statement timeout
A query stops after 5 seconds on PostgreSQL and MySQL, unless you let people choose a longer limit in Lotus Web.
Visibility rules
You choose which schemas, tables and columns are visible, and a column can be hidden or masked. The editor, the schema browser and the AI follow the same rules.
Separate storage
Lotus keeps its own tables in the storage repo you name and never migrates your data sources. For a guarantee at the connection level, point it at a read-only replica.

Three steps to a dashboard

  1. Add the packages

    # mix.exs
    {:lotus, "~> 1.1"},
    {:lotus_web, "~> 1.2"}

    Then mix deps.get. Lotus Web needs Elixir 1.18 or later, Phoenix 1.7 or later and LiveView 1.0 or 1.1.

  2. Configure and migrate

    # config/config.exs
    config :lotus,
      storage_repo: MyApp.Repo,
      data_sources: %{
        "main" => MyApp.Repo
      }

    Then add a migration that calls Lotus.Migrations.up() and run mix ecto.migrate.

  3. Mount the dashboard

    # router.ex
    import Lotus.Web.Router
    
    scope "/" do
      pipe_through [
        :browser,
        :require_authenticated_user
      ]
    
      lotus_dashboard "/lotus",
        resolver: MyAppWeb.LotusResolver
    end

    The resolver says who is signed in and what they may do. Without one, everyone who reaches the route gets full access.

Read the getting started guide

What's new

Per-action permissions
Your resolver's authorize/3 answers one question per action: may this person run a query, export, save, share a dashboard or use the AI. Lotus Web hides the controls they may not use and refuses the action if they try anyway.
Middleware at every step
Middleware can refuse a query once Lotus knows which tables it touches, shape the result, and refuse or record a change to a query or a dashboard. It runs on cached results too, and every call carries the actor: who is asking and what they may see.
Cascading filters
A dashboard select can take its options from a saved query and depend on another filter, so a city list shows only the chosen country's cities.
Relative dates
A filter defaults to "the last 30 days" or "this quarter" and resolves it each time the dashboard runs, so a shared dashboard never goes stale.

Read the latest changelogs for Lotus and Lotus Web.

Lotus Pro, for teams that answer to an auditor

Everything above stays free and MIT licensed. Lotus Pro adds the governance a company needs before it gives analysts, support staff and customers a SQL editor.

Pro is not released. It is in testing on the demo site, and no release date is set.

Tell us on Discord if your team needs Pro

  • Access policies Roles and groups mapped to data sources, schemas, tables and columns. No policy means no access.
  • Masking per role Presets for emails, phone numbers, card numbers, national IDs and names, including tokens that still group and join. Applied to results, exports and what the AI reads.
  • Query limits Queries per time window and concurrent queries per person, so one user cannot drain a pool.
  • Policy-based permissions Who may run, save, share, export or use the AI, read from stored policies instead of written by hand in your resolver.
  • Dynamic sources Connect a database at run time from a connection string, with its own visibility rules.
  • Bring your own engine Already run OPA or a policy service? Connect it through one behaviour.

Questions people ask first

Not answered here? Ask on Discord.

How is this different from Metabase or Redash?

Lotus is a library, not a service. It runs inside your Phoenix application, uses the repos you already configure, and ships as two Hex packages. There is no Java runtime, no separate deployment, and no second database to keep in sync with your users.

Is it safe against a production database?

Yes, by default. Lotus refuses write statements, runs each query in a read-only transaction, and never migrates your data sources. See how each database enforces read-only. For a guarantee at the connection level, point Lotus at a read-only replica.

Which databases work?

PostgreSQL, MySQL and SQLite out of the box, ClickHouse, Elasticsearch and OpenSearch through adapter packages, and anything else through the adapter behaviour. Data sources are Ecto repos, or a config map for ClickHouse, Elasticsearch and OpenSearch. Connecting a database at run time from a connection string is part of Lotus Pro.

Which AI providers work?

Any provider ReqLLM supports, with your own key: OpenAI, Anthropic, Google, Groq, Mistral and more. The assistant reads table and column names and types. To write a filter it can look up to 100 distinct values in a column, and it sees database error messages and, when it optimises a query, the query plan. It only reaches the tables the current user may see, and column masking applies to what it reads.

Can people who do not sign in see a dashboard?

Yes. A dashboard can be shared by public link, with its filters in the URL so a filtered view is a link too. Auto-refresh keeps a shared screen current.

What does it cost?

Lotus and Lotus Web are MIT licensed and free. Lotus Pro, a paid package for governance features, is not released yet. It will be priced per application with no per-viewer fees, and the price is announced with its first release.