$ show getredash/redash
Redash is a full-stack business intelligence platform that enables users to connect to multiple data sources, write and schedule queries, build interactive visualizations, and create dashboards with alerting and sharing capabilities. The backend is a Python Flask application with SQLAlchemy for database access, Redis for caching and task queuing, and RQ for background job execution. The frontend is a React single-page application using Ant Design, Plotly, D3, and Leaflet, organized into pages for queries, dashboards, alerts, data sources, and administration. The system exposes a RESTful API for all operations and supports authentication via password, Google OAuth, SAML, LDAP, JWT, and API keys. The architecture follows a modular plugin pattern for query runners and visualizations. Over 35 query runners (e.g., PostgreSQL, BigQuery, Snowflake, MongoDB, Prometheus) are registered via a common base class, each implementing run_query, get_schema, and configuration_schema. The visualization library (viz-lib) is a separate package that registers chart types (line, bar, pie, map, table, cohort, sankey, etc.) with editors and renderers. Dashboards use a grid layout with widgets that can display visualizations, text, or embedded content. Alerts evaluate query results against conditions and send notifications to destinations like Slack, email, PagerDuty, and webhooks. Key data flows: users write SQL or use query runners to fetch data from connected sources; results are cached and can be visualized; dashboards aggregate multiple visualizations with parameter bindings; scheduled queries refresh results and trigger alerts. The system also supports embedding visualizations in external sites and public sharing of dashboards. While primarily an application, the extensive query runner and visualization plugin systems make it a flexible platform for data exploration and operational reporting.
The LLM identified 8 files worth highlighting for reuse:
Defines the base classes for all query runners (BaseQueryRunner, BaseSQLQueryRunner, BaseHTTPQueryRunner) with a registration decorator, configuration schema validation, SSH tunnel support, and type guessing. This pattern allows adding new data sources by simply subclassing and registering, making it highly extensible and reusable.
Implements a registry for visualization types, allowing dynamic registration of renderers, editors, and options. Each visualization is defined by a unique type, name, and order. This pattern enables the addition of new visualizations without modifying core code, and the registry can be used in other projects needing extensible visualization support.
Provides a ConfigurationContainer class that validates configuration dictionaries against a JSON schema, encrypts secret fields using Fernet, and supports ordering and help text. This is a reusable utility for managing sensitive configuration in any Python application.
A React component that generates a form dynamically from a JSON schema definition. Supports various field types (input, select, checkbox, textarea, ace editor, file upload) and handles validation, layout, and custom actions. This component can be extracted and used in any React project that needs schema-driven form generation.
A generic list component that manages pagination, sorting, search, tags filtering, and extra actions. It uses a controller pattern with ItemsSource, Paginator, Sorter, and StateStorage classes. This component is reusable for any list view in a React application and demonstrates a clean separation of concerns.
Base class for query parameters (text, number, enum, date, etc.) with normalization, URL serialization, and validation. The parameter system is extensible and handles complex scenarios like query-based dropdowns and date ranges. This pattern can be reused in any application needing parameterized inputs.
A comprehensive value formatting library that handles null display, boolean rendering, number formatting (decimals, separators, prefixes/suffixes), date/time formatting, link highlighting, and template substitution. It is well-tested and can be extracted as a standalone formatting utility for any React project.
Implements a ChangeTrackingMixin for SQLAlchemy models that automatically records changes to specified fields in a separate changes table, including the old and new values, the user who made the change, and a timestamp. This mixin can be applied to any SQLAlchemy model to add audit trail functionality.