chore: pivot data layer to Nostr protocol (Note foundation)#1
Open
samarthsinh2660 wants to merge 1 commit into
Open
chore: pivot data layer to Nostr protocol (Note foundation)#1samarthsinh2660 wants to merge 1 commit into
samarthsinh2660 wants to merge 1 commit into
Conversation
…ove the post and comment
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed and why
This PR establishes the Note data layer foundation for the Nostr protocol
and fixes a critical build toolchain incompatibility.
Deleted
PostModel,PostEntity,PostRepository,PostUseCaseCommentModel,CommentEntity,CommentRepository,CommentUseCasePostInput,CommentInputIn Nostr, everything is a Kind 1 Note. A "post" is a note with no parent.
A "comment" is a note with
rootEventIdset. No separate models needed —this removes the redundancy.
Added
lib/core/enum/note_type.dart—text | image | link | referencelib/data/models/note_model.dart— Isar collection for Kind 1 noteslib/data/models/note_model.g.dart— generated Isar schemalib/domain/entities/note/note_entity.dart— freezed domain entitylib/domain/entities/note/note_entity.freezed.dart— generatedlib/domain/repositories/note_repository.dart— abstract interfacelib/data/repositories/note_repository_impl.dart— Isar implementationCLAUDE.md— architecture context file (module map, layer rules, DO/NEVERlist)
Modified
pubspec.yaml— Three dependency changes:isar→isar_community 3.3.2Isar 3.x is unmaintained and incompatible with Dart 3.11 — build_runner
crashes. The community fork is a drop-in replacement with the same API.
freezed→^3.0.0,freezed_annotation→^3.0.0Required by isar_community_generator (both need build ^4.x).
build_runner→^2.13.0Older versions crash on Dart 3.11 due to a missing SDK snapshot file.
All
*.freezed.dartand*.g.dartdiffs — Auto-regenerated bybuild_runner after the freezed 2.x → 3.x upgrade. Logic is unchanged,
only the generated boilerplate format changed.
local_datasource.dart— AddedNoteModelSchematoIsar.open()..gitignore— Addeddocs/anduniun/(local files, not for VCS).What is NOT changed