SCMS [SCMS] Add admin endpoint to sync Lab Notes from filesystem 🔄#15
Merged
AdaInTheLab merged 1 commit intomainfrom Jan 7, 2026
Merged
SCMS [SCMS] Add admin endpoint to sync Lab Notes from filesystem 🔄#15AdaInTheLab merged 1 commit intomainfrom
AdaInTheLab merged 1 commit intomainfrom
Conversation
- Add POST /admin/notes/sync (auth-gated) - Read LABNOTES_DIR and ingest Markdown → HTML → DB upsert - Return deterministic JSON summary (scanned/upserted/skipped/errors) co-authored-by: Lyric <lyric@thehumanpatternlab.com> co-authored-by: Carmel <carmel@thehumanpatternlab.com>
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 & Why
This PR introduces an explicit, admin-controlled sync mechanism for ingesting Lab Notes from Markdown files on the server into the API database.
Markdown files are now deployed into the API filesystem by the main site. This PR completes the loop by giving the API a deliberate, observable way to convert that content into runtime data.
No background jobs. No deploy-time side effects. No hidden behavior.
🔁 What changed
LABNOTES_DIRlab_notes🧩 How it fits into the system
End-to-end Lab Notes flow:
/lab-notesendpoints serve synced dataThis preserves a clean separation of responsibilities:
🛡 Guardrails
🧪 How to verify
LABNOTES_DIRis set in API env/api/lab-notesreflects new/updated entries🗒 Notes
(slug, locale)uniquenessThis PR establishes the canonical ingestion path for Lab Notes going forward.