THE UNIFIED PLATFORM BIBLE — ADDENDUM 08
WebaScan · WebaForm · WebaSign · WebaDrive — New Features June–July 2026
Version: 1.0
Date: July 4, 2026
Author: Alain Bessette, CFO/Product Owner, ABI Conglomerate
Domain: GoWeBa.com
Status: Official strategic addendum — Binding specification
Constraints: ZERO data loss · ZERO force-reset · ZERO service interruption
⚠️ CRITICAL NOTICE
This addendum has the SAME authority as Part 1, Part 2, and all previous addendums.
All features described herein are deployed in production and saved as checkpoints.
No incompatible schema changes were made.
📋 TABLE OF CONTENTS
- Overview
- WebaScan — Intelligent Document Scanner
- WebaForm — Intelligent Form Filling
- WebaSign — E-Signature Enhancements
- WebaDrive — New Storage Features
- Data Schema — Additive Changes
- Key Files Modified
- Deployment Timeline
<a id="overview"></a>
SECTION 1: OVERVIEW
This addendum documents a massive set of features delivered between June and July 2026, covering four key modules of the GoWeBa platform:
| Module | Phases | Key Features |
|---|---|---|
| WebaScan | A → G | Mobile scanner, OCR, structured extraction, CRM linking, Ask WEBA, universal file import |
| WebaForm | E, E-v2 | Form library, AI auto-fill, batch fill |
| WebaSign | D, F0 | In-person signing, rebranding, new field types |
| WebaDrive | F2, F3, H1–H4 | Per-contact folders, auto-enrichment, full-text search, multi-contact linking |
Design Principles
- Trilingual: All interfaces support French, English, and Spanish
- Additivity: No destructive schema changes
- CRM Integration: All four modules share a unified contact pipeline
- Pervasive AI: LLM (gpt-4.1) used for OCR, extraction, analysis, filling
<a id="webascan"></a>
SECTION 2: WEBASCAN — INTELLIGENT DOCUMENT SCANNER
WebaScan is a mobile document scanner integrated directly into GoWeBa. It transforms a phone or computer into an intelligent scanner capable of digitizing, analyzing, and automatically classifying documents.
2.1 Phase A — Scanner Foundations
Document Type Library (lib/storage/document-library.ts)
~50 document types organized by families:
| Family | Examples |
|---|---|
| Identification | Passport, driver's license, ID card |
| Finance | Bank statement, invoice, receipt, tax return |
| Legal | Contract, will, power of attorney, certificate |
| Real Estate | Lease, deed of sale, inspection, appraisal |
| Health | Prescription, lab results, insurance card |
| Vehicle | Registration, accident report, rental agreement |
| Professional | Resume, cover letter, diploma, certificate |
| Everyday | Warranty, receipt, menu, label |
Each type defines:
- Trilingual names (fr/en/es) + search aliases
- Icon and framing ratio (portrait/landscape/square)
- Paper format (Letter, A4, A5) with selection option
- Sensitive flag (for confidential documents)
- Recto/verso: number of faces, merge option
- Default filing: master folder + subfolder proposed by WEBA
- Structured extraction fields (name, date, amount, etc.)
- Analysis intents (translate, summarize, filter, etc.)
Scanning Flow: Type → Capture → Edit → Export
- Type selection: Family grid → search → type selection
- Capture: Real-time camera with guide frame adapted to the type, or image import
- Edit: Crop, zoom, rotate, multi-page, recto/verso
- Export: OCR → WEBA Analysis → Extraction → CRM Linking → Save
Capture Features
- Dynamic guide frame adapted to document ratio (portrait, landscape, square, card)
- Recto/verso: automatic merge of both sides on a single page
- Paper format selection (Letter/A4/A5) with intelligent pre-selection
- Multi-page: add additional pages with individual management
- Automatic “sensitive document” flag based on type
WEBA Filing Proposal
After type selection, WEBA automatically proposes the destination folder based on the document type's defaultFiling. The user can accept or choose a different folder.
2.2 Phase B — Structured Extraction + CRM + Ask WEBA
B1 — Structured Data Extraction
- New field
extractedData Json?on theFileAssetmodel - API
POST /api/storage/scan/extract: sends OCR text + type extraction fields to LLM (gpt-4.1, temperature 0) - Result:
{fields: [{key, label, value}]}— displayed in editable fields before saving - Example for a passport: name, first name, date of birth, number, issuing country, expiration date
B2 — CRM Linking (Attach to a Contact)
- The scanner allows searching for an existing contact or creating a new one directly from extracted document data
- Created contact is LEAD type, source “WebaScan”, with pre-filled extracted fields (name, email, phone, company, job title)
- Server-side validation: contact ID must belong to the user's organization
B3 — Ask WEBA (Everyday Analysis)
- API
POST /api/storage/scan/analyze - Quick intents based on document type: translate, allergens, ingredients, nutrition, filter, summarize, compare, extract
- Free question: user asks any question about the document
- Answer displayed in the scanner before saving
- Usage billed to wallet (AI_CHAT)
2.3 Phase C — WebaScan as Sidebar Module
- Direct access: WebaScan appears in the sidebar with ScanLine icon
- Dedicated page
/scanwith:- Gradient hero with destination folder selector + “Start a scan” button
- 6 feature explanation cards
- Recent scans grid (last 24h) with badges (type, pages, sensitive, CRM contact)
- Free access: free module for all plans (FREE tier)
- Shortcut preserved: the Scan button in WebaDrive remains functional
2.4 Phase G — Universal File Import
Before: WebaScan only accepted images (camera photos).
After: WebaScan accepts all common file types:
| Format | Extension |
|---|---|
| Word | .doc, .docx |
| Excel | .xls, .xlsx |
| CSV | .csv |
| Text | .txt |
| Images | .jpg, .png, etc. |
New flow for files:
- “Import a file” button at the Capture step
- Validation: max size 20 MB, authorized MIME types
- File read as dataURL → sent to LLM for analysis (no image OCR)
- API
POST /api/storage/scan/process-file: full text extraction + description + keywords - Export: original file uploaded directly to cloud (no image→PDF conversion)
- Edit step automatically skipped
Original image flow preserved: capture → edit (crop) → export PDF
<a id="webaform"></a>
SECTION 3: WEBAFORM — INTELLIGENT FORM FILLING
WebaForm is a dedicated module for managing and automatically filling professional forms. It uses artificial intelligence to map data extracted by WebaScan onto blank forms.
3.1 Concept
- Upload a blank form (PDF, image) → WebaForm analyzes its fields
- Select data sources: scanned documents + contact profiles
- WEBA auto-fills recognized fields → unknown fields are marked “to complete”
- Generate a filled PDF, automatically filed in WebaDrive
3.2 Technical Architecture
New data models (additive):
WebaFormTemplate: uploaded blank form (cloudStoragePath, fileName, mimeType, pageCount, hasAcroForm, fields Json, status)WebaFormFill: fill instance (formTemplateId, sourceFileIds, contactId, values Json, toComplete String[], outputPath, status)
Fill statuses: DRAFT → NEEDS_REVIEW → COMPLETE
3.3 Field Detection
WebaForm detects two types of forms:
| Type | Detection | Fill Method |
|---|---|---|
| AcroForm (interactive PDF) | pdf-lib getForm/getFields | Native fill + flatten |
| Flat form (image/scan) | LLM vision (base64 → gpt-4.1) | Summary PDF generation with data |
3.4 Data Sources
Scanned Documents
FileAssetfiles withisScanned: trueAND (ocrTextorextractedData)- User selects one or more documents as sources
- Their data is aggregated into structured text
Contact Profiles (Phase F4)
- Contacts with at least one custom field (
ContactFieldValue) - Standard contact fields (name, email, phone, company, job title, address) combined with custom fields
- Field labels extracted with locale respect (trilingual JSON
{fr, en, es})
Combination: user can select documents AND a contact profile simultaneously. Counter displays “X doc(s) + 1 contact”.
3.5 Batch Fill (Phase E v2)
- Select one template + multiple sources → WEBA generates a fill for each source
- Each fill is independent and editable
- Use case: same form for 10 different clients
3.6 WebaForm API
| Route | Method | Description |
|---|---|---|
/api/forms/templates | GET | List organization templates |
/api/forms/templates | POST | Upload a new template (auto field detection) |
/api/forms/templates/[id] | GET/PATCH/DELETE | Individual template management |
/api/forms/sources | GET | List available sources (scanned files + contacts) |
/api/forms/fills | GET/POST | List or create a fill |
/api/forms/fills/[id] | GET/PATCH/DELETE | Fill management |
/api/forms/fills/[id]/generate | POST | Generate filled PDF (AcroForm or summary) |
/api/forms/fills/[id]/download | GET | Signed download URL |
/api/forms/batches | POST | Create a batch fill |
3.7 User Interface
- Sidebar module
/forms(FileSpreadsheet icon, PRO tier) - Library tab: template grid with upload dialog
- Fills tab: fill list with visual status
- Source selector: “Contact profile” section (radio) + “Scanned documents” section (checkboxes)
- Review screen: editable fields, “to complete” fields highlighted in amber, Generate PDF button
- Auto-filing: generated PDF automatically saved to WebaDrive
3.8 Form Dialog in WebaDrive (Phase H-1)
- 4 fields in the WebaDrive upload dialog:
- File name
- Description
- Keywords
- Destination folder selector
- GoWeBa Legal library foundation: “GoWeBa Legal” system folder containing common form templates
<a id="webasign"></a>
SECTION 4: WEBASIGN — E-SIGNATURE ENHANCEMENTS
4.1 Rebranding (Phase F0)
- E-Signature → WebaSign: complete rename across the application
- Sidebar: “WebaSign” instead of “E-Signature”
- Signing page: “WebaSign — GoWeBa Electronic Signature Platform” header
- Proof certificates: WebaSign branding
- Notification emails: WebaSign branding
- Plans & pricing: WebaSign description
- Seed data: WebaSign demo templates
- i18n: keys updated in fr/en/es
4.2 New Field Types (Phase D)
Two new field types added to the signature editor and signing surface:
| Type | Icon | Color | Behavior |
|---|---|---|---|
| Date signed | CalendarClock | Emerald | Auto-filled with today's date, read-only |
| Place of signing | MapPin | Rose | Free text field (city, country) |
These fields complement existing types: SIGNATURE, INITIALS, DATE, TEXT, CHECKBOX.
4.3 In-Person Signing (Phase D)
Kiosk mode for in-person signing (meetings, reception, events):
Flow
- Creator launches “Sign in person” from an envelope detail
- Full-screen mode: presentation screen with signer list
- Sequential rotation: each signer is presented one at a time
- Handoff: device is passed to the current signer
- Signer signs in a secure iframe (same surface as remote signing)
- After signing, automatic return to presentation screen
- When all have signed → confirmation screen
Technical Details
- Route
/signatures/[id]/presentwithpresent-client.tsx(full-screen) - API
POST /api/signatures/[id]/activate-in-person: activates kiosk mode (WITHOUT sending emails) - API
GET /api/signatures/[id]/in-person-status: lightweight polling (signers, tokens, current signer, all signed) - Email suppression: in kiosk mode, rotation and notification emails are suppressed (only the completion notification to the owner remains)
- Same legal proof: IP, timezone, geolocation, SHA-256 hash, automatic PDF certificate, CRM auto-link
- Schema:
inPersonMode Boolean @default(false)onSignatureEnvelope - Event type:
IN_PERSON_STARTED
Entry Points
- Dropdown in envelope action menu: “Sign in person” (MonitorSmartphone icon, blue)
- Footer button in detail view (conditions: fileAssetId + ≥1 field + ≥1 signer)
<a id="webadrive"></a>
SECTION 5: WEBADRIVE — NEW STORAGE FEATURES
5.1 WebaDrive Folder per Contact (Phase F2)
Each CRM contact can now have their own dedicated folder in WebaDrive.
- On-demand creation: button in the “WebaDrive” tab of the contact detail
- Automatic structure:
- Parent folder “📇 Contacts” (SYSTEM_MASTER, created once)
- Subfolder with the contact's name (CONTACT type)
- 3 default subfolders: Documents, Scans, Correspondence (SYSTEM_DEFAULT)
- Schema:
driveFolderId String? @uniqueon Contact + relation toStorageFolder - API:
GET/POST /api/contacts/[id]/drive-folder - UI: “WebaDrive” tab in contact detail — subfolder grid, file list, “Open in WebaDrive” link
5.2 Intelligent Scan→Contact→Enrichment Pipeline (Phase F3)
Automatic pipeline triggered after each scan with CRM linking + extracted data:
- Auto-create field definitions: extraction keys become
ContactFieldDef(sanitized name, guessed type, category inferred from document type) - Upsert values:
ContactFieldValuecreated/updated (confidence 0.75, source linked to file, unverified) - Auto-filing: scanned file moved to the “Scans” subfolder of the contact's WebaDrive folder
- Idempotent: race condition handling, unique upserts
5.3 Full-Text Search in WebaDrive (Phase H-2)
- Cross-folder search: search by keywords across all folders
- User types ≥2 characters → server search on file names, descriptions, and keywords
- Results displayed with counters (files + folders)
- API
/api/storage/searchwithorganizationIdfilter
5.4 Enriched Scan History (Phase H-3)
- WebaScan: enriched landing page with:
- Document preview
- Full-screen mode
- Print, Download, Move buttons
- Badges: document type, page count, sensitive indicator, linked CRM contact
5.5 Multi-Contact Document↔Contact Linking (Phase H-4)
Before: a document could only be linked to ONE contact (linkedContactId String?).
After: a document can be linked to MULTIPLE contacts (linkedContactIds Json? @default("[]")).
Backward Compatibility
- The
linkedContactIdfield (singular) is preserved and automatically synced with the first contact in the array - The 20+ files referencing
linkedContactIdcontinue to work without modification - The contact attachments API queries via
linkedContactIdOR in thelinkedContactIdsarray (viaarray_contains)
API Changes
| Route | Change |
|---|---|
POST /api/storage/files | Accepts linkedContactIds[] + backward compat linkedContactId |
PATCH /api/storage/files/[id] | Supports linkedContactIds update |
POST /api/storage/scan/export | Receives and validates multi-contacts |
GET /api/contacts/[id]/attachments | OR query: linkedContactId or linkedContactIds containing ID |
GET /api/contacts | New ?ids=id1,id2,... parameter for batch loading |
WebaScan — Multi-Contact Selector
- Single contact selector replaced by a multi-contact selector
- Search and add multiple contacts with deduplication
- Display all linked contacts with individual “Remove” button
- Contact creation from scan → added to the list
WebaDrive — Info & Context Panel
- New “Linked contacts” section in the file Info dialog
- Display linked contacts with individual removal
- Search and add new contacts
- Save alongside keywords and description
<a id="schema"></a>
SECTION 6: DATA SCHEMA — ADDITIVE CHANGES
All modifications below are additive — no deletions or incompatible changes.
6.1 FileAsset
// Phase B — structured extraction
extractedData Json?
// Phase H-4 — multi-contacts
linkedContactIds Json? @default("[]")
6.2 New Models
WebaFormTemplate {
id, organizationId, cloudStoragePath, fileName, mimeType,
pageCount, hasAcroForm, fields Json, status,
createdAt, updatedAt
}
WebaFormFill {
id, organizationId, formTemplateId, sourceFileIds String[],
contactId?, values Json, toComplete String[],
outputPath?, outputFileName?, status (DRAFT/NEEDS_REVIEW/COMPLETE),
createdAt, updatedAt
}
6.3 Contact
// Phase F1 — custom fields
ContactFieldDef { name, label Json, fieldType, category, optionsJson, orderIndex, isActive, source }
ContactFieldValue { contactId, fieldDefId, value, confidence?, sourceFileAssetId?, verifiedByUser }
// Phase F2 — WebaDrive folder
driveFolderId String? @unique
6.4 SignatureEnvelope
// Phase D — in-person signing
inPersonMode Boolean @default(false)
6.5 SignatureFieldType (enum)
// Phase D — new types
DATE_SIGNED
PLACE
<a id="files"></a>
SECTION 7: KEY FILES MODIFIED
WebaScan
| File | Role |
|---|---|
lib/storage/document-library.ts | ~50 document types, families, extraction, intents |
components/storage/weba-scanner-dialog.tsx | Main scanner UI (1100+ lines) |
app/api/storage/scan/ocr/route.ts | Per-page OCR + context |
app/api/storage/scan/extract/route.ts | Structured LLM extraction |
app/api/storage/scan/analyze/route.ts | Ask WEBA — intents + free question |
app/api/storage/scan/export/route.ts | Save FileAsset + multi-contacts |
app/api/storage/scan/process-file/route.ts | Non-image file analysis |
app/(app)/scan/page.tsx | WebaScan server page |
app/(app)/scan/webascan-client.tsx | WebaScan client (hero, features, recent scans) |
WebaForm
| File | Role |
|---|---|
lib/weba/form-fill.ts | AcroForm detection, LLM analysis, mapping, filling, PDF |
app/api/forms/templates/route.ts | Template CRUD |
app/api/forms/fills/route.ts | Fill CRUD |
app/api/forms/fills/[id]/generate/route.ts | Filled PDF generation |
app/api/forms/sources/route.ts | Sources (scanned files + contacts) |
app/api/forms/batches/route.ts | Batch fill |
app/(app)/forms/webaform-client.tsx | WebaForm UI |
WebaSign
| File | Role |
|---|---|
components/signatures/pdf-field-editor.tsx | PDF field editor (DATE_SIGNED, PLACE) |
app/sign/[token]/signing-client.tsx | Signing surface (new types) |
app/(app)/signatures/[id]/present/page.tsx | Presentation server page |
app/(app)/signatures/[id]/present/present-client.tsx | Full-screen kiosk client |
app/api/signatures/[id]/activate-in-person/route.ts | In-person mode activation |
app/api/signatures/[id]/in-person-status/route.ts | Kiosk status polling |
app/(app)/signatures/signatures-client.tsx | “Sign in person” entry points |
WebaDrive
| File | Role |
|---|---|
lib/storage/contact-folder.ts | Contact folder creation + subfolders |
lib/contacts/contact-enrichment.ts | Auto-enrichment pipeline |
app/(app)/storage/webadrive-client.tsx | WebaDrive client (multi-contact info panel) |
app/api/storage/files/route.ts | POST: linkedContactIds |
app/api/storage/files/[id]/route.ts | PATCH: multi-contact update |
app/api/contacts/[id]/attachments/route.ts | GET: OR multi-contact query |
app/api/contacts/[id]/drive-folder/route.ts | Contact WebaDrive folder |
<a id="timeline"></a>
SECTION 8: DEPLOYMENT TIMELINE
| Date | Phase | Description |
|---|---|---|
| June 2026 | Phase A | WebaScan — Foundations, library, capture, editing |
| June 2026 | Phase B | WebaScan — Extraction + CRM + Ask WEBA |
| June 2026 | Phase C | WebaScan — Dedicated sidebar module |
| June 2026 | Phase D | WebaSign — In-person signing + new fields |
| June 2026 | Phase E | WebaForm — Complete module (templates, auto-fill, PDF) |
| June 2026 | Phase E v2 | WebaForm — Batch fill |
| June 2026 | Phase F0 | WebaSign — Rebranding E-Signature → WebaSign |
| June 2026 | Phase F1 | Contacts — Custom fields |
| June 2026 | Phase F2 | WebaDrive — Per-contact folder |
| June 2026 | Phase F3 | Pipeline — Scan → Contact → Auto-enrichment |
| June 2026 | Phase F4 | WebaForm — Contact profiles as source |
| June 2026 | Phase G | WebaScan — Universal file import |
| July 2026 | Phase H-1 | WebaDrive — WebaForm 4 fields + GoWeBa Legal |
| July 2026 | Phase H-2 | WebaDrive — Full-text search (cross-folder) |
| July 2026 | Phase H-3 | WebaScan — Enriched history (preview, full-screen, print) |
| July 2026 | Phase H-4 | WebaDrive — Multi-contact document↔contact linking |
Suggested next steps:
- WebaVision: advanced AI vision integration in scanner
- WebaForm: field position editor for flat forms
- WebaDrive: file versioning
- WebaSign: signature workflows with prior approval
Document generated as part of the GoWeBa Knowledge Center — goweba.com
© 2026 ABI Conglomerate. All rights reserved.