Conversation
Author
|
Demo of how the frontend looks like: https://youtu.be/GS7K76kAdq8 |
added 7 commits
September 5, 2026 07:32
- Create documents and document_tags tables - Add per-user unique slug index (scoped by user_id) - Add visibility column with public/protected/private check constraint Signed-off-by: Alexander Bokovoy <ab@vda.li>
- Document model with CRUD, tag management, hierarchy, and slug generation - DbAdapter documents trait with scoped queries (per-user slugs, tags, tree) - Serializer with visibility, username, and documentsUrl fields Signed-off-by: Alexander Bokovoy <ab@vda.li>
- Create endpoint: POST /v5/documents - List endpoint: GET /v5/documents - Get by ID: GET /v5/documents/:docId - Update endpoint: PUT /v5/documents/:docId - Delete endpoint: DELETE /v5/documents/:docId - Tree endpoint: GET /v5/documents/tree - Public URL: GET /docs/:slug and /docs/:username/:slug - All handlers enforce auth and owner-only access - Visibility checks on public endpoints Signed-off-by: Alexander Bokovoy <ab@vda.li>
… API v5 - Register documentsTrait in DbAdapter composition - Export Document model from models.js - Export DocumentsController from controllers.js - Register DocumentsRoute in public router - Add /docs/:username/:slug public middleware - Bump API_VERSION_ACTUAL to 5 Signed-off-by: Alexander Bokovoy <ab@vda.li>
- Document class definition with all fields and methods - DbAdapter document query method signatures Signed-off-by: Alexander Bokovoy <ab@vda.li>
…public URLs - Test create, read, update, delete with auth enforcement - Test auto-slug generation, custom slugs, and per-user deduplication - Test tag association and listing - Test hierarchy tree structure - Test public URL access and unpublished document 404s Signed-off-by: Alexander Bokovoy <ab@vda.li>
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.
Implements server side of #702