VIBN Frontend for Coolify deployment

This commit is contained in:
2026-02-15 19:25:52 -08:00
commit 40bf8428cd
398 changed files with 76513 additions and 0 deletions

90
lib/types.ts Normal file
View File

@@ -0,0 +1,90 @@
// Database Types
export interface Session {
id: number;
session_id: string;
project_id: number;
user_id: number;
started_at: Date;
last_updated: Date;
conversation: Message[];
file_changes: FileChange[];
message_count: number;
duration_minutes: number;
file_change_count: number;
summary?: string;
total_tokens?: number;
prompt_tokens?: number;
completion_tokens?: number;
estimated_cost_usd?: number;
primary_ai_model?: string;
ide_name?: string;
github_commit_sha?: string;
github_branch?: string;
}
export interface Message {
role: string;
content: string;
timestamp: Date;
}
export interface FileChange {
file: string;
event: string;
timestamp: Date;
}
export interface WorkCompleted {
id: number;
session_id: number;
project_id: number;
title: string;
description?: string;
category: string;
files_modified: string[];
completed_at: Date;
github_commit_sha?: string;
}
export interface Project {
id: number;
name: string;
workspace_path: string;
status: string;
created_at: Date;
}
export interface ArchitecturalDecision {
id: number;
project_id: number;
title: string;
context?: string;
decision: string;
consequences?: string;
status: string;
decided_at: Date;
tags: string[];
}
export interface ApiEndpoint {
id: number;
project_id: number;
method: string;
path: string;
description?: string;
is_active: boolean;
first_detected: Date;
last_detected: Date;
}
// Dashboard Stats
export interface DashboardStats {
totalSessions: number;
totalCost: number;
totalTokens: number;
totalFeatures: number;
completedFeatures: number;
totalDuration: number;
}