Commit Graph

16 Commits

Author SHA1 Message Date
Gigi
06116c3665 chore: update deps (npm update) and dedupe; lint+types clean 2025-10-07 06:47:01 +01:00
Gigi
6bf31c124c build: patch applesauce-core dist to avoid async-event-store re-export during bundling
- Remove re-export of async-event-store.js in event-store/index.js
- This is applied via patch-package in postinstall later (to be added)
2025-10-07 06:21:21 +01:00
Gigi
9b0c59b1ae feat: add native support for rendering Nostr long-form articles (NIP-23)
- Install react-router-dom for routing support
- Create Article component to decode naddr and fetch/render articles
- Add /a/:naddr route to App.tsx for article viewing
- Use applesauce relay pool patterns for event fetching
- Render articles with markdown using ReactMarkdown
- Support article metadata (title, image, published date, summary)
2025-10-05 08:08:34 +01:00
Gigi
cc0b27f7cd fix: replace custom reading time with reading-time-estimator package
- Remove custom readingTime.ts implementation
- Install reading-time-estimator package (browser-compatible)
- Update ContentPanel to use named import from reading-time-estimator
- Fixes browser compatibility issues with reading-time package
- All linting and type checks pass
2025-10-05 03:35:22 +01:00
Gigi
2719ad3602 feat: add reading time estimate to articles
- Install reading-time package
- Calculate reading time from article content (html or markdown)
- Display reading time with clock icon in article header
- Strip HTML tags for accurate word count
- Style reading-time indicator similar to highlights
- Shows estimated reading time (e.g., '5 min read')
2025-10-05 03:28:36 +01:00
Gigi
1b8c276529 chore: upgrade applesauce packages to v4.0.0
- Update all applesauce packages from 3.1.0 to 4.0.0
- Add applesauce-factory dependency
- Version 4.0.0 includes app-data helpers needed for NIP-78
2025-10-05 02:35:28 +01:00
Gigi
5ea81bda8e fix(deps): replace relative-time with date-fns for timestamp formatting
- Replace relative-time package (which uses Temporal API) with date-fns
- Update formatDate to use formatDistanceToNow from date-fns
- Remove relative-time type declarations
- Apply fix to both helpers.ts and bookmarkUtils.tsx
- Fix runtime error: relative-time expects Temporal objects, not Date objects
- date-fns provides better compatibility with current JavaScript standards
2025-10-03 09:25:05 +02:00
Gigi
0d956ed692 feat(ui): display timestamps as relative time
- Install relative-time package from npm
- Update formatDate functions to use relative-time instead of toLocaleDateString
- Add TypeScript type definitions for relative-time module
- Show human-friendly relative times (e.g., '2 hours ago', 'yesterday')
- Apply to all timestamp displays (bookmark dates, created dates)
2025-10-03 02:03:31 +02:00
Gigi
7d26372878 feat(ui): add FontAwesome globe/lock icons; render content identically for private/public 2025-10-02 10:44:06 +02:00
Gigi
8058a99cf2 improve: optimize applesauce-relay usage following documentation patterns
- Create relay group using pool.group() for better event deduplication
- Follow applesauce-relay documentation for relay group management
- Remove manual relay connection monitoring (handled by pool)
- Use pool directly with address loader for optimal performance
- Add logging for relay group creation
- Maintain extraRelays configuration for address loader
- Follow applesauce-relay best practices for relay pool usage

This follows the applesauce-relay documentation exactly as shown
in the Relay Group example, providing better deduplication and
connection management.
2025-10-02 08:37:05 +02:00
Gigi
c1e0e82704 feat: integrate applesauce-content for proper content parsing and rendering
- Install applesauce-content package for content parsing
- Use getParsedContent() to parse nostr content according to applesauce patterns
- Create proper TypeScript interfaces for ParsedNode and ParsedContent
- Add renderParsedContent() component to render parsed content with proper styling
- Handle mentions, links, and text content with appropriate styling
- Add CSS styles for nostr-mention and nostr-link classes
- Follow applesauce-content documentation patterns for content rendering
- Maintain type safety with proper interfaces instead of 'any' types

This follows the applesauce-content documentation exactly as shown
in the examples, providing proper content parsing and rendering.
2025-10-02 08:33:00 +02:00
Gigi
b4ce082b91 refactor: use proper applesauce-loaders for NIP-51 bookmark fetching
- Replace manual event fetching with applesauce Address Loader
- Use Loaders.createAddressLoader() for proper replaceable event loading
- Configure loader with eventStore, bufferTime, and relay hints
- Remove manual RxJS subscription handling in favor of applesauce patterns
- Add applesauce-loaders dependency for specialized loading methods
- Clean up unused imports and variables
- Follow applesauce best practices for event loading

This implements the proper applesauce pattern for fetching kind:10003
bookmark events as recommended in the applesauce-loaders documentation.
2025-10-02 07:29:37 +02:00
Gigi
b245a11ade fix: implement proper NIP-51 bookmark fetching from nostr relays
- Add RelayPool to connect to nostr relays (damus.io, nos.lol, snort.social)
- Fix bookmark fetching to actually query relays instead of empty local store
- Use eventStore.filters() with Observable subscription to fetch kind 10003 events
- Add proper RxJS imports for takeUntil and timer
- Implement 5-second timeout for relay queries
- Add applesauce-relay dependency for relay connectivity
- Fix critical bug where bookmarks were never fetched from network

This ensures we're actually displaying kind:10003 bookmark events from the
logged-in user as specified in NIP-51, not just querying an empty local store.
2025-10-02 07:28:12 +02:00
Gigi
0369ece6f4 refactor: migrate to applesauce-accounts for proper account management
- Replace manual WebSocket connections with applesauce-accounts
- Use ExtensionAccount.fromExtension() for nostr browser extension integration
- Add AccountsProvider to component tree for account management
- Use useActiveAccount hook to get current user account
- Simplify user display to show formatted public key (profile fetching TODO)
- Remove manual profile fetching WebSocket code
- Improve architecture with proper applesauce account system
- Add applesauce-accounts dependency to package.json

This provides a more robust and standardized approach to nostr account
management using the applesauce ecosystem.
2025-10-02 07:24:37 +02:00
Gigi
16a95facc5 chore: remove vite cache files from tracking
- Remove .vite/deps_temp_* files that were previously tracked
- These files are now properly ignored by .gitignore
- Clean up repository to exclude build artifacts
2025-10-02 07:18:18 +02:00
Gigi
5d53a827e0 feat: initialize markr nostr bookmark client
- Add project structure with TypeScript, React, and Vite
- Implement nostr authentication using browser extension (NIP-07)
- Add NIP-51 compliant bookmark fetching and display
- Create minimal UI with login and bookmark components
- Integrate applesauce-core and applesauce-react libraries
- Add responsive styling with dark/light mode support
- Include comprehensive README with setup instructions

This is a minimal MVP for a nostr bookmark client that allows users to
view their bookmarks according to NIP-51 specification.
2025-10-02 07:17:07 +02:00