Well when I’m browsing the internet, I tend to save a ton of content—but remembering when and what you saved? Total brain freeze! ❄️ That’s where SurfSense comes in. SurfSense is like a Knowledge Graph 🧠 Brain 🧠 for anything you see ( 📱 Social Media Chats, 📅Calender Invites, 📧 Important Mails, ⚓ Tutorials, 😋 Recipies and anything ) on the World Wide Web. Now, you’ll never forget any browsing session. Easily capture your web browsing session and desired webpage content using an easy-to-use Chrome extension. Then, ask your personal knowledge base anything about your saved content., and voilà—instant recall! 🧑💻🌐
v3surf.mp4
- 💡 Idea: Save any content you see on the internet in your own Knowledge Graph.
- 🔍 Powerful Search: Quickly find anything in your Web Browsing Sessions.
- 💬 Chat with your Web History: Interact in Natural Language with your saved Web Browsing Sessions.
- 🏠 Self Hostable: Open source and easy to deploy locally.
- 📊 Use GraphRAG: Utilize the power of GraphRAG to find meaningful relations in your saved content.
- 🔟% Cheap On Wallet: Works Flawlessly with OpenAI gpt-4o-mini model.
- 🕸️ No WebScraping: Extension directly reads the data from DOM.
- 🔔 Automatic Important Notifications: Get critical notifications such as important meetings, invites etc.
Before we begin, we need to set up our Neo4j Graph Database. This is where SurfSense stores all your saved information. For a quick setup, I suggest getting your free Neo4j Aura DB from https://neo4j.com/cloud/platform/aura-graph-database/ or setting it up locally.
After obtaining your Neo4j credentials, make sure to get your OpenAI API Key from https://platform.openai.com/.
- Register Your SurfSense account at https://www.surfsense.net/signup
- Download SurfSense Extension from https://chromewebstore.google.com/detail/surfsense/jihmihbdpfjhppdlifphccgefjhifblf
Now you are ready to use SurfSense. Start by first logging into the Extension.
When you start the extension you should see a Login page like this
After logging in you will need to fill your Neo4j Credentials & OpenAPI Key.
After Saving you should be able to use extension now.
Options | Explanations |
---|---|
Clear Inactive History Sessions | It clears the saved content for Inactive Tab Sessions. |
Save Current Webpage Snapshot | Stores the current webpage session info into SurfSense history store |
Save to SurfSense | Processes the SurfSense History Store & Initiates a Save Job |
- Now just start browsing the Internet. Whatever you want to save any content take its Snapshot and save it to SurfSense. After Save Job is completed you are ready to ask anything about it to your Knowledge Graph Brain 🧠.
- Now go to SurfSense Chat Options at https://www.surfsense.net/chat & fill the Neo4j Credentials & OpenAPI Key if asked.
OPTIONS | DESCRIPTION |
---|---|
Precision Chat | Used for detailed search and chatting with your saved web sessions and their content. |
General Chat | Used for general questions about your content. Doesn't work well with Dates & Time. |
As an example lets visit : https://myanimelist.net/anime/season (Summer 2024 Anime atm) and save it to SurfSense.
Now lets ask SurfSense "Give list of summer 2024 animes with images."
Sample Response:
Now Let's ask it more information about our related session.
Sample More Description Response:
For authentication purposes, you’ll also need a PostgreSQL instance running on your machine.
Now lets setup the SurfSense BackEnd
- Clone this repo.
- Go to ./backend subdirectory.
- Setup Python Virtual Enviroment
- Run
pip install -r requirements.txt
to install all required dependencies. - Update the required Environment variables in envs.py
ENV VARIABLE | Description |
---|---|
POSTGRES_DATABASE_URL | postgresql+psycopg2://user:pass@host:5432/database |
API_SECRET_KEY | Can be any Random String value. Make Sure to remember it for as you need to send it in request to Backend for security purposes. |
- Backend is a FastAPI Backend so now just run the server on unicorn using command
uvicorn server:app --host 0.0.0.0 --port 8000
- If everything worked fine you should see screen like this.
After Setting up the BackEnd Lets do a quick build of the extension.
- Go to ./extension subdirectory.
- Run
pnpm i
to install required dependencies. - Update Env variables at
./src/env.tsx
ENV VARIABLE | DESCRIPTION |
---|---|
API_SECRET_KEY | Same String value your set for Backend |
BACKEND_URL | Give hosted backend url here. Eg. http://127.0.0.1:8000 |
- Run
pnpm run build
to build your extension. Build will be generated in./dist
folder - Enable Developer Mode in Chrome and load the extinction from
./dist
folder. - Extension will load successfully.
Now resister a quick user through Swagger API > Try it Out: http://127.0.0.1:8000/docs#/default/register_user_register_post
Make Sure in request body "apisecretkey"
value is same value as API_SECRET_KEY
we been assigning.
For local frontend setup just fill out the .env
file of frontend.
ENV VARIABLE | DESCRIPTION |
---|---|
NEXT_PUBLIC_API_SECRET_KEY | Same String value your set for Backend & Extension |
NEXT_PUBLIC_BACKEND_URL | Give hosted backend url here. Eg. http://127.0.0.1:8000 |
NEXT_PUBLIC_RECAPTCHA_SITE_KEY | Google Recaptcha v2 Client Key |
RECAPTCHA_SECRET_KEY | Google Recaptcha v2 Server Key |
and run it using pnpm run dev
You should see your Next.js frontend running at localhost:3000
- Extenstion : Chrome Manifest v3
- BackEnd : FastAPI with LangChain
- FrontEnd: Next.js with Aceternity.
In Progress...........
- Generalize the way SurfSense uses Graphs. Will soon make an integration with FalkorDB soon.
- Critical Notifications [Done]
- Saving Chats [Done]
- Basic keyword search page for saved sessions [Done]
- Multi & Single Document Chat [Done]
- Implement some tricks from GraphRAG papers to optimize current GraphRAG logic.
Contributions are very welcome! A contribution can be as small as a ⭐ or even finding and creating issues. Fine-tuning the Backend is always desired.