How azimuttapp/azimutt works
Main Components
• Backend Server (Elixir/Phoenix):
– Located in the “backend” directory.
– Implements MVC architecture with controllers, views, models/schemas (accounts, organizations, projects, etc.), business logic, and service integrations (e.g., GitHub, Stripe, Heroku, etc.).
– Includes APIs (see the API controllers and fallback controllers) and an admin interface.
• Frontend Application (Elm + elm-spa):
– Found in the “frontend” directory.
– Organized into Pages, Components (Atoms, Molecules, Organisms), Services, Models, and DataSources.
– Built with Elm, it handles user interaction in the browser.
• Gateway (TypeScript):
– Located in the “gateway” directory.
– Acts as an API layer or aggregator that handles routing and indexing (written in TypeScript, using Node ecosystem).
• CLI Tools and Extensions:
– The “cli” directory holds command-line tools for analysis (including a report generator and other utilities).
– The “extensions” directory includes subprojects for browser, desktop, and VSCode integrations that extend Azimutt’s functionality.
• Libraries & Connectors (Reusable Modules):
• AML (a custom language for schema design)
• Connectors for various databases (BigQuery, Couchbase, MariaDB, MongoDB, MySQL, Oracle, PostgreSQL, Snowflake, SQL Server)
• Parsers (DBML, Prisma, SQL, etc.)
• Utility libraries for common functions, logging, error handling, and JSON processing.
Relationships and Interactions
• The End Users (or database administrators/designers) interact with the Frontend (the Elm SPA) via a web browser.
• The Frontend communicates (through RESTful APIs and ports) with the Backend, either directly or via the Gateway if an API Aggregator pattern is in use.
• The Backend handles requests, performs database operations (using PostgreSQL as seen in the Docker/Postgres config files, and the “structure.sql” seed file), and calls out to external services (e.g., for notifications, analytics, or integration with third-party platforms).
• The Gateway (written in TypeScript) might serve as a lightweight proxy or central point for routing API calls from the frontend to the backend.
• The Libraries provide helper functions and connector logic to support the parsing, analyzing, and converting of database schemas, which are used within the Backend and CLI processes.
• CLI, demos, and Extensions serve both as developer tools and alternative interfaces to interact with Azimutt functionality externally.
Architectural Patterns and Design Principles
• Use of MVC for the backend (Phoenix controllers, views, and models)
• Separation of concerns between user presentation (Elm SPA frontend) and business logic (Elixir backend and TypeScript gateway)
• Modular design: libraries and connectors are separated to allow reuse, testing, and independent deployment of components (for example, different parsers and connectors handle different database types)
• Containerization and cloud deployment: Dockerfiles, Kubernetes charts (in “charts/azimutt”), and Heroku-specific files indicate a modern containerized architecture
• Microservices elements: Although the backend is a Phoenix application, the presence of a dedicated “gateway” directory and several extensions (CLI and desktop) suggests that Azimutt follows a loosely coupled approach in offering alternate access and integrations.