Initial commit: AI-driven visual novel scaffold

- Monorepo (pnpm workspace): apps/web + packages/{types,ai-client,engine}
- Next.js 16 web app with three-stage AI orchestration
- Three independently configurable providers: text LLM, image generator, vision model
- Warm minimalist editorial UI design
- One-click Vercel deploy ready

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
yuanzonghao
2026-05-09 13:29:58 +08:00
commit cbd95bbea2
45 changed files with 1855 additions and 0 deletions
+14
View File
@@ -0,0 +1,14 @@
{
"name": "@dada/types",
"version": "0.1.0",
"private": true,
"type": "module",
"main": "./src/index.ts",
"types": "./src/index.ts",
"exports": {
".": "./src/index.ts"
},
"scripts": {
"typecheck": "tsc --noEmit"
}
}
+74
View File
@@ -0,0 +1,74 @@
export type UIElementKind = "choice" | "menu" | "item" | "custom";
export type UIElement = {
id: string;
kind: UIElementKind;
label: string;
hint?: string;
};
export type StoryFrame = {
id: string;
narration?: string;
speaker?: string;
line?: string;
scenePrompt: string;
uiElements: UIElement[];
};
export type ClickIntent = {
targetId: string | null;
targetLabel: string | null;
reasoning: string;
freeformAction?: string;
};
export type HistoryEntry = {
frame: StoryFrame;
click?: { x: number; y: number };
intent?: ClickIntent;
};
export type Session = {
id: string;
createdAt: number;
worldSetting: string;
styleGuide: string;
history: HistoryEntry[];
};
export type ProviderConfig = {
baseUrl: string;
apiKey: string;
model: string;
};
export type EngineConfig = {
text: ProviderConfig;
image: ProviderConfig;
vision: ProviderConfig;
};
export type StartRequest = {
worldSetting: string;
styleGuide: string;
};
export type StartResponse = {
sessionId: string;
frame: StoryFrame;
imageBase64: string;
};
export type InteractRequest = {
session: Session;
prevImageBase64: string;
click: { x: number; y: number };
};
export type InteractResponse = {
session: Session;
frame: StoryFrame;
imageBase64: string;
intent: ClickIntent;
};
+7
View File
@@ -0,0 +1,7 @@
{
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"noEmit": true
},
"include": ["src/**/*"]
}