Skip to content

Commit dc7980b

Browse files
Create perplexity-lens.md
1 parent 9da3edd commit dc7980b

File tree

1 file changed

+113
-0
lines changed

1 file changed

+113
-0
lines changed

docs/showcase/perplexity-lens.md

Lines changed: 113 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
---
2+
title: Perplexity Lens
3+
description: A browser extension that builds personalized knowledge graphs using Perplexity AI
4+
sidebar_position: 1
5+
keywords: [browser extension, knowledge graph, RAG, summarization]
6+
---
7+
8+
9+
10+
11+
# Perplexity Lens 🔍
12+
13+
**Perplexity Lens** is a powerful browser extension that transforms your browsing experience. It provides AI-powered insights using Perplexity AI and creates a **personalized knowledge graph** that visually connects the concepts you encounter online.
14+
15+
## Features
16+
17+
- 🔍 **Smart Text Selection**: Get AI-generated explanations for selected text.
18+
- 📄 **Webpage Summarization**: Instantly summarize an entire webpage for quick understanding.
19+
- 🧠 **Contextual RAG Insights**: Retrieve detailed context or concise meanings for any word or phrase using Retrieval-Augmented Generation (RAG).
20+
- 📊 **Knowledge Graph Visualization**: Explore connections between ideas using an interactive graph built with D3.js.
21+
- 🔗 **Public Sharing**: Generate URLs for sharing your graph with others.
22+
- 🔐 **User Authentication**: Secure access with Firebase.
23+
- 💾 **Dual Storage**: Store data locally via IndexedDB and in the cloud via Firebase.
24+
- 📱 **Responsive UI**: Fully functional across devices.
25+
- 🎨 **Modern Stack**: Built using React, TypeScript, and TailwindCSS.
26+
27+
## Prerequisites
28+
29+
Before using Perplexity Lens, ensure you have:
30+
31+
- Node.js (v14 or later)
32+
- npm (v6 or later)
33+
- Google Chrome (or compatible browser)
34+
- Firebase account for cloud functionality
35+
- Firebase CLI (`npm install -g firebase-tools`)
36+
37+
## Installation
38+
39+
1. **Clone the Repository:**
40+
```bash
41+
git clone https://github.com/yourusername/perplexity-lens.git
42+
cd perplexity_lens
43+
```
44+
45+
2. **Install Dependencies:**
46+
```bash
47+
npm install
48+
```
49+
50+
3. **Configure API Keys:**
51+
Edit `src/config.ts`:
52+
```ts
53+
export const PERPLEXITY_API_KEY = 'your-perplexity-key';
54+
export const EMBEDDING_API_KEY = 'your-openai-key';
55+
export const FIREBASE_HOSTING_URL = 'https://your-project-id.web.app';
56+
```
57+
58+
4. **Build the Extension:**
59+
```bash
60+
npm run build
61+
```
62+
63+
5. **Load Extension in Chrome:**
64+
- Go to `chrome://extensions/`
65+
- Enable *Developer mode*
66+
- Click *Load unpacked* and select the `dist/` directory
67+
68+
## Usage
69+
70+
- **Sign In**: Click the extension icon and authenticate via Firebase.
71+
- **Highlight Text**: Select text on any webpage for AI-powered insights.
72+
- **Summarize Page**: Use the "Summarize" feature to get a concise overview of the current webpage.
73+
- **Ask Anything**: Hover or click on any word or phrase to get a quick definition or ask for in-depth explanations via RAG.
74+
- **View Graph**: Navigate to the *Graph* tab to see your knowledge graph.
75+
- **Explore**: Zoom, drag, and hover over nodes.
76+
- **Share**: Click "Share Graph" to generate a public link.
77+
78+
## Code Explanation
79+
80+
- `src/graph/`: Implements the D3.js-based graph.
81+
- `src/popup/`: Contains the UI logic for the popup.
82+
- `src/services/`: Handles API calls and Firebase interactions.
83+
- `src/config.ts`: Centralized configuration for API keys and hosting URL.
84+
85+
## Links
86+
87+
- [GitHub Repository](https://github.com/iamaayushijain/perplexity-lens)
88+
- [Live Demo (View Shared Graph)](https://youtu.be/SCPklDuSR3U)
89+
90+
## Limitations
91+
92+
- Large graphs may load slowly.
93+
- Only selected concept metadata is shared; full text and browsing history remain private.
94+
- Currently supported on Chromium-based browsers only.
95+
96+
---
97+
98+
> 🔐 **Privacy Note:** Your browsing history and full text content are never uploaded or shared. Only selected concepts and their relationships are used to build the graph.
99+
100+
## License
101+
102+
This project is licensed under the [MIT License](LICENSE).
103+
104+
## Acknowledgements
105+
106+
- **Perplexity AI** for intelligent text explanations and summarization.
107+
- **D3.js** for graph visualization.
108+
- **Firebase** for authentication and hosting.
109+
- **React**, **TypeScript**, and **TailwindCSS** for a modern frontend framework.
110+
111+
---
112+
113+
🚀 *Transform your daily reading into a meaningful visual map of knowledge with Perplexity Lens!*

0 commit comments

Comments
 (0)