Skip to content

Commit ae5d0e0

Browse files
committed
rafactor: improve content and structure
1 parent 7aebffd commit ae5d0e0

File tree

1 file changed

+24
-86
lines changed

1 file changed

+24
-86
lines changed

docs/showcase/perplexigrid.mdx

Lines changed: 24 additions & 86 deletions
Original file line numberDiff line numberDiff line change
@@ -1,96 +1,35 @@
11
---
2-
title: PerplexiGrid
2+
title: PerplexiGrid | Interactive Analytics Dashboards
33
description: Instantly generate analytics dashboards from natural language using live data via Perplexity Sonar API.
4-
sidebar_position: 1
4+
sidebar_position: 5
55
keywords: [perplexigrid, dashboard, analytics, BI, AI, Perplexity, sonar, echarts, supabase]
66
---
77

8-
# PerplexiGrid
9-
108
**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.
119

1210
## Features
1311

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
18-
19-
## Prerequisites
20-
21-
* Node.js 18 or newer
22-
* Supabase project + API keys
23-
* Perplexity Sonar API key
24-
* Supabase CLI for deploying Edge Functions
25-
26-
## Installation
27-
28-
Clone the repository:
29-
30-
```
31-
git clone https://github.com/PetarRan/perplexigrid.git
32-
cd perplexigrid
33-
```
34-
35-
Install frontend dependencies:
36-
37-
```
38-
cd client
39-
npm install
40-
```
41-
42-
Create your `.env` file inside `client/`:
43-
44-
```
45-
VITE_SUPABASE_URL=https://your-project.supabase.co
46-
VITE_SUPABASE_ANON_KEY=your-anon-key
47-
VITE_PPLX_API_KEY=your-perplexity-api-key
48-
```
49-
50-
Run the development server:
12+
* **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
5117

52-
```
53-
npm run dev
54-
```
18+
## How it uses Sonar
5519

56-
Open `http://localhost:5173` in your browser.
20+
PerplexiGrid leverages the Sonar API through four specialized modes:
5721

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
5926

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.
8928

9029
## Usage
9130

9231
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)
9433

9534
![Prompt #1](https://www.perplexigrid.com/guide/prompt_dark.gif)
9635

@@ -108,14 +47,13 @@ Your frontend calls it at: `/call-perplexity`
10847

10948
![Prompt #5](https://www.perplexigrid.com/guide/invite_dark.gif)
11049

111-
11250
## Code Explanation
11351

11452
The user sends messages that are turned into prompts to a Supabase Edge Function that wraps the Perplexity Sonar API.
11553
Depending on the mode (`f1`, `l1`, `r1`, or `r2`), the function generates full structured outputs for dashboards, lightweight visualizations, or targeted updates.
11654
The generated layout is parsed into structured widget definitions and passed through our widget creation engine.
11755

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)
11957

12058
## Prompt Modes
12159

@@ -124,17 +62,17 @@ Explore our [mai sonar-api service here.](https://github.com/PetarRan/perplexigr
12462
| `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 |
12563
| `l1` | Lightweight dashboard generation | Used for quick insights or previews with minimal tokens | Faster and cheaper, but returns fewer widgets with less instruction depth |
12664
| `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 |
12866

129-
Tech Stack
67+
## Tech Stack
13068

131-
* **Frontend**: React + Vite (TypeScript), ECharts, react-grid-layout
132-
* **Backend**: Supabase Edge Functions (TypeScript on Deno)
133-
* **Infra**: Supabase (PostgreSQL, RLS, Auth), CLI-based deploys + Vercel
134-
* **AI Model**: Perplexity Sonar-Pro
69+
* **Frontend**: React + Vite (TypeScript), ECharts, react-grid-layout
70+
* **Backend**: Supabase Edge Functions (TypeScript on Deno)
71+
* **AI Engine**: Perplexity Sonar-Pro
72+
* **Infrastructure**: Supabase (PostgreSQL, RLS, Auth), Vercel deployment
13573

13674
## Links
13775

13876
- [GitHub Repository](https://github.com/PetarRan/perplexigrid)
139-
- [perplexigrid.com](https://www.perplexigrid.com)
140-
- [Live Demo](https://app.perplexigrid.com)
77+
- [Live Demo](https://app.perplexigrid.com)
78+
- [Website](https://www.perplexigrid.com)

0 commit comments

Comments
 (0)