Add backend API and realtime support for document creation and sharing.#34
Merged
Conversation
There was a problem hiding this comment.
Code Review
This pull request implements a document management system featuring CRUD operations, soft-delete with a trash retention policy, and a collaborator-based sharing model. It introduces Document and DocumentCollaborator entities, their respective services and controllers, and a scheduled task for purging expired documents. Additionally, the realtime server is updated to enforce JWT-based authentication and access checks. Feedback focuses on eliminating redundant timestamp logic, specifically manual assignments in the service layer and database triggers that duplicate Hibernate's automatic timestamp management.
Establishes the core persistence model for documents and collaborators. Adds migrations for base documents, source-local-id idempotency, trash metadata, and sharing tables. Introduces entity and repository layers with indexes optimized for listing, lookup, and purge flows.
…idation. Introduces request/response DTOs for document CRUD, bulk import, collaborator management, and sharing settings. Adds a generic paged response wrapper for consistent list endpoint payloads and cross-field validation for general-access/link-access combinations.
Registers document properties and scheduled execution support in application bootstrap. Adds configurable trash retention and purge cron settings with environment overrides for runtime flexibility.
…ort. Implements document create/list/get/update/delete, restore, and permanent-delete flows. Adds bulk import with source-local-id upsert semantics and retention-based trash purge handling, with service-level tests.
…ulk import. Adds controller endpoints for document CRUD, public fetch, trash listing, restore, and bulk import workflows. Uses consistent API envelopes and paged responses, and includes controller tests for auth and primary success paths.
647f6a8 to
b95c89d
Compare
…s logic. Implements collaborator add/update/remove and owner-controlled sharing operations. Computes effective access across owner, collaborator, and general-link permissions, with service tests for precedence and constraints.
Adds sharing endpoints for collaborators, sharing settings, shared-with-me listing, and access checks. Wires validation and consistent API envelopes, and adds controller tests for success and auth enforcement.
Updates security rules to allow controlled public document reads on the public route. Extends rate limiting to include public reads with scoped keys and adds filter tests for acceptance, rejection, and path edge cases.
Adds websocket authentication by validating room access against the API before connection setup. Introduces periodic access revalidation, fetch timeout handling, and config/test updates for authenticated connection scenarios.
…ields. Adds per-connection access-level state and blocks disallowed sync/awareness messages for restricted users. Adds access update signaling and tests for blocked writes, allowed sync behavior, and permission upgrades.
b95c89d to
a6897c0
Compare
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.
This pull request implements a document management system featuring CRUD operations, soft-delete with a trash retention policy, and a collaborator-based sharing model.