|
| 1 | +--- |
| 2 | +title: PerplexiGrid | Interactive Analytics Dashboards |
| 3 | +description: Instantly generate analytics dashboards from natural language using live data via Perplexity Sonar API. |
| 4 | +sidebar_position: 5 |
| 5 | +keywords: [perplexigrid, dashboard, analytics, BI, AI, Perplexity, sonar, echarts, supabase] |
| 6 | +--- |
| 7 | + |
| 8 | +**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. |
| 9 | + |
| 10 | +## Features |
| 11 | + |
| 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 |
| 17 | + |
| 18 | +## How it uses Sonar |
| 19 | + |
| 20 | +PerplexiGrid leverages the Sonar API through four specialized modes: |
| 21 | + |
| 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 |
| 26 | + |
| 27 | +The system uses structured JSON schema responses to ensure consistent, ECharts-compatible output that can be directly rendered as interactive visualizations. |
| 28 | + |
| 29 | +## Usage |
| 30 | + |
| 31 | +1. Open the app and start a new dashboard |
| 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) |
| 33 | + |
| 34 | + |
| 35 | + |
| 36 | +3. Rearrange and style the widgets with the grid interface |
| 37 | + |
| 38 | + |
| 39 | + |
| 40 | + |
| 41 | +5. Add your own datasources to blend your data with live web data |
| 42 | + |
| 43 | + |
| 44 | + |
| 45 | +6. Refine them via text prompts or export the dashboard as needed |
| 46 | +7. Collaborate and share easily |
| 47 | + |
| 48 | + |
| 49 | + |
| 50 | +## Code Explanation |
| 51 | + |
| 52 | +The user sends messages that are turned into prompts to a Supabase Edge Function that wraps the Perplexity Sonar API. |
| 53 | +Depending on the mode (`f1`, `l1`, `r1`, or `r2`), the function generates full structured outputs for dashboards, lightweight visualizations, or targeted updates. |
| 54 | +The generated layout is parsed into structured widget definitions and passed through our widget creation engine. |
| 55 | + |
| 56 | +Explore our [main sonar-api service here.](https://github.com/PetarRan/perplexigrid/blob/main/server/supabase/functions/_shared/perplexityService.ts) |
| 57 | + |
| 58 | +## Prompt Modes |
| 59 | + |
| 60 | +| Mode | Description | Use Case | Notes | |
| 61 | +|------|-------------|----------|-------| |
| 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 | |
| 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 | |
| 64 | +| `r1` | Full dashboard regeneration | User wants to replace all existing widgets with a new prompt | Rebuilds the entire dashboard while keeping layout intact | |
| 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 | |
| 66 | + |
| 67 | +## Tech Stack |
| 68 | + |
| 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 |
| 73 | + |
| 74 | +## Links |
| 75 | + |
| 76 | +- [GitHub Repository](https://github.com/PetarRan/perplexigrid) |
| 77 | +- [Live Demo](https://app.perplexigrid.com) |
| 78 | +- [Website](https://www.perplexigrid.com) |
0 commit comments