3D knowledge graph visualization with Express API and PostgreSQL backend. Extracted from MF0-1984 project.
- 3D force-directed graph (3d-force-graph)
- Brain visualization mode (Three.js)
- Node CRUD: merge, delete, rename
- Edge operations: delete, move
- Text-based search
- Hemisphere assignment for brain visualization
- S3 sync — auto-import from TRIZ Wiki (Cloudflare R2)
npm install- Copy
.env.exampleto.env, set DATABASE_URL and S3 credentials npm run dev(development) ornpm run build && npm start(production)
GET /api/memory-graph— full graphPOST /api/memory-graph/ingest— add nodes/edges/commandsPOST /api/memory-graph/import— replace entire graph (JSON)PATCH /api/memory-graph/nodes/:id/hemisphere— set hemispherePOST /api/memory-graph/search— text searchGET /api/brain/visual— brain visualization dataGET /api/brain/hemisphere-counts— hemisphere countsPOST /api/brain/calibrate— calibrate brain positions
POST /api/sync— full sync from TRIZ Wiki (replaces graph)- Body:
{ "includeContent": false }— settrueto fetch article text as blob (slower)
- Body:
POST /api/sync/ingest— add wiki articles without replacing existing graph
# Full import from wiki (nodes + links, no content)
curl -X POST http://localhost:3000/api/sync
# Full import with article content (first 200 articles)
curl -X POST http://localhost:3000/api/sync -H "Content-Type: application/json" -d '{"includeContent":true}'| Variable | Description |
|---|---|
PORT |
Server port (default: 3000) |
DATABASE_URL |
PostgreSQL connection string |
S3_ENDPOINT |
Cloudflare R2 endpoint URL |
S3_ACCESS_KEY_ID |
S3 access key |
S3_SECRET_ACCESS_KEY |
S3 secret key |
- Якорь — root articles (00_якорь)
- Ядро — fundamental laws, principles (01_ядро)
- Методологии — tools and approaches (02_методологии, 02_широкие_темы)
- Практики — cases, analysis, patents (03_практики)
- Контекст — participants, competitors, platform (04_контекст)
- Медиа — images and diagrams
- Другое — uncategorized
- Connect repo to Railway
- Add PostgreSQL plugin
- Set environment variables (DATABASE_URL, S3_*)
- Deploy
- Run
curl -X POST https://your-app.up.railway.app/api/syncto import wiki