feat: MVP-3 Sprint 4 - Co-usage, metrics, centrality, creation source, feature flags

- Add NoteCoUsage model and co-usage tracking when viewing notes
- Add creationSource field to notes (form/quick/import)
- Add dashboard metrics API (/api/metrics)
- Add centrality calculation (/api/centrality)
- Add feature flags system for toggling features
- Add multiline QuickAdd with smart paste type detection
- Add internal link suggestions while editing notes
- Add type inference for automatic note type detection
- Add comprehensive tests for type-inference and link-suggestions

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-22 16:50:40 -03:00
parent ef0aebf510
commit ff7223bfea
20 changed files with 1388 additions and 54 deletions

View File

@@ -0,0 +1,16 @@
import { NextRequest } from 'next/server'
import { getCentralNotes } from '@/lib/centrality'
import { createErrorResponse, createSuccessResponse } from '@/lib/errors'
export async function GET(req: NextRequest) {
try {
const { searchParams } = new URL(req.url)
const limit = parseInt(searchParams.get('limit') || '10', 10)
const centralNotes = await getCentralNotes(limit)
return createSuccessResponse(centralNotes)
} catch (error) {
return createErrorResponse(error)
}
}