Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/elecodes/TenderCheck-AI/llms.txt

Use this file to discover all available pages before exploring further.

AI output is only trustworthy when it can be traced back to the source. Every requirement extracted by TenderCheck AI includes a clickable page citation that opens the original document text with the AI-identified fragment highlighted. Alongside this, the platform stores a complete, searchable analysis history in Turso edge SQLite — so every past tender analysis is instantly accessible across sessions without re-uploading a document.

Clickable Citations

Each Requirement object carries a source field with two citation properties:
  • source.pageNumber — the absolute page number in the original tender PDF (e.g., 7)
  • source.snippet — a verbatim 1–2 sentence excerpt that the AI extracted from that page
In the dashboard, every requirement card shows a page badge button (e.g., Pág. 7) when source.pageNumber > 0. Clicking this badge opens the CitationPreview modal.

CitationPreview Modal

The CitationPreview component displays:
  1. A header showing “Fuente del Documento” and the page number
  2. The full page text stored in pageTexts[pageNumber - 1] — the complete prose of the original page
  3. The AI-identified snippet highlighted in green using a regex-based split-and-mark approach, so you can see exactly which sentence triggered the requirement extraction
The modal can be closed with the button or by pressing Escape. If no page text is stored for that page (e.g., the PDF parser returned an empty page), the modal shows a “Texto de página no disponible” placeholder instead of failing silently.
Citations give you a direct audit trail from every AI verdict back to the original tender document text — you never need to manually hunt through the PDF to verify an extracted requirement.

Analysis History

The History Sidebar on the left side of the dashboard lists every analysis you have ever run, ordered with the most recent at the top.

What the Sidebar Shows

  • Tender title — the tenderTitle extracted by the AI (up to 500 characters), truncated for display
  • Creation date — formatted in dd MMM yyyy locale format (e.g., 03 Jun 2025)
  • Active indicator — a green left-border bar marks the currently loaded analysis
  • Item count badge — the total number of analyses in your history is shown in the sidebar header

Searching History

A search input at the top of the sidebar filters the list in real time by tender title (case-insensitive). This is useful when you have accumulated dozens of analyses and need to quickly return to a specific procurement.
Search for part of the contract reference number or a keyword from the tender title — for example, typing seguridad will surface all IT security or cybersecurity tenders you have previously analysed.

Loading a Previous Analysis

Click any item in the sidebar to restore that analysis to the main panel. All requirements, validation results, and page texts are loaded from the database — no re-uploading needed.

History Data Model

The TenderAnalysis entity is the central record persisted for every analysis session. The fields most relevant to history management are:
FieldTypeDescription
idstringUUID primary key — used in all API routes
userIdstringThe authenticated user who created the analysis
tenderTitlestringAI-generated title (up to 500 chars)
statusAnalysisStatusPENDING, PROCESSING, COMPLETED, or FAILED
createdAtDateTimestamp when the analysis record was first saved
updatedAtDateTimestamp of the last update (e.g., after proposal validation)
requirementsRequirement[]All extracted requirements with source citations
resultsValidationResult[]All validation verdicts (populated after proposal validation)
pageTextsstring[]Full text of every page — powers citation previews
metadataobjectOptional: page count, processing time, model version

Managing Analyses

Browsing

The History Sidebar is always visible on the left of the dashboard. Analyses are listed as they were created; the active one is highlighted with a green left border. Keyboard navigation is supported: press Enter or Space to select an item.

Deleting an Analysis

Hover over any history item to reveal the trash icon button. Clicking it triggers a browser confirmation dialog. On confirmation, the frontend calls:
DELETE /api/tenders/:id
This endpoint requires a valid authentication token and verifies that the authenticated user owns the analysis before deletion. Once deleted, the record and all its associated requirements and results are permanently removed from Turso.

Session Persistence

All analyses are stored in Turso (distributed edge SQLite). Your history persists across browser sessions, devices, and deploys — you can close the browser, return the next day, and all previous analyses will still be listed in the sidebar.

pageTexts Storage

When a tender PDF is parsed, TenderCheck AI stores the full plain-text content of every page in the pageTexts array on the TenderAnalysis record. This is a deliberate design decision:
  • The original PDF is not retained after analysis. Only the extracted text is stored.
  • When you click a citation badge days or weeks after the original upload, the CitationPreview modal reads from pageTexts[pageNumber - 1] in the database — so the source text is always available.
  • For large PDFs processed via chunking, all pages are merged into a single pageTexts array before saving.
pageTexts stores raw plain text, not the original PDF binary. If your PDF had complex formatting, tables, or multi-column layouts, the extracted text may appear linearised. The highlighted snippet will still correctly identify the relevant passage.

Build docs developers (and LLMs) love