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 cross browser extension. Then, ask your personal knowledge base anything about your saved content, and voilà—instant recall!
https://github.com/user-attachments/assets/37985a8b-acbd-4fff-b276-512bbf0bf6aa
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/.
UPDATE 24 AUGUST 2024: Extension code is now migrated to Plasmo. You can use extension in any webbrowser. All Webstore links will be updated soon.
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 |
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
pip install -r requirements.txt
to install all required dependencies.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. |
uvicorn server:app --host 0.0.0.0 --port 8000
UPDATE: Extension code is now migrated to Plasmo. Follow this guide to build for your target browser now : https://docs.plasmo.com/framework/workflows/build
env eg in .env.local
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
In Progress………..
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.