| Age | Commit message (Collapse) | Author |
|
Add Drizzle migration to create the crdt_documents table with:
- UUID primary key with auto-generation
- Foreign key to users table with cascade delete
- Unique index on (user_id, entity_type, entity_id)
- Indexes for entity_type and sync_version queries
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
|
Add PostgreSQL schema for storing Automerge CRDT documents with
indexes for efficient querying by user, entity type, and sync version.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
|
- Store CRDT document binaries after successful push operations
- Update CRDT sync metadata (lastSyncAt, syncVersionWatermark) after sync
- Add getCrdtSyncStats(), clearCrdtState(), hasCrdtDocument() methods
- Add crdt_documents_stored event and crdtDocumentsStored to SyncResult
- Include all entity types in conflict resolution count
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
|
The ConflictResolver now defaults to CRDT strategy which uses Automerge
to merge local and server documents during sync conflicts. This provides
conflict-free resolution that preserves changes from both sides.
Key changes:
- Add CRDT merge methods for all entity types (deck, card, note, etc.)
- Update resolve methods to accept optional CRDT binary data
- Fall back to server_wins when CRDT data is unavailable or invalid
- Add comprehensive tests for CRDT conflict resolution scenarios
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
|
Add applyCrdtChanges function to process CRDT payloads received from
the server during pull operations. The function merges remote documents
with local ones using Automerge and stores the result in sync state.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
|
Add CRDT document generation to the sync push flow. Each pending entity
is now converted to an Automerge CRDT document and included as base64-
encoded binary in the push payload alongside the existing entity data.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
|
Add Phase 2 of the CRDT implementation:
- CRDT-aware repository wrappers for all entity types (Deck, Card, Note, etc.)
- Sync state management with IndexedDB storage for CRDT document binaries
- Base64 serialization utilities for network transport
- Comprehensive test coverage (53 new tests)
|
|
Implement document-manager.ts with core CRDT operations:
- Document creation, update, merge, save/load functions
- Conversion functions between local entities and CRDT documents
- Actor ID management for client identification
- Conflict detection utilities
Completes Phase 1 of CRDT implementation.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
|
Add CRDT document types for all entities (Deck, NoteType, NoteFieldType,
Note, NoteFieldValue, Card, ReviewLog) with LWW Register pattern.
Includes utility functions for document ID creation/parsing and metadata
management. Part of Phase 1 for CRDT-based sync implementation.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
|
Install @automerge/automerge, @automerge/automerge-repo, and
@automerge/automerge-repo-storage-indexeddb as the foundation
for replacing LWW conflict resolution with CRDT-based sync.
Includes tests verifying core Automerge functionality:
- Document creation and modification
- Change generation and application
- Concurrent change merging
- Serialization/deserialization
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
|
|
|
When a card is deleted, now also soft-deletes its parent Note and all
sibling cards (other cards generated from the same note). This matches
the specified behavior in the roadmap where deleting any card from a
note-based group should remove the entire note and all its cards.
Also adds tests for deletion constraint behaviors:
- NoteType deletion blocked when Notes exist
- NoteFieldType deletion blocked when NoteFieldValues exist
- Note deletion cascades to all related Cards
- Card deletion cascades to Note and sibling Cards
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
|
Add documentation for the Anki-compatible Note system:
- Note-Card architecture overview with entity relationships
- NoteType, NoteFieldType, Note, NoteFieldValue data models
- Updated Card model with note_id and is_reversed fields
- API endpoints for note types and notes
- Template rendering explanation
Also mark completed tasks in roadmap.md.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
|
|
|
Display note-based cards as grouped items showing all cards generated
from the same note, with note-level edit/delete actions. Legacy cards
without note association are shown separately with a "Legacy" badge.
- Add NoteGroupCard component for displaying note groups with card stats
- Add LegacyCardItem component for backward-compatible card display
- Add DeleteNoteModal for deleting notes and their cards
- Show Normal/Reversed badges for cards within note groups
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
|
Replace CreateCardModal with CreateNoteModal in DeckDetailPage. The new
modal allows users to select a note type and dynamically enter field
values based on the selected type's fields. Cards are auto-generated
from the note with preview of how many cards will be created.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
|
Add a comprehensive editor for note types that allows users to:
- Edit note type name and templates
- Add, remove, and reorder fields
- Toggle the reversible card option
The editor fetches note type details including fields from the API,
enabling full CRUD operations for note type configuration.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
|
Implement Phase 6 of the roadmap - NoteType list page with CRUD modals:
- NoteTypesPage displays all user's note types with templates and reversible badge
- CreateNoteTypeModal for creating new note types with templates
- EditNoteTypeModal for updating existing note types
- DeleteNoteTypeModal with constraint warning
- Navigation link from HomePage header
- Comprehensive tests for all components (65 new tests)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
|
|
|
Implement client-side repositories for NoteType, NoteFieldType, Note,
and NoteFieldValue with full CRUD operations and sync support. Includes
cascade soft-delete for notes (deletes related cards) and comprehensive
tests for all new repositories.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
|
Add LocalNoteType, LocalNoteFieldType, LocalNote, and LocalNoteFieldValue
interfaces and tables to the client database for Anki-compatible note
system. Update LocalCard interface with noteId and isReversed fields.
Includes Dexie schema version 2 with upgrade handler for existing cards.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
|
Update Card GET endpoint to return note and field values when available,
and Study GET endpoint to include note data for card display rendering.
This enables the frontend to render note-based cards with their templates.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
|
Implement REST API endpoints for managing note types and their fields:
- CRUD operations for note types (/api/note-types)
- Field management nested under note types (add, update, delete, reorder)
- Constraint checks to prevent deletion of note types with existing notes
- Constraint checks to prevent deletion of fields with existing values
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
|
Add noteId and isReversed fields to Card interface for note-based cards.
Implement findByIdWithNoteData, findByNoteId, and softDeleteByNoteId
methods to support fetching cards with their associated note data and
cascading deletions.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
|
Implement repository layer for Note feature (Phase 2 of roadmap):
- Add NoteTypeRepository with CRUD, findByIdWithFields, hasNotes
- Add NoteFieldTypeRepository with CRUD, reorder, hasNoteFieldValues
- Add type definitions for NoteType, NoteFieldType, NoteTypeWithFields
- Add unit tests for mock factories and interface contracts
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
|
|
|
Remove the unused Anki import functionality including parser,
tests, and CLI script. Update documentation to reflect removal.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
|
Roadmap served its purpose through development phases. Added a
feature list in docs/manual for users to understand capabilities.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
|
The add-user.ts script required only 8 characters while createUserSchema
required 15. Now both enforce the same minimum of 15 characters for
stronger password security.
🤖 Generated with [Claude Code](https://claude.ai/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
|
Previously, when updating an existing card during sync push, only the
target deck ownership was verified. This allowed a user who knew another
user's card ID to potentially update that card by specifying their own
deck. Now the query joins with decks table to verify the existing card
belongs to the current user.
🤖 Generated with [Claude Code](https://claude.ai/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
|
- Add rate limiting to login endpoint (5 requests/minute per IP)
- Configure CORS middleware with environment-based origin control
- Expose rate limit headers in CORS for client visibility
- Update hono to 4.11.3 for rate limiter peer dependency
🤖 Generated with [Claude Code](https://claude.ai/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
|
|
|
Add CLI script to import .apkg files into Kioku. The script parses
Anki packages using the existing parser, maps notes/cards to Kioku
format, and bulk inserts them into the database for a specified user.
Usage: pnpm anki:import [file.apkg]
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
|
Add mapAnkiToKioku function that converts parsed Anki packages to
Kioku's internal data format. Includes:
- HTML stripping and entity decoding for card fields
- Anki factor to FSRS difficulty conversion
- Anki interval to FSRS stability estimation
- Due date conversion for different card types
- Option to skip default Anki deck
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
|
Implement ZIP extraction and SQLite database reading for Anki package
files. The parser extracts notes, cards, decks, and models from .apkg
files using Node.js native node:sqlite module.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
|
|
|
|
|
Displays a prominent banner at the top of all pages when the user
is offline, informing them that changes will sync when reconnected.
Shows pending change count when applicable.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
|
Add SyncButton component that allows users to manually trigger
data synchronization. The button is disabled when offline or
when sync is already in progress.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
|
Add SyncStatusIndicator component to display current sync state in the
UI header. The component shows online/offline status, syncing progress,
pending changes count, and sync errors.
- Create SyncProvider context to wrap SyncManager for React components
- Add SyncStatusIndicator component with visual status indicators
- Integrate indicator into HomePage header
- Add comprehensive tests for SyncStatusIndicator and SyncProvider
- Update existing tests to include SyncProvider wrapper
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
|
Implements SyncManager class that orchestrates the sync process:
- Monitors online/offline network status
- Triggers debounced sync when coming back online
- Coordinates push, pull, and conflict resolution
- Provides event subscription for sync status updates
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
|
Implement ConflictResolver class with Last-Write-Wins (LWW) strategy:
- Detect conflicts from push results
- Support multiple strategies: server_wins, local_wins, newer_wins
- Resolve deck and card conflicts using server data from pull
- Default to server_wins (LWW) for consistent conflict handling
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
|
Implement PullService class to pull changes from server:
- Fetch changes since last sync version
- Convert server data format to local IndexedDB format
- Apply pulled decks, cards, and review logs to local database
- Update sync version after successful pull
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
|
Implement PushService class to push local changes to server:
- Convert local decks, cards, and review logs to API format
- Push pending changes to server endpoint
- Mark items as synced after successful push
- Return conflicts reported by server (LWW resolution)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
|
Implement SyncQueue class to manage pending changes for offline sync:
- Track unsynced decks, cards, and review logs from IndexedDB
- Manage sync status (idle, syncing, error) with listener support
- Persist last sync version and timestamp to localStorage
- Provide methods to mark items as synced after push
- Apply pulled changes from server to local database
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
|
Implement sync pull endpoint to fetch entities updated since a given
syncVersion. Returns decks, cards, and review logs with their current
sync versions for incremental client synchronization.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
|
Implement sync push endpoint with Last-Write-Wins conflict resolution.
Includes Zod validation for decks, cards, and review logs.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
|
Add localDeckRepository, localCardRepository, and localReviewLogRepository
with full CRUD operations for offline support. Includes sync tracking
with _synced flag and methods for finding unsynced items.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
|
Set up Dexie database with LocalDeck, LocalCard, and LocalReviewLog
tables for offline support. Each entity includes _synced flag for
tracking synchronization status.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
|
Verify vite-plugin-pwa manifest settings, workbox caching patterns,
offline fallback page, and icon configuration.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|