$ show frappe/insights
Frappe Insights is a full-stack business intelligence application enabling users to connect to data sources, build queries visually or via SQL, create visualizations, and assemble dashboards and workbooks. The decoupled architecture features a Vue.js 3 frontend communicating with a Python/Frappe backend through REST APIs. Key capabilities include a multi-database query builder using Ibis and SQLGlot, ECharts-powered visualizations, role-based access control, and DuckDB-based data warehousing for caching imported tables. The frontend leverages Vue composition API for reusable logic, while the backend uses Frappe's DocType system for extensibility. The project demonstrates solid engineering practices with modular API design, reusable components, and abstraction layers, though complexity arises from supporting numerous database types and deep Frappe integration.
The LLM identified 5 files worth highlighting for reuse:
Provides utility functions for SQL expression manipulation using sqlglot, enabling dialect-independent SQL generation and parsing. This component is decoupled from the Frappe framework and can be reused in any Python project requiring SQL transformation.
Abstracts database connections across multiple backends (PostgreSQL, MySQL, SQLite, DuckDB, etc.) using the Ibis framework. It provides a unified interface for executing queries and managing connections, reducing boilerplate when working with diverse SQL databases.
A lightweight wrapper around Day.js that provides consistent date formatting and parsing utilities across the application. It ensures standardized date handling and can be easily extracted to any JavaScript or TypeScript project.
A Vue 3 composable that encapsulates pagination logic (page size, current page, total items) and exposes reactive state and methods for controlling pagination. It is framework-specific to Vue but highly reusable within any Vue 3 application.
A helper module for displaying toast notifications using the vue-sonner library. It provides a simple API for showing success, error, and warning messages, promoting consistent user feedback patterns.