feat: Initialize AutoForm AI project structure

Sets up the basic project structure for AutoForm AI, including:
- Vite for build tooling and development server.
- React and ReactDOM for the UI.
- TypeScript for static typing.
- Essential dependencies for PDF manipulation (jspdf, pdf-lib) and AI integration (@google/genai).
- Basic HTML structure and styling.
- Component definitions and service interfaces for future development.
- A README with local development instructions.
This commit is contained in:
Kenearos 2026-01-28 19:23:47 +01:00
parent f1f796c9ca
commit d2ea8a0cd4
14 changed files with 1217 additions and 8 deletions

40
types.ts Normal file
View file

@ -0,0 +1,40 @@
export interface ValidationResult {
status: 'VALID' | 'WARNING' | 'INVALID';
message?: string;
suggestion?: string;
}
export interface ExtractedField {
key?: string; // The PDF field name (internal ID)
label: string; // Human readable label
value: string;
confidence?: string;
sourceContext?: string;
validation?: ValidationResult;
isVerified?: boolean; // Track if user has explicitly checked this field
coordinates?: {
pageIndex: number;
x: number; // 0-1000 scale
y: number; // 0-1000 scale
};
}
export interface FormResponse {
fields: ExtractedField[];
summary: string;
}
export enum AppStatus {
IDLE = 'IDLE',
PROCESSING = 'PROCESSING',
REVIEW = 'REVIEW',
SUCCESS = 'SUCCESS',
ERROR = 'ERROR'
}
export interface FileData {
file: File;
previewUrl: string | null;
base64: string;
type: 'application/pdf' | 'image/png' | 'image/jpeg' | 'image/webp';
}