Markdown knowledge vaults for Myelin β wikilinks, mindmaps and public wikis
137
Markdown vaults companion to Myelinβ . Notes live in MySQL; creating notes never creates PM work β push project/task is always an explicit manual action.
This project is a work in progress β bugs may still be found; please report them on GitHub.
meta/risks), note tree (folders first), vault switcher[[links]] (path + unique leaf), tags, backlinks, focused + full mindmap; boardβnote links show as (board) in References![[Whiteboard title]] embeds a read-only board mid-note (preview, peek, wiki, password share); plain [[Whiteboard]] stays a link/s/:token); Send copy/move to another vault (same Share modal)/w/:slug/w lists wikis you may open (not unlisted); private wikis only if shared with youtodos: β review/merge before save; never auto-appliespt_β¦ API key (Profile); manual vaultβproject link; Synapse refs on PM tasks| Component | Technology |
|---|---|
| Frontend | Next.js 16, React 19, TypeScript, Tailwind CSS |
| Backend | Node.js, Express 5, TypeScript (custom server) |
| Database | MySQL 8+ |
| Auth | Local password + optional PM SSO; JWT session cookie |
| Markdown | marked + Synapse extras (wikilinks, ![[board]] embeds, tags, checkboxes, Mermaid, KaTeX, highlight, callouts, footnotes, TOC) |
| Whiteboards | @excalidraw/excalidraw (fonts copied to public/excalidraw on install / Docker build) |
mysql -u root -p < server/database/scripts/bootstrap.sql
That creates DB pm_synapse and user synapse / password change-me-synapse-db-password (edit the SQL first if you want another password).
Or run manually:
CREATE DATABASE IF NOT EXISTS pm_synapse CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
CREATE USER IF NOT EXISTS 'synapse'@'localhost' IDENTIFIED BY 'your-password';
GRANT ALL PRIVILEGES ON pm_synapse.* TO 'synapse'@'localhost';
FLUSH PRIVILEGES;
cp .env.example .env
PORT=3010
JWT_SECRET=change-me-synapse-jwt-secret
DB_HOST=localhost
DB_PORT=3306
DB_USER=synapse
DB_PASSWORD=change-me-synapse-db-password
DB_NAME=pm_synapse
PM_BASE_URL=http://localhost:3000
SSO_CLIENT_ID=synapse
SSO_CLIENT_SECRET=change-me-synapse-sso-secret
NEXT_PUBLIC_APP_URL=http://localhost:3010
ALLOWED_SSO_REDIRECTS=http://localhost:3010/api/auth/sso/callback
SSO_CLIENT_ID=synapse
SSO_CLIENT_SECRET=change-me-synapse-sso-secret
pnpm install --ignore-workspace
pnpm run dev
Open http://localhost:3010β β register a local account (first user becomes admin) and/or sign in with Myelin. Admins manage registration, SMTP, and users under Settings. Each user manages their personal Myelin API token under Profile. Local and SSO accounts with the same email are linked.
Note: TypeScript must stay on 5.x ([email protected]) β Next.js 16 does not support TypeScript 7.
Build and push (same pattern as Myelin):
cp .env.docker.example .env.docker
# edit secrets + PM_BASE_URL / SSO / NEXT_PUBLIC_APP_URL
sg docker -c "./docker-build.sh" # or: ./docker-build.sh 0.1.0
DOCKER_USERNAME=youruser docker compose up -d
curl -s http://localhost:3010/health
See DEPLOYMENT.mdβ for compose ports, volumes, and SSO checklist.
| Variable | Required | Default | Description |
|---|---|---|---|
PORT | No | 3010 | Synapse HTTP port |
JWT_SECRET | Yes | β | Session JWT secret |
DB_HOST / DB_PORT / DB_USER / DB_PASSWORD / DB_NAME | Yes | β | MySQL connection |
DB_PROVIDER | No | mysql | Database provider |
PM_BASE_URL | Yes | β | Myelin base URL |
SSO_CLIENT_ID | Yes | synapse | Must match PM SSO client |
SSO_CLIENT_SECRET | Yes | β | Must match PM SSO_CLIENT_SECRET |
ENCRYPTION_KEY | No | β | Token encryption (falls back to JWT_SECRET) |
NEXT_PUBLIC_APP_URL | Yes | β | Public Synapse URL (SSO redirect) |
NEXT_PUBLIC_PM_BASE_URL | No | β | Optional PM link base in the UI |
| Port | Description |
|---|---|
3010 | Synapse (frontend + API) |
3000 | Myelin (SSO issuer) |
3306 | MySQL |
+---------------------------+ +----------------------------+
| synapse | SSO + | myelin |
| Next.js + Express :3010 | REST β | Next.js + Express :3000 |
| MySQL: pm_synapse | | MySQL/MSSQL |
+---------------------------+ +----------------------------+
Notes and vault ACLs live only in Synapse. Task/project create goes through Myelinβs authenticated APIs with the userβs SSO token.
| Vault default visibility | Open /w/:slug | Listed on /w |
|---|---|---|
| private | Share Read / Edit / Owner only | Only for those with access |
| authenticated | Any signed-in Synapse user | Yes (when signed in) |
| unlisted | Anyone with the link | No |
| public | Everyone | Yes |
Share Read = wiki only (no vault editor). Share Edit / owner = vault app + wiki. Per-note visibility filters content inside an accessible wiki; private notes are visible on the wiki only to Edit/Owner (not Share Read).
| Syntax | Result |
|---|---|
[[Note title]] / [[folder/note]] | Wikilink (open / peek) |
[[@vault-slug/note]] | Cross-vault wikilink |
![[Whiteboard title]] | Embed whiteboard mid-note (whiteboard kind only) |
#tag | Inline tag |
- [ ] / - [x] | Checklist (optional PM push) |
 | Vault image |
[file.pdf](/api/vaults/:id/media/:id) | Attachment link |
Password share links: Shareβ¦ β Link creates /s/:token (password + expiry). Shared notes that embed boards include board JSON in the unlock payload so guests do not need vault API access.
.cursor/rules/ + .github/prompts/ β conventions and task skillsThis folder can be moved to its own git repository (synapse) when ready. Keep docs/PM_API_CONTRACT.md in sync whenever Synapseβs PM client changes.
Content type
Image
Digest
sha256:478b28b3dβ¦
Size
356.7 MB
Last updated
1 day ago
docker pull tiag0ss/synapse