Skip to content
@hlte-net

hlte.net

an open, simple, personal web highliter

HLTE.net System Documentation

System Architecture Diagram

+---------------------+    Content     +------------------+     Email Content
|                     |  Highlighting  |                  |     ------------->
|  Browser Extension  | -------------> |                  |
|                     |                |                  |        +-------------------------+
+---------------------+                |                  |        |                         |
                                       |  Elixir Daemon   | <------+  Email (SNS/SES/S3)     |
                                       |                  |        |                         |
                                       |                  |        +-------------------------+
                                       |                  |
+---------------------+                |                  |
|                     |  Liked Posts   |                  |
|  Bluesky Account    | -------------> |                  |
|                     |                +--------+---------+
+---------------------+                         |
                                                | Content Events
                                                | (Redis Stream)
                                                v
                                     +-------------------+
                                     |                   |
                                     |  Persistence      |
                                     |  Service          |
                                     |                   |
                                     +--------+----------+
                                              |
                                              | URL Rendering
                                              | Requests
                                              v
                                     +-------------------+
                                     |                   |      +-----------------+
                                     |  Cloudflare       |      |                 |
                                     |  Worker           +----->+  R2 Storage     |
                                     |                   |      |  (PDFs/Images)  |
                                     +-------------------+      |                 |
                                                                +-----------------+

         Content Access Flow
         -------------------

 +----------+      HTTP API       +---------------+
 |          |  <-------------->   |               |
 |  Users   |                     |  Elixir       |
 |          |  <---------------   |  Daemon       |
 +----------+   Content Results   |               |
                                  +---------------+

Architectural Overview

HLTE (Highlight) is a distributed system for capturing, storing, processing, and retrieving web content across multiple sources. Here's how the components work together:

Core Components

  1. Elixir Daemon (Primary Backend)

    • Main application server handling content processing, storage, and retrieval
    • Uses SQLite for content and tags storage
    • Provides HTTP API endpoints for content submission/retrieval
    • Publishes events to Redis for asynchronous processing
    • Supports email ingestion via AWS SNS/SES
  2. Persistence Service

    • Watches for new entries via Redis streams
    • Stores content as JSON files for long-term archival
    • Organizes content in a structured metadata system
  3. Cloudflare Persistence Worker

    • Captures web content as PDFs and screenshots
    • Runs on Cloudflare Workers platform
    • Stores rendered content in Cloudflare R2 storage
    • Provides API for content rendering
  4. Bluesky Likes Integration

    • Monitors a Bluesky account for liked posts
    • Automatically captures and processes liked content
    • Submits content to the HLTE daemon
    • Uses Redis for session storage
  5. Browser Extension

    • Allows users to highlight and capture web content
    • Provides UI for content submission and retrieval
    • Communicates with daemon API endpoints

Data Flow

  1. Content Capture occurs through:

    • Manual highlighting via browser extension
    • Automatic capture of Bluesky liked posts
    • Email submission of URLs
  2. Processing handled by the Elixir daemon:

    • Content validation and normalization
    • Storage in SQLite database
    • Event publishing to Redis
  3. Persistence managed by:

    • Persistence service storing JSON metadata
    • Cloudflare worker creating PDF/screenshot captures
  4. Retrieval available through:

    • Browser extension UI
    • Direct API calls
    • Statistical dashboard

Usage Information

Setting Up the Elixir Daemon

cd elixir-daemon
mix deps.get
mix run --no-halt

Configuration (config/config.exs or environment variables):

  • HLTE_REDIS_URL: Redis connection URL
  • HLTE_SNS_WHITELIST_JSON: Email whitelist for SNS ingestion
  • Default port: 56555

Configuring Persistence Services

cd persistence
./run.sh

Requires Redis configured to match Elixir daemon settings.

Setting Up Bluesky Integration

Environment Variables:

  • BLUESKY_IDENT: Bluesky username
  • BLUESKY_PASS: Bluesky password
  • REDIS_URL: Redis connection URL
  • HLTE_USER_KEY: HLTE authentication key
  • HLTE_USER_URL: HLTE daemon URL
  • BSKYHLTE_POLLING_FREQ_SECONDS: Polling frequency (default: 67)

Deploying Cloudflare Worker

Configure in wrangler.toml:

  • R2 bucket settings
  • KV namespace for authentication tokens
  • Worker environment variables

Using the System

  1. Browser Extension:

    • Install the extension in your browser
    • Configure with your HLTE key and daemon URL
    • Highlight text on web pages to capture content
    • Access saved content through the extension
  2. Bluesky Integration:

    • Configure with your Bluesky account
    • Like posts on Bluesky to automatically capture them
    • Content is stored in your HLTE system
  3. Email Capture:

    • Send emails to your configured address with URLs
    • System automatically processes and stores content
    • Receive confirmation emails
  4. API Direct Access:

    • Submit content: POST to /save endpoint with content data
    • Retrieve content: GET from /entries with appropriate query parameters
    • All requests require authentication via key

Security Considerations

  • Authentication uses a cryptographic key system
  • Key storage permissions are strictly controlled (400)
  • Redis namespacing uses key hashing for isolation
  • Cloudflare worker uses token-based authentication

This system provides a comprehensive content capture, storage, and retrieval solution with multiple input methods and persistence strategies, allowing for flexible personal knowledge management across various platforms.


This document was produced by Claude Code.

Pinned Loading

  1. extension extension Public

    browser extension (firefox & chrome)

    JavaScript 2 1

  2. elixir-daemon elixir-daemon Public

    backend daemon (v2)

    Elixir 2 1

  3. persistence persistence Public

    media persistence worker

    JavaScript

  4. persist-cf-render-worker persist-cf-render-worker Public

    JavaScript

  5. tools tools Public

    hlte.net tools

    Elixir

  6. bluesky-likes bluesky-likes Public

    Monitors a user's Bluesky likes and automatically adds them to their HLTE

    TypeScript

Repositories

Showing 10 of 10 repositories
  • elixir-daemon Public

    backend daemon (v2)

    hlte-net/elixir-daemon’s past year of commit activity
    Elixir 2 1 0 0 Updated Apr 27, 2025
  • tags-react Public
    hlte-net/tags-react’s past year of commit activity
    JavaScript 0 0 0 0 Updated Apr 27, 2025
  • .github Public
    hlte-net/.github’s past year of commit activity
    0 0 0 0 Updated Apr 27, 2025
  • bluesky-likes Public

    Monitors a user's Bluesky likes and automatically adds them to their HLTE

    hlte-net/bluesky-likes’s past year of commit activity
    TypeScript 0 0 0 0 Updated Mar 28, 2025
  • persistence Public

    media persistence worker

    hlte-net/persistence’s past year of commit activity
    JavaScript 0 0 0 1 Updated Jan 22, 2025
  • hlte-fetch Public
    hlte-net/hlte-fetch’s past year of commit activity
    JavaScript 0 0 0 0 Updated Nov 21, 2024
  • hlte-net/persist-cf-render-worker’s past year of commit activity
    JavaScript 0 0 0 3 Updated Oct 19, 2024
  • extension Public

    browser extension (firefox & chrome)

    hlte-net/extension’s past year of commit activity
    JavaScript 2 1 0 0 Updated May 20, 2024
  • tools Public

    hlte.net tools

    hlte-net/tools’s past year of commit activity
    Elixir 0 0 0 0 Updated Jan 30, 2022
  • daemon Public archive

    backend daemon

    hlte-net/daemon’s past year of commit activity
    Go 0 0 0 0 Updated Jan 12, 2022

Top languages

Loading…

Most used topics

Loading…