Phase 3: Graph view, backlinks, quick switcher, export

- Add outgoing_links (JSON) and backlinks_count to Document model
- POST /documents/{id}/detect-links — detect [[uuid]] patterns in content
- GET /documents/{id}/backlinks — documents referencing this doc
- GET /documents/{id}/outgoing-links — documents this doc references
- GET /documents/{id}/links — combined incoming + outgoing
- GET /projects/{id}/graph — full project relationship graph
- GET /search/quick — fuzzy search (Quick Switcher Cmd+K)
- GET /projects/{id}/documents/search — project-scoped search
- GET /documents/{id}/export — markdown|json export
- GET /projects/{id}/export — json|zip export
- 27 new tests
This commit is contained in:
Motoko
2026-03-30 23:46:45 +00:00
parent 202e70b4a8
commit 07f9ac91fc
9 changed files with 1887 additions and 6 deletions

View File

@@ -8,7 +8,7 @@ from fastapi.responses import JSONResponse
from app.config import settings
from app.database import init_db, get_db, async_engine
from app.routers import auth, projects, folders, documents, tags, search
from app.routers import auth, projects, folders, documents, tags, search, links, export
from app.services.auth import cleanup_expired_blocklist
@@ -45,6 +45,8 @@ app.include_router(folders.router)
app.include_router(documents.router)
app.include_router(tags.router)
app.include_router(search.router)
app.include_router(links.router)
app.include_router(export.router)
@app.get("/api/v1/health")