Skip to content

Commit

Permalink
Allow AML in free plan
Browse files Browse the repository at this point in the history
  • Loading branch information
loicknuchel committed Oct 11, 2024
1 parent 37f3c76 commit 16e9903
Show file tree
Hide file tree
Showing 14 changed files with 1,204 additions and 34 deletions.
59 changes: 45 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,34 +20,57 @@
<a href="https://azimutt.app/slack" target="_blank"><img src="assets/slack-join.svg" alt="Join us on Slack" style="width: 216px; height: 54px;" width="216" height="54"></a>
</p>

Azimutt is a full-stack database exploration tool, from modern ERD made for real world databases (big & messy), to fast data navigation, but also documentation everywhere and whole database analysis.
Azimutt is a **full-stack database exploration tool**.
From modern ERD made for real world databases (big & messy), to fast data navigation, but also documentation everywhere and whole database analysis.

[![Azimutt screenshot](assets/azimutt-screenshot.png)](https://azimutt.app/45f571a6-d9b8-4752-8a13-93ac0d2b7984/c00d0c45-8db2-46b7-9b51-eba661640c3c?token=59166798-32de-4f46-a1b4-0f7327a91336)

**Why building Azimutt?**

Databases existed for more than 40 years and despite a lot of tool around them, we couldn't find any providing a great exploration experience.

- **Database clients** focus on querying experience, with auto-completion and table/column lists but no visual help
- **ERDs** have a great diagram UI but fall short when schema is growing (real-world use cases)
- **Data catalogs** are focused on data governance and lineage for data teams, miss relational db for developers
- **ERDs** have a great diagram UI, but fall short when schema is growing (real-world use cases)
- **Data catalogs** are focused on data governance and lineage, missing relational db knowledge
- **Database clients** focus on querying with auto-completion and table/column lists, but no visual help

So we decided to built it 💪
So we decided to build the missing tool 💪

Azimutt started as a schema exploration tool for databases with hundreds of tables, but now it has grown a lot:
We started with schema exploration for databases with hundreds of tables, but now, it has grown a lot:

- Design your schema using [AML](https://azimutt.app/aml) for a fast diagramming
- Explore your database schema using search everywhere, display only useful tables/columns and follow relations
- Query your data like never before, follow foreign keys and display entities in diagram
- Document using table/column notes and tags and layouts and memos for use cases, features or team scopes
- Analyze it to discover inconsistencies and best practices to apply
- **Design** your schema using [AML](https://azimutt.app/aml) for a fast diagramming
- **Explore** your schema using search everywhere, display only useful tables/columns and follow relations
- **Query** your data like never before, follow foreign keys and display entities in diagram
- **Document** using table/column notes and tags, layouts and memos for use cases, features or team scopes
- **Analyze** it to discover inconsistencies and best practices to apply

Azimutt goal is to be your ultimate tool to understand your database.
Azimutt goal is to be your **ultimate tool to understand your database**.

## Self hosted

## Azimutt badge

You can load any public SQL file in Azimutt with just an url parameter.
So if you have a SQL file in your repo, like [structure.sql](./backend/priv/repo/structure.sql), you can add a button allowing your visitors to quickly explore it:

```markdown
[![explore database with Azimutt](https://img.shields.io/badge/PostgreSQL-browse_online-gray?labelColor=4169E1&logo=postgresql&logoColor=fff&style=flat)](https://azimutt.app/create?sql=https://raw.githubusercontent.com/azimuttapp/azimutt/refs/heads/main/backend/priv/repo/structure.sql)
```

Here are some examples:

[![explore database with Azimutt](https://img.shields.io/badge/PostgreSQL-browse_online-gray?labelColor=4169E1&logo=postgresql&logoColor=fff&style=flat)](https://azimutt.app/create?sql=https://raw.githubusercontent.com/azimuttapp/azimutt/refs/heads/main/backend/priv/repo/structure.sql)
[![explore database with Azimutt](https://img.shields.io/badge/MySQL-browse_online-gray?labelColor=4479A1&logo=mysql&logoColor=fff&style=flat)](https://azimutt.app/create?sql=https://raw.githubusercontent.com/azimuttapp/azimutt/refs/heads/main/backend/priv/repo/structure.sql)
[![explore database with Azimutt](https://img.shields.io/badge/MariaDB-browse_online-gray?labelColor=003545&logo=mariadb&logoColor=fff&style=flat)](https://azimutt.app/create?sql=https://raw.githubusercontent.com/azimuttapp/azimutt/refs/heads/main/backend/priv/repo/structure.sql)

Or use our custom button image:

[![explore database with Azimutt](https://raw.githubusercontent.com/azimuttapp/azimutt/refs/heads/main/assets/azimutt-button.png)](https://azimutt.app/create?sql=https://raw.githubusercontent.com/azimuttapp/azimutt/refs/heads/main/backend/priv/repo/structure.sql)


## Self-hosted

You can use our [Docker image](https://github.com/azimuttapp/azimutt/pkgs/container/azimutt) to easily deploy it. Here is the [full guide](INSTALL.md).


## Deploy on Heroku

You can use our Heroku template which includes Azimutt web app, a Postgres database, Stackhero S3 storage and Mailgun.
Expand All @@ -70,16 +93,18 @@ heroku config:set S3_KEY_ID=$(heroku config:get S3_ROOT_ACCESS_KEY)
heroku config:set S3_KEY_SECRET=$(heroku config:get S3_ROOT_SECRET_KEY)
```

Finally you will need to create the `azimutt` bucket on Stackhero:
Finally, you will need to create the `azimutt` bucket on Stackhero:

- connect to Stackhero from your Heroku dashboard
- use values of `S3_ROOT_ACCESS_KEY` and `S3_ROOT_SECRET_KEY` to log in
- create a bucket named `azimutt`


## Deploy on Kubernetes

Please read this [guide](./charts/azimutt/README.md)


## Local development

Azimutt is built with [Elixir](https://elixir-lang.org)/[Phoenix](https://www.phoenixframework.org) (backend & admin) and [Elm](https://elm-lang.org)/[elm-spa](https://www.elm-spa.dev) (editor).
Expand All @@ -101,6 +126,7 @@ Other things:
- API documentation is accessible at [`/api/v1/swagger`](http://localhost:4000/api/v1/swagger)
- You can use `pnpm --filter "azimutt-editor" run book` to start Elm design system & components, and access it with [localhost:4002](http://localhost:4002)


### command semantics

We have a lot of projects with a lot of commands, here is how they are structured:
Expand All @@ -116,10 +142,12 @@ We have a lot of projects with a lot of commands, here is how they are structure
- `build:docker` same as `build` but in the docker image (paths are different 😕)
- `update` bumps library versions


### Development commands

- `pnpm --filter "azimutt-editor" run book` to launch the Elm design system


### Setup Stripe

#### Config
Expand All @@ -129,6 +157,7 @@ We have a lot of projects with a lot of commands, here is how they are structure
- Copy your webhook signing secret to `STRIPE_WEBHOOK_SIGNING_SECRET` variable in your `.env` file (looks like `whsec_...`)
- Go to [your Stripe dashboard](https://dashboard.stripe.com/test/apikeys) to obtain your API Key and copy it into `STRIPE_API_KEY` in your `.env` file (looks like: `sk_test_...`)


#### Payments

When testing interactively, use a card number, such as `4242 4242 4242 4242`. Enter the card number in the Dashboard or in any payment form.
Expand All @@ -138,13 +167,15 @@ Use any value you like for other form fields.

See more in the [stripe testing documentation](https://stripe.com/docs/testing)


## Stack

- [Production](https://azimutt.app) & [Staging](https://azimutt.dev)
- [Error logs](https://sentry.io/organizations/azimuttapp/issues/?project=6635088) with [Sentry](https://sentry.io)
- Design using [TailwindCSS Framework](https://tailwindcss.com)
- [Credo](http://credo-ci.org) for static code analysis (automatically run with pre-commit)


## License

The tool is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
Binary file added assets/azimutt-button.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions backend/config/config.exs
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ config :azimutt,
azimutt_github_issues_new: "https://github.com/azimuttapp/azimutt/issues/new",
environment: config_env(),
# TODO: find an automated process to build it
version: "2.1.9",
version_date: "2024-10-06T00:00:00.000Z",
version: "2.1.10",
version_date: "2024-10-11T00:00:00.000Z",
commit_hash: System.cmd("git", ["log", "-1", "--pretty=format:%h"]) |> elem(0) |> String.trim(),
commit_message: System.cmd("git", ["log", "-1", "--pretty=format:%s"]) |> elem(0) |> String.trim(),
commit_date: System.cmd("git", ["log", "-1", "--pretty=format:%aI"]) |> elem(0) |> String.trim(),
Expand Down
7 changes: 4 additions & 3 deletions backend/lib/azimutt.ex
Original file line number Diff line number Diff line change
Expand Up @@ -103,13 +103,14 @@ defmodule Azimutt do
def active_plans, do: [plans().free, plans().solo, plans().team, plans().enterprise]

def features do
# MUST stay in sync with frontend/src/Models/Feature.elm
%{
# Database features
schema_exploration: %{name: "Schema exploration", free: true, solo: true, team: true, enterprise: true, pro: true},
data_exploration: %{name: "Data exploration", free: true, solo: true, team: true, enterprise: true, pro: true},
colors: %{name: "Custom colors", free: false, solo: true, team: true, enterprise: true, pro: true},
# TODO: rename `aml` to `db_design`
aml: %{name: "Database design (AML)", free: false, solo: true, team: true, enterprise: true, pro: true},
aml: %{name: "Database design", free: 10, solo: nil, team: nil, enterprise: nil, pro: nil, description: "Allowed tables in AML"},
colors: %{name: "Custom colors", free: false, solo: true, team: true, enterprise: true, pro: true},
# saved_queries: %{name: "Saved queries", free: false, solo: false, team: false, enterprise: true, pro: true, description: "Soon... Save and share useful queries."},
# dashboard: %{name: "Dashboard", free: false, solo: false, team: false, enterprise: true, pro: true, description: "Soon... Visually see query results."},
# db_stat_history: %{name: "Stats history", free: false, solo: false, team: false, enterprise: true, pro: true, description: "Soon... Keep evolutions of database stats."},
Expand Down Expand Up @@ -150,7 +151,7 @@ defmodule Azimutt do
def streak do
[
%{goal: 4, feature: :colors, limit: true},
%{goal: 6, feature: :aml, limit: true},
%{goal: 6, feature: :aml, limit: nil},
%{goal: 10, feature: :ai, limit: true},
%{goal: 15, feature: :project_layouts, limit: nil},
%{goal: 25, feature: :schema_export, limit: true},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<%= render "_streak_step.html", step: 5, value: @value, color: "yellow", color_next: "red" %>
<%= cond do %>
<% @value <= 6 -> %>
<%= render "_streak_step.html", step: 6, value: @value, color: "red", reward: %{icon: "📝", label: "Day 6: unlock DB design with AML"} %>
<%= render "_streak_step.html", step: 6, value: @value, color: "red", reward: %{icon: "📝", label: "Day 6: unlock unlimited DB design with AML"} %>
<% @value <= 10 -> %>
<%= render "_streak_step.html", step: 10, value: @value, color: "red", reward: %{icon: "🪄", label: "Day 10: unlock AI features"} %>
<% @value <= 15 -> %>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@
<% feature_categories = [%{name: "Database features", features: [
Azimutt.features().schema_exploration,
Azimutt.features().data_exploration,
Azimutt.features().colors,
Azimutt.features().aml,
Azimutt.features().colors,
Azimutt.features().schema_export,
Azimutt.features().ai,
Azimutt.features().analysis,
Expand Down
4 changes: 4 additions & 0 deletions backend/mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,10 @@ defmodule Azimutt.MixProject do
setup: ["deps.get", "ecto.setup"],
"ecto.setup": ["ecto.create", "ecto.migrate", "run priv/repo/seeds.exs"],
"ecto.reset": ["ecto.drop", "ecto.setup"],
# generate structure.sql on migration
"db.migrate": ["ecto.migrate", "ecto.dump"],
# generate structure.sql on rollback
"db.rollback": ["ecto.rollback", "ecto.dump"],
seeds: "run priv/repo/seeds.exs",
test: ["ecto.create --quiet", "ecto.migrate --quiet", "test"],
"assets.deploy": [
Expand Down
Loading

0 comments on commit 16e9903

Please sign in to comment.