Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 25 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,28 @@
# Tauri + React + Typescript
# Local Data Visualization Tool

I am working on a MacOS desktop application for data cleaning and analytics. This data tool allows users to go from raw data to insights faster. This application is for anyone that builds decks for clients and would like better visualizations.


## Essential Visualizations
- **Bar & Column Charts:** Vertical and Horizontal, with support for stacking (stacked or 100% stacked_ and grouping.
- **Line & Area Charts:** Used for time-series and trend analysis.
- **Scatter Plots:** Used when showing relationships and distributions between two numeric variables.
- **Histograms:** For frequency distribution analysis.
- **Tables & Pivot Tables:** High-Performance grids for raw data exploration.

2. Advanced & "Infinite Canvas" Visuals
- **Metric Trees / Maps:** Visualizing KPIs in a hierarchical flow (e.g., Revenue -> Orders -> AOV).
- **Funnel Charts:** Specifically designed for marketing and product onboarding flows (e.g., Visit -> Signup -> Purchase).
- **Heat Maps:** For matrix-style data density visualization.
- **Big Number (KPI) Cards:** Large, scaled-up numbers for top-level metrics.
- **Sankey / Flow Diagrams:** Showing the movement of data or users between states.

3. Specialized Analytical Templates
- **Customer Journey Maps:** Combining charts with sticky notes and flow arrows.
- **A/B Test Visuals:** Specialized views to compare control vs. variant groups.
- **GA4 / Website Analytics Maps:** Pre-built flows for web traffic.
- **OKRs & Alignment Canvases:** Mixing data with strategic planning shapes.


This template should help get you started developing with Tauri, React and Typescript in Vite.

## Recommended IDE Setup

- [VS Code](https://code.visualstudio.com/) + [Tauri](https://marketplace.visualstudio.com/items?itemName=tauri-apps.tauri-vscode) + [rust-analyzer](https://marketplace.visualstudio.com/items?itemName=rust-lang.rust-analyzer)
81 changes: 81 additions & 0 deletions bun.lock

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,16 @@
"tauri": "tauri"
},
"dependencies": {
"@monaco-editor/react": "^4.7.0",
"@tauri-apps/api": "^2",
"@tauri-apps/plugin-opener": "^2",
"@xyflow/react": "^12.10.0",
"clsx": "^2.1.1",
"lucide-react": "^0.562.0",
"monaco-editor": "^0.55.1",
"react": "^19.1.0",
"react-dom": "^19.1.0",
"recharts": "^3.7.0",
"tailwind-merge": "^3.4.0",
"zustand": "^5.0.10"
},
Expand Down
19 changes: 14 additions & 5 deletions src-tauri/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,24 +1,33 @@
// Learn more about Tauri commands at https://tauri.app/develop/calling-rust/
//
use duckdb::Connection;
use serde::{Deserialize, Serialize};
use duckdb::{Connection, types::Value};
use serde::Serialize;
use serde_json::json;

// This is the data structure we send back to React.
#[derive(Serialize)]

pub struct TableSchema {
columns: Vec<String>,
column_types: Vec<String>,
row_count_estimate: usize,
}

// Result structure for SQL query execution
#[derive(Serialize)]
pub struct QueryResult {
columns: Vec<String>,
column_types: Vec<String>,
rows: Vec<Vec<serde_json::Value>>,
row_count: usize,
}


#[tauri::command]
async fn get_csv_schema(path: String) -> Result<TableSchema, String> {
// 1. Open a temporary in-memory DuckDB connection
let conn = Connection::open_in_memory().map_err(|e| e.to_string())?;

let query = format!("DESCRIBE SELECT * FROM read_csv_auto('{}' LIMIT 1", path);
let query = format!("DESCRIBE (SELECT * FROM read_csv_auto('{}'));", path);

let mut stmt = conn.prepare(&query).map_err(|e| e.to_string())?;

Expand Down Expand Up @@ -51,7 +60,7 @@ async fn get_csv_schema(path: String) -> Result<TableSchema, String> {
pub fn run() {
tauri::Builder::default()
.plugin(tauri_plugin_shell::init())
.invoke_handler(tauri::generate_handler![get_csv_schema]) // Register here!
.invoke_handler(tauri::generate_handler![get_csv_schema, execute_sql]) // Register here!
.run(tauri::generate_context!())
.expect("error while running tauri application");
}
2 changes: 1 addition & 1 deletion src/App.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

:root {
font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif;
color-scheme: light;
}

body, html, #root {
Expand All @@ -13,6 +12,7 @@ body, html, #root {
width: 100vw;
height: 100vh;
overflow: hidden; /* This is crucial for the "Desktop" feel */
background-color: #fff;
}


Expand Down
Loading