SaaS Development AI software development Frontend development Backend development
Product

An internal platform for financial specialists who collect and review client documents during KYC. The platform brings client profiles, uploaded files, AI-extracted data, and completed questionnaires into one workspace.

Delivery

A full web platform with batch document upload, AI classification and extraction, visual source verification, editable data, and automated completion of two PDF forms. Administrators can configure document types, extraction fields, and AI settings.

Devstark's role

We handled full-stack development, connecting client records, document processing, and specialist review. We also built the AI extraction pipeline, source-linked interface, normalization services, and rules for assembling final PDF forms.

The context

Financial specialists work with passports, bank statements, tax forms, proof of address, and other documents to prepare a client’s KYC file. Opening each document, transferring its contents, checking the values, and entering them again into a questionnaire creates substantial manual work.

We built a platform that processes the client’s documents together, identifies their types, extracts relevant fields, and prepares data for completed PDF forms. Specialists can trace values to their source and correct them before export. The platform helps keep professional judgment central while automating the repetitive work of reading, organizing, and transferring information.

The platform operates as a closed, authenticated workspace for financial specialists rather than a public-facing service. Each client's documents and extracted data are organized within a dedicated client record.

client list

Book a call to discuss how AI extraction, specialist review, and automated form completion could work in your business.

How we built it

Processing varied documents through one workflow

Challenge:

A KYC file can contain documents from different countries, in different languages and formats. The same information may appear under different labels, across several pages, or in multiple documents.

Our approach:

We made the client record the central entity, with documents and their individual pages linked beneath it. Specialists can upload multiple PDFs and images together. The system converts PDFs into page images at a configurable resolution and sends each page to Gemini with instructions assembled from the active document-type configurations. The model returns structured JSON according to a predefined schema, making extraction results suitable for subsequent programmatic processing.

The document type identified on the first page is passed as context for processing subsequent pages. The model is instructed to extract only information present on the current page, and duplicate priority fields are removed while preserving the first meaningful value. The model returns structured data with the document type, country, language, extracted values, and source coordinates.

The current configuration supports ten document types, including passports, bank statements, tax forms, CVs, and utility bills. Administrators can change supported types, expected fields, and extraction instructions through the interface, allowing the team to adapt recognition rules without releasing a new application version.

A centralized AI configuration also allows administrators to manage the shared prompt template, Gemini model, temperature, thinking budget, and PDF rendering quality without changing the application code.

AI platform document types

Making AI-extracted values verifiable

Challenge:

Financial and identity data must be checked before they enter the final questionnaire. Specialists need to see where a value came from and correct it quickly when the model misreads a document.

Our approach:

We linked each extracted value to a page number and a bounding box on the original document. Bounding boxes use a normalized coordinate system ranging from 0 to 1000, providing a consistent reference across pages of different dimensions. The main workspace places the document list, extracted fields, and source page side by side.

Hovering over a field highlights its source, and the viewer moves to the relevant page in a multi-page document. The connection works in both directions, helping users move between the source and the corresponding field. Zoom and fullscreen controls support closer inspection.

Specialists can edit original and normalized values directly. Priority fields are displayed first, with additional extracted information available through an expandable view. Missing or changed values have distinct visual states, and rules such as an outdated utility bill date draw attention during review.

AI platform document extraction

Preparing extracted data for the final forms

Challenge:

Correctly extracted information can still require transformation. Names may need transliteration, dates may use different formats, and financial amounts may need conversion. A single questionnaire can also require values from several documents.

Our approach:

We stored the original value alongside its normalized version, allowing specialists to inspect and edit each independently. The export prioritizes normalized values while retaining the original source information. Normalization handles transliteration, dates, currency codes, and monetary conversion using historical exchange rates at the end of the reporting year. Exchange rates are cached locally to reduce repeated requests to the external service. If the exchange-rate service is unavailable, the original amount is preserved.

A dedicated resolver applies explicit rules to select sources. It chooses the first available value, combines information, calculates totals, and fills PDF fields. The system programmatically populates AcroForm templates, including text fields, checkbox groups, and dropdown lists. The export can report how many fields were completed, which documents supplied the data, and any errors encountered.

AI handles document interpretation. Programmed mapping rules assemble the final forms, making the export reproducible and easier to inspect. Fields intended for final manual review remain empty and editable.

Making background processing clear to specialists

Challenge:

Uploading a package of documents starts work that takes place in the background and isn't visible to the user. Specialists need to understand what has happened to every file and which results are ready to use.

Our approach:

Each document moves through Pending, Processing, Completed, or Error. The interface refreshes automatically while processing is active, displays errors against the affected file, and makes export available when successfully processed documents exist.

Completed files are grouped into categories such as identity, proof of address, bank details, source of wealth, and source of funds. Where a category allows a single document, the interface flags duplicates. This process gives specialists a structured client file and a clear view of processing progress.

AI platform document categories

Keeping client files and related data consistent

Challenge:

Each upload creates several connected records, including the original file, page images, extracted fields, and client associations. Removing a document or client could leave behind orphaned pages or inconsistent records.

Our approach:

We implemented an application-level cascading deletion. Deleting a document removes its related pages, and deleting a client removes the client’s documents and their associated records. Unique filename prefixes prevent collisions when users upload files with identical names.

Keeping these relationships explicit supports reliable management of the client file throughout its lifecycle.

What we delivered

We delivered a full internal platform covering the path from receiving client documents to producing completed KYC PDFs. Specialists can manage client files, upload documents in batches, review structured extraction against highlighted source material, correct values, and generate forms using information from multiple documents.

The platform generates two completed PDF forms: a client questionnaire and a structured compliance form. Both consolidate information from multiple documents using explicit source selection, transformation, and calculation rules. Configurable recognition rules, visible processing stages, source-linked data, and deterministic form generation give specialists control over the document-processing workflow.

The frontend and backend operate within a unified TypeScript application built with Next.js and Payload CMS. The architecture separates the client data model, page rendering, AI extraction, normalization, field resolution, and PDF generation, allowing document recognition rules, AI processing logic, and output templates to evolve independently.

Technologies and their roles

  • Next.js, React, and TypeScript for the application and specialist workspace.

  • Payload CMS for authentication, administration, client and document records, file uploads, and APIs.

  • TanStack Query for interface data management and automatic processing-status updates.

  • Google Gemini for document classification and structured extraction with source coordinates.

  • pdf-lib and sharp for PDF processing, image preparation, and PDF form completion.

  • SQLite and filesystem storage for application data and uploaded documents in the current implementation.

  • Open Exchange Rates for historical currency conversion, with locally cached exchange rates.

KYC platform administration and AI configuration
cta image

AI RX med finder

An MVP SaaS service featuring an AI agent that will find your prescription medication in stock in pharmacies nearby.

AI platform for pharmacy compounding records and quality control

Learn how we developed a pharmacy document platform that turns compounding PDFs into searchable, editable records for professional quality review.

AI-powered events aggregator

An AI pipeline able to aggregate and validate hyper-local event data from thousands of sources, boosting onboarding from 1 client every two months to 3–5 per month with 95%+ data quality.

AI-assisted career guidance platform

A full-stack development of a career guidance platform connecting questionnaires, staged AI analysis, personalized reports, and organizational licensing.

AI-powered landing page builder

Custom SaaS development connecting AI-assisted content generation, visual editing, and domain publishing in one workflow.

AI-powered presentation generator for Google Slides

AI SaaS development connecting content generation, outline editing, templates, and subscriptions within a familiar presentation workflow.

Building a legal document automation platform for small businesses

A legal document platform that turns static templates into interactive forms with live previews and editable Word exports.