# CrossPoint Articles Val Town service that fetches bookmarked articles tagged "toread" from your Kipclip (AT Protocol) account, converts them to EPUBs, and serves them to the CrossPoint e-reader. ## How it works 1. A cron job runs every hour, reading `community.lexicon.bookmarks.bookmark` records from your AT Proto repo 2. Filters for bookmarks with the configured tag (default: "toread") 3. Fetches article HTML and cleans it with Mozilla Readability 4. Generates minimal EPUB files, stored in Val Town Blob storage 5. The e-reader fetches the article list and downloads EPUBs via HTTP ## API Base URL: https://crosspoint.val.run/ | Endpoint | Description | |---|---| | `GET /` | HTML page listing articles with EPUB download links | | `GET /health` | Service health check (includes last sync time) | | `GET /sync` | Returns JSON list of available articles | | `GET /article/:filename` | Downloads an EPUB file | ### GET /sync response ```json [ { "id": "3abc...", "filename": "kipclip-3abc.epub", "title": "Article Title", "url": "https://example.com/article", "createdAt": "2026-04-09T12:00:00Z" } ] ``` ## Environment Variables Set these in the Val Town secrets UI: | Variable | Required | Default | Description | |---|---|---|---| | `ATPROTO_HANDLE` | Yes | — | Your AT Protocol handle (e.g. `tijs.org`) | | `TAG_FILTER` | No | `toread` | Bookmark tag to filter by | | `MAX_ARTICLES` | No | `50` | Maximum articles returned by /sync | ## Deploy ```bash deno task deploy ``` ## Device Configuration On the CrossPoint e-reader, set the backend URL in Settings: ``` https://crosspoint.val.run ```