
thrylen-qeeg-portal
by DMontgomery40
SKILL.md
name: thrylen-qeeg-portal description: "Maintain the Thrylen qEEG clinician portal hosted on Netlify (thrylen.com/qeeg and optionally qeeg.thrylen.com): shared login, patient folders (MM-DD-YYYY-N), versioned file uploads, and authenticated downloads backed by Netlify Blobs. Use when updating portal UI, functions, env vars, blob storage layout, or deployments."
Thrylen qEEG Portal (Netlify)
Overview
Operate the qEEG clinician portal served from the thrylen repo via Netlify: password login, patient folders, versioned file uploads, and authenticated downloads backed by Netlify Blobs.
Key Locations
- Repo root:
/Users/davidmontgomery/thrylen - Portal UI (static):
public/qeeg/* - Netlify functions:
netlify/functions/qeeg-*.jsandnetlify/functions/_shared/qeeg.js - Routing:
netlify.toml - Local→Netlify sync helpers:
scripts/qeeg_patients_sync.mjs,scripts/qeeg_patients_watch.mjs
Local (gitignored) clinician-share staging folder:
/Users/davidmontgomery/qEEG-analysis/data/portal_patients/<MM-DD-YYYY-N>/
URLs And Routing
- Main portal:
https://thrylen.com/qeeg/ - Optional:
https://qeeg.thrylen.com/(add domain + DNS in Netlify;netlify.tomlalready rewrites/on that host to/qeeg/index.html) - API functions:
/.netlify/functions/qeeg-*
Netlify Environment Variables (Do Not Commit)
QEEG_PORTAL_USERNAME(defaultclinic)QEEG_PORTAL_PASSWORD(secret)QEEG_AUTH_KEY(secret; signing key for theqeeg_sessioncookie)QEEG_BLOBS_STORE(defaultqeeg-portal)QEEG_AUTH_RATE_STORE(optional; defaultqeeg-auth-rate)
Run Netlify env commands from /Users/davidmontgomery/thrylen after netlify link:
netlify env:set QEEG_PORTAL_PASSWORD '...' --context production --scope functions
Deploy
cd /Users/davidmontgomery/thrylen
netlify deploy --prod --dir public --functions netlify/functions --no-build
Publish Local Patient Folders To Netlify
Sync everything once:
cd /Users/davidmontgomery/thrylen
npm run qeeg:patients:sync -- --dir /Users/davidmontgomery/qEEG-analysis/data/portal_patients
Watch for changes and auto-upload new versions:
cd /Users/davidmontgomery/thrylen
npm run qeeg:patients:watch -- --dir /Users/davidmontgomery/qEEG-analysis/data/portal_patients
Blob Storage Layout
Patient folders (all artifacts live under a patient ID):
- Patient meta:
patients/<MM-DD-YYYY-N>/$meta.json - Optional index (fallback listing):
patients/<MM-DD-YYYY-N>/$index.json - Files:
patients/<MM-DD-YYYY-N>/files/<patientId>__<name>__v<version>__YYYY-MM-DD.<ext>
Files store user metadata (encoded in x-amz-meta-user) including originalName, logicalName, version, uploadedAt, uploadedBy, size, contentType.
API Endpoints (Functions)
- Auth:
qeeg-login,qeeg-me,qeeg-logout - Patients:
qeeg-patients(list folders),qeeg-patient-files(list files) - Upload:
qeeg-upload(multipart form upload; stores files into Blobs under the patient folder) - Download:
qeeg-download(auth-gated redirect to signed URL)
Notes On Netlify Limits
- Downloads use signed URLs (large-friendly).
- Browser uploads go through Netlify Functions, so keep portal uploads small (PDFs/notes). For larger items (especially MP4), publish via the local sync tool (
qeeg:patients:sync/qeeg:patients:watch).
Troubleshooting
- “No project id found”: run commands inside
/Users/davidmontgomery/thrylen(or runnetlify link). - Login fails: verify
QEEG_PORTAL_USERNAME,QEEG_PORTAL_PASSWORD, andQEEG_AUTH_KEYare set for Functions scope. - Upload fails (browser): check function logs for
qeeg-uploadand look for CORS errors on the signed upload URL PUT. - Files missing: confirm blobs exist under the
patients/prefix and thatqeeg-patientscan list them.
Score
Total Score
Based on repository quality metrics
SKILL.mdファイルが含まれている
ライセンスが設定されている
100文字以上の説明がある
GitHub Stars 100以上
3ヶ月以内に更新がある
10回以上フォークされている
オープンIssueが50未満
プログラミング言語が設定されている
1つ以上のタグが設定されている
Reviews
Reviews coming soon