About this project

Licitarium is a computer program for Windows that mirrors on the agency's machine what the municipality publishes on the PNCP (National Public Procurements Portal). It gathers procurements (bids and notices), contracts, price registration minutes, the Annual Procurement Plan (PCA), and items for each purchase, with unit prices paid and winning suppliers. The archive is searchable, offline, and permanent — it would solve the need to consult the history process by process on the portal, which is not searchable nor available without internet. The pilot runs in Orindiúva-SP, and nothing in the code is fixed to a specific municipality. Archive and Interface The interface features five tabs with search, filters by year, modality, status, and agency, sorting by click, adjustable columns, and .xlsx export: Procurements (bids and notices under Law 14.133 modalities), Contracts (supplier, total value, term, and a status badge showing active/expiring within 60 days/closed), Minutes (object and term, with the same badge), PCA (items from each agency's plan), and Prices (search by item, statistical summary with median, quartiles, and outlier alerts, selection and discard with reason, and reference municipalities). Clicking a row opens the full detail, including the complete JSON record as published on the PNCP and a direct link to the official proceeding. The home screen displays three clickable indicators (total procurements, homologated value in the year, active contracts) and alerts for expiring contracts within 60 days and open proposals. PCA Assembly The PCA module uses the history of already contracted items to suggest the plan for the following fiscal year: it groups similar items by description root, discarding bureaucratic prefixes, and merges groups with different roots but highly overlapping descriptions; it corrects values using the IPCA series (Central Bank) before projecting; it projects quantities by average, last year, highest value, sum, or linear regression trend; it estimates prices by median, average, most recent value, or lowest; it applies a standard safety margin of 10%, editable per item; classifies by ABC curve and groups by family; and flags divergent units, single occurrences, dispersed prices, items already covered by an active minute, and variations against the previous plan. It allows merging and splitting groups, with weighted pricing by volume, and preserves manual adjustments across new generations. The output is a draft for human review, not an import file. Reports Eight reports are described in letterheaded HTML (ready for PDF printing) and, when applicable, also in .xlsx: Procurement List, Contract List, Minutes List, Annual Executive Summary, Fragmentation Alert (self-control that groups dispensations by object similarity and monitors the limits of art. 75, with a window per fiscal year or moving period), PCA Draft, and Price Survey (support for art. 23). Printing is always clear, regardless of the theme selected on screen. Synchronization and Operation On first run, the user selects the municipality (a built-in IBGE table with 5,571 municipalities), and the program downloads the published history since 2021. Each time it opens, it syncs only what changed, respecting a 10-minute interval since the last collection; the Sync button always triggers collection. Municipal agencies are discovered automatically from the procurements, and others can be added by CNPJ. The data resides in a local SQLite database at %LOCALAPPDATA%\Licitarium, treated as a reconstructible cache. Without internet, the program opens with local data and warns that it did not update. The README reports that synchronization in the pilot archive took 33 seconds with 69 queries to the portal, with three parallel phases and re-query only of altered items. In case of portal failure, the client retries five times with increasing delays (30 to 90 s), randomizes intervals between attempts, and reduces simultaneous connections under overload; failures are logged and retried on the next collection. Dashboard The home screen summarizes the fiscal year in four views (Execution, Analysis, Vigilance, and Economy), with alerts above them that lead to the already-filtered list. Charts are SVG drawn by the program itself, without libraries or network, in a palette described as validated for color blindness and contrast, and can be printed in A3 landscape. The README notes that the query powering the four views costs about 120 ms on an archive of 114 MB (3,360 procurements, 25,000 items) and that charts are redrawn when the window changes size. Privacy The program only reads public data from the PNCP: it does not send computer data, has no telemetry or user account, and does not open any network port. The only outbound connections are to pncp.gov.br and the public GitHub API, used to check for new versions. Installation and Architecture The recommended path is the executable from the releases page, with no installation, no Python required, and no administrator rights; the README notes that SmartScreen may alert because it is a new unsigned executable, and that Smart App Control on Windows 11 blocks unsigned binaries, disabling automatic updates in that case. Alternatively, it runs from source with pip install -r requirements.txt and python licitarium.py, on Windows 10/11 with WebView2; external dependencies are pywebview, openpyxl, and motor_pncp, with everything else in the Python standard library, targeting Python 3.12. The architecture is single-process: a pywebview/WebView2 window communicating with Python via a js_api bridge, with no HTTP server, port, or firewall; raw JSON for each record is stored as the source of truth, and database columns are projections from it. The repository includes licitarium.py, pncp.py, pca_builder.py, relatorios.py, interface files in ui/ (with four themes via data-theme and vendored fonts), tests in tests/ with pytest and HTTP mocking, UI tests in tests-e2e/ with Playwright, plus DESIGN.md, design/IDENTIDADE.md, and design/DASHBOARD.md. CI runs Python and UI tests on Windows on every push, and upon tagging v*, compiles the executable and attaches it to the release via PyInstaller. In Settings, Save Copy... and Restore Copy... save and restore the entire archive as a .zip, verifying the file and preserving the existing database. Authorship and License The license is MIT (© 2026 Túlio Ribeiro de Moura e Silva). Each version receives a DOI on Zenodo, with suggested citation in the README. The displayed data is public, originating from the PNCP, under Law 14.133/2021 and the Freedom of Information Act, and the project declares it is not an official product of the PNCP or the Federal Government.