feat: revamp to dynamic database-first architecture and cleanup phase docs
CI / typecheck + build (turbo) (push) Canceled after 0s

- Migrate document fetching and CRUD to be PostgreSQL-authoritative
- Remove static section enums and add dynamic listSections query
- Support custom sections and metadata across API, MCP, and Web UI
- Add /api/sections endpoint and update Header, Sidebar, and Forms
- Remove obsolete phase planning docs and modernize README/AGENTS
This commit is contained in:
asepharyana
2026-08-21 11:35:42 +07:00
parent a937e8f51b
commit a9b67385c3
37 changed files with 720 additions and 2515 deletions
+15 -4
View File
@@ -1,6 +1,15 @@
export type DocSection = "docs" | "writeups" | "research" | "notes";
export type DocType = "documentation" | "writeup" | "research" | "note";
export type DocStatus = "published" | "draft";
export type DocSection = string;
export type DocType = string;
export type DocStatus = "published" | "draft" | string;
export interface SectionInfo {
id: string;
label: string;
icon: string;
desc: string;
docCount: number;
updatedAt?: string;
}
export interface DocumentMeta {
id: string; // slug
@@ -18,10 +27,11 @@ export interface DocumentMeta {
// difficulty, points). Content creators add arbitrary key-value pairs.
// Values can be strings, numbers, booleans, arrays, or objects.
extraFields?: Record<string, unknown>;
[key: string]: unknown;
}
export interface Document extends DocumentMeta {
body: string; // raw markdown (read from disk or stored)
body: string; // markdown body
}
export interface SearchHit {
@@ -29,3 +39,4 @@ export interface SearchHit {
rank: number;
snippet: string;
}