You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
**PerplexiGrid** turns natural language into rich, interactive dashboards. Connect your data and mix it with live web data, ask a question, and let the Sonar API do the rest! Complete with drag-and-drop layout, AI widget generation, and ECharts-powered visualizations.
11
9
12
10
## Features
13
11
14
-
* Fully customizable dashboards generated from plain English prompts with 25+ supported widget types (charts, KPIs, tables, heatmaps, etc.)
15
-
* Smart layout with a customizable drag-and-drop grid, shareable as PDF/image exports and shareable links
16
-
* Refine or add widgets using conversational updates
17
-
* Support for live data from the web + your own datasources
***Natural Language to Dashboards**: Convert plain English prompts into fully functional analytics dashboards with 25+ widget types
13
+
***Live Data Integration**: Blend your own data sources with real-time web data for comprehensive insights
14
+
***Interactive Grid Layout**: Drag-and-drop interface for customizing dashboard layouts and styling
15
+
***AI-Powered Refinement**: Refine or add widgets using conversational updates
16
+
***Export & Share**: Generate PDF exports, high-res images, and shareable dashboard links
51
17
52
-
```
53
-
npm run dev
54
-
```
18
+
## How it uses Sonar
55
19
56
-
Open `http://localhost:5173` in your browser.
20
+
PerplexiGrid leverages the Sonar API through four specialized modes:
57
21
58
-
## Supabase Edge Function Setup
22
+
***Full Dashboard Generation (f1)**: Creates comprehensive dashboards with multiple widgets using Sonar-pro's advanced capabilities
23
+
***Lightweight Mode (l1)**: Generates quick visualizations for embedded systems and real-time applications
24
+
***Dashboard Updates (r1)**: Enables dynamic modifications through natural language while maintaining context
25
+
***Widget Refinement (r2)**: Provides precise control over individual widget updates
59
26
60
-
Install the Supabase CLI:
61
-
https://supabase.com/docs/guides/cli
62
-
63
-
Link to your project:
64
-
65
-
```
66
-
supabase link --project-ref your-project-id
67
-
```
68
-
69
-
Create the Edge Function:
70
-
71
-
```
72
-
supabase functions new call-perplexity
73
-
```
74
-
75
-
Paste your implementation into:
76
-
`functions/call-perplexity/index.ts`
77
-
78
-
Set the environment variable (via Supabase Dashboard):
79
-
80
-
`PPLX_API_KEY=your-perplexity-api-key `
81
-
82
-
Deploy the function:
83
-
84
-
```
85
-
supabase functions deploy call-perplexity
86
-
```
87
-
88
-
Your frontend calls it at: `/call-perplexity`
27
+
The system uses structured JSON schema responses to ensure consistent, ECharts-compatible output that can be directly rendered as interactive visualizations.
89
28
90
29
## Usage
91
30
92
31
1. Open the app and start a new dashboard
93
-
2. Prompt it like: _“Show me market trends in AI startups in 2024”_ (Sonar generates chart configs, which are parsed and rendered as live widgets)
32
+
2. Prompt it like: _"Show me market trends in AI startups in 2024"_ (Sonar generates chart configs, which are parsed and rendered as live widgets)
The user sends messages that are turned into prompts to a Supabase Edge Function that wraps the Perplexity Sonar API.
115
53
Depending on the mode (`f1`, `l1`, `r1`, or `r2`), the function generates full structured outputs for dashboards, lightweight visualizations, or targeted updates.
116
54
The generated layout is parsed into structured widget definitions and passed through our widget creation engine.
117
55
118
-
Explore our [mai sonar-api service here.](https://github.com/PetarRan/perplexigrid/blob/main/server/supabase/functions/_shared/perplexityService.ts)
56
+
Explore our [main sonar-api service here.](https://github.com/PetarRan/perplexigrid/blob/main/server/supabase/functions/_shared/perplexityService.ts)
119
57
120
58
## Prompt Modes
121
59
@@ -124,17 +62,17 @@ Explore our [mai sonar-api service here.](https://github.com/PetarRan/perplexigr
124
62
|`f1`| First-time full dashboard generation | User starts with an empty canvas and enters an initial prompt | Produces a complete dashboard layout with multiple widgets |
125
63
|`l1`| Lightweight dashboard generation | Used for quick insights or previews with minimal tokens | Faster and cheaper, but returns fewer widgets with less instruction depth |
126
64
|`r1`| Full dashboard regeneration | User wants to replace all existing widgets with a new prompt | Rebuilds the entire dashboard while keeping layout intact |
127
-
|`r2`| Targeted widget update | User wants to change a specific widget (e.g. “make this a pie chart”) | Only the selected widget is modified based on the new instruction |
65
+
|`r2`| Targeted widget update | User wants to change a specific widget (e.g. "make this a pie chart") | Only the selected widget is modified based on the new instruction |
128
66
129
-
Tech Stack
67
+
## Tech Stack
130
68
131
-
***Frontend**: React + Vite (TypeScript), ECharts, react-grid-layout
132
-
***Backend**: Supabase Edge Functions (TypeScript on Deno)
0 commit comments