Skip to content

Greps bookmarks and other saved items from my socials for faster context search ( X and Linkedin)

Notifications You must be signed in to change notification settings

divital-coder/Supermemory-Bookmarks-chat

Repository files navigation

Bookmark Chat Div

AI-powered semantic search across your Twitter/X bookmarks with a stunning WebGL interface

Demo

Deploy on Render

Features

  • Semantic Search - Ask questions in natural language, get relevant bookmarks
  • AI-Powered Responses - Nebius LLM (Gemma 9B) synthesizes answers from your bookmarks
  • Twitter/X Integration - OAuth-based bookmark fetching with pagination
  • Supermemory Storage - Vector database for efficient semantic retrieval
  • WebGL Shader Background - Beautiful interactive 3D graphics
  • Dark/Light Mode - Glassmorphism UI with theme support
  • Deduplication - Smart handling of duplicate bookmarks
  • Cursor Persistence - Resume fetching after rate limits

Live Demo

supermemory-bookmarks-chat.onrender.com

Tech Stack

Technology Purpose
Next.js 16 React framework with App Router
Supermemory Vector database for semantic search
Nebius Token Factory LLM API (Gemma 9B)
Twitter API v2 OAuth & bookmark fetching
Tailwind CSS Styling with glassmorphism effects
WebGL Interactive shader background

Installation

Prerequisites

  • Node.js 18+ or Bun
  • Twitter Developer Account (with OAuth 2.0 setup)
  • Supermemory API key
  • Nebius API key

Setup

  1. Clone the repository

    git clone https://github.com/divital-coder/Supermemory-Bookmarks-chat.git
    cd Supermemory-Bookmarks-chat
  2. Install dependencies

    npm install
    # or
    bun install
  3. Configure environment variables

    Create a .env.local file:

    # App
    APP_URL=http://localhost:3000
    
    # Supermemory
    SUPERMEMORY_API_KEY=your_supermemory_key
    
    # Nebius LLM
    NEBIUS_API_KEY=your_nebius_key
    
    # Twitter OAuth
    TWITTER_CLIENT_ID=your_twitter_client_id
    TWITTER_CLIENT_SECRET=your_twitter_client_secret
    TWITTER_REDIRECT_URI=http://localhost:3000/api/auth/callback
  4. Run development server

    npm run dev
    # or
    bun run dev
  5. Open http://localhost:3000

Twitter Developer Setup

  1. Go to developer.twitter.com
  2. Create a new app with OAuth 2.0 enabled
  3. Set Callback URL to your app URL + /api/auth/callback
  4. Enable the Bookmark.Read scope
  5. Copy Client ID and Client Secret to your .env.local

Deployment (Render)

  1. Push code to GitHub
  2. Create new Web Service on render.com
  3. Connect your repository
  4. Add environment variables in Render dashboard
  5. Update Twitter Developer Portal callback URL to your Render URL

How It Works

┌─────────────────┐     ┌─────────────────┐     ┌─────────────────┐
│   Twitter API   │────▶│   Supermemory   │────▶│   Nebius LLM    │
│   (Bookmarks)   │     │ (Vector Search) │     │  (AI Response)  │
└─────────────────┘     └─────────────────┘     └─────────────────┘
        │                       │                       │
        ▼                       ▼                       ▼
   Fetch tweets           Semantic index          Natural language
   with OAuth             & retrieval             answers with URLs

API Endpoints

Endpoint Method Description
/api/auth/[platform] GET Initiate OAuth flow
/api/auth/callback GET OAuth callback handler
/api/fetch POST Fetch bookmarks from platforms
/api/search GET Semantic search with LLM response
/api/providers GET List available LLM providers

Contributing

Contributions are welcome. Please feel free to submit a Pull Request.

License

MIT License - feel free to use this project for your own purposes.

Acknowledgments


Made by divital-coder

About

Greps bookmarks and other saved items from my socials for faster context search ( X and Linkedin)

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •