<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Ricardo Grangeia</title><link>https://ricardo.grangeia.pt/</link><description>Recent content on Ricardo Grangeia</description><generator>Hugo -- 0.157.0</generator><language>en</language><copyright>2008-2026 Ricardo Grangeia Dias</copyright><lastBuildDate>Tue, 14 Apr 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://ricardo.grangeia.pt/index.xml" rel="self" type="application/rss+xml"/><item><title>ATCUD PDF QR Code Reader</title><link>https://ricardo.grangeia.pt/projects/atcud-pdf-qr-code-reader/</link><pubDate>Tue, 14 Apr 2026 00:00:00 +0000</pubDate><guid>https://ricardo.grangeia.pt/projects/atcud-pdf-qr-code-reader/</guid><description>&lt;p&gt;HTTP service that reads and decodes QR codes from Portuguese fiscal documents (PDFs), returning structured JSON with issuer tax IDs, buyer information, document types, VAT lines, and totals.&lt;/p&gt;
&lt;p&gt;No PDF files are stored on the server — files are written to temporary OS storage, processed, and immediately deleted.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="live-prodution"&gt;Live Prodution&lt;/h2&gt;
&lt;p&gt;Try it online — no account needed:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;a href="https://qrcode.appa8.com"&gt;qrcode.appa8.com&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="features"&gt;Features&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;PDF upload via HTTP multipart&lt;/li&gt;
&lt;li&gt;QR code detection across all pages&lt;/li&gt;
&lt;li&gt;ATCUD validation per AT specification&lt;/li&gt;
&lt;li&gt;Raw scan endpoint (&lt;code&gt;/scan&lt;/code&gt;) and structured parse endpoint (&lt;code&gt;/parse&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;Embedded Portuguese web interface&lt;/li&gt;
&lt;li&gt;Interactive OpenAPI 3.1 / Swagger documentation&lt;/li&gt;
&lt;li&gt;Docker and Portainer ready&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;h2 id="api-endpoints"&gt;API Endpoints&lt;/h2&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Endpoint&lt;/th&gt;
&lt;th&gt;Description&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;POST /api/v1/document/scan&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Raw QR code content&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;POST /api/v1/document/parse&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Structured fiscal data&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;GET /api/v1/version&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Service metadata&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;GET /health&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Health check&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;GET /docs&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Swagger documentation&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;hr&gt;
&lt;h2 id="tech-stack"&gt;Tech Stack&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Go&lt;/li&gt;
&lt;li&gt;Gin (HTTP framework)&lt;/li&gt;
&lt;li&gt;Huma v2 (OpenAPI/Swagger)&lt;/li&gt;
&lt;li&gt;gozxing (QR detection)&lt;/li&gt;
&lt;li&gt;poppler-utils / pdftoppm (PDF rendering)&lt;/li&gt;
&lt;li&gt;HTML + Tailwind CSS + Vanilla JS (frontend)&lt;/li&gt;
&lt;li&gt;Docker / Docker Compose&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;h2 id="architecture"&gt;Architecture&lt;/h2&gt;
&lt;p&gt;Follows a simplified Domain-Driven Design with separate layers for configuration, domain entities, application services, infrastructure adapters, HTTP interfaces, and embedded UI.&lt;/p&gt;</description></item><item><title>MailFlow Engine</title><link>https://ricardo.grangeia.pt/projects/mailflow/</link><pubDate>Thu, 01 Jan 2026 00:00:00 +0000</pubDate><guid>https://ricardo.grangeia.pt/projects/mailflow/</guid><description>&lt;p&gt;AI-powered email automation and classification engine, part of the &lt;strong&gt;Appa8 AI Process Automation Hub&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;MailFlow ingests emails from IMAP or Microsoft 365, classifies them using a hybrid rule + LLM approach, automatically routes them to the correct folders, and provides full supervision via a web dashboard. Designed for &lt;strong&gt;on-premise deployments&lt;/strong&gt; where data privacy is critical.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="features"&gt;Features&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;IMAP and Microsoft Graph / Outlook ingestion&lt;/li&gt;
&lt;li&gt;RFC822 email parsing with attachment handling&lt;/li&gt;
&lt;li&gt;Hybrid classification: rule-based matching + local LLM validation (Qwen 2.5)&lt;/li&gt;
&lt;li&gt;Auto-move to classified folders&lt;/li&gt;
&lt;li&gt;PDF export with customisable path templates&lt;/li&gt;
&lt;li&gt;Invoice worker: PDF QR extraction and payment data parsing&lt;/li&gt;
&lt;li&gt;Learning Mode: human review and approval before filing&lt;/li&gt;
&lt;li&gt;Natural language search via Telegram (&amp;ldquo;send invoices from vendor X in January&amp;rdquo;)&lt;/li&gt;
&lt;li&gt;Encrypted credential storage (Fernet)&lt;/li&gt;
&lt;li&gt;Redis job queues with AOF persistence&lt;/li&gt;
&lt;li&gt;PostgreSQL persistence (async SQLAlchemy 2.0)&lt;/li&gt;
&lt;li&gt;Streamlit supervision dashboard&lt;/li&gt;
&lt;li&gt;Docker-based deployment with Traefik reverse proxy&lt;/li&gt;
&lt;li&gt;CI/CD via GitHub Actions + Portainer auto-deployment&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;h2 id="architecture"&gt;Architecture&lt;/h2&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-text" data-lang="text"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Email Inbox (IMAP / Microsoft 365)
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; │
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; ▼
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; email-worker
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; (poll, parse, route)
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; │
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; ▼
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; Redis Queue
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; │
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; ┌──────┴───────┐
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; ▼ ▼
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; ai-worker invoice-worker
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; (LLM classify) (QR + finance)
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; │
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; ┌────┴────────────────────┐
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; ▼ ▼ ▼
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;folder review-worker query-worker
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; move (Learning Mode) (NL search)
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; │
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; telegram-bot
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; (approvals + search)
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Worker&lt;/th&gt;
&lt;th&gt;Description&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;email-worker&lt;/td&gt;
&lt;td&gt;Polls IMAP / M365, routes by worker type&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;ai-worker&lt;/td&gt;
&lt;td&gt;Main classification engine with Redis job processing&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;invoice-worker&lt;/td&gt;
&lt;td&gt;Financial document extraction from PDF QR codes&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;review-worker&lt;/td&gt;
&lt;td&gt;Learning Mode human review cards&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;query-worker&lt;/td&gt;
&lt;td&gt;Natural language search processing&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;telegram-bot&lt;/td&gt;
&lt;td&gt;User interface for commands and approvals&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;hr&gt;
&lt;h2 id="dashboard"&gt;Dashboard&lt;/h2&gt;
&lt;p&gt;The Streamlit interface provides multi-tab supervision:&lt;/p&gt;</description></item><item><title>INCENTEA – Tecnologia de Gestão</title><link>https://ricardo.grangeia.pt/portfolio/2025-03-incentea/</link><pubDate>Mon, 17 Mar 2025 00:00:00 +0000</pubDate><guid>https://ricardo.grangeia.pt/portfolio/2025-03-incentea/</guid><description>Solutions Developer at INCENTEA in Lisbon, extending Primavera ERP with custom C# integrations, SQL Server optimizations, and WebServices for business clients.</description></item><item><title>Sabores do Futuro – Restauração</title><link>https://ricardo.grangeia.pt/portfolio/2018-01-mrpizza-lisboa/</link><pubDate>Sat, 01 Feb 2025 00:00:00 +0000</pubDate><guid>https://ricardo.grangeia.pt/portfolio/2018-01-mrpizza-lisboa/</guid><description>Internal management platform for Sabores do Futuro restaurant group, covering foodcost, HR, documents, equipment, and fleet. Built with PHP Yii2, Vue, Docker.</description></item><item><title>Equipment Gest Assets</title><link>https://ricardo.grangeia.pt/projects/assettraker/</link><pubDate>Fri, 24 Mar 2023 00:00:00 +0000</pubDate><guid>https://ricardo.grangeia.pt/projects/assettraker/</guid><description>&lt;h1 id="-equipment-gest-assets"&gt;🏗️ Equipment Gest Assets&lt;/h1&gt;
&lt;p&gt;&lt;strong&gt;A logistics, maintenance, and chain-of-custody tracking system for industrial and construction assets.&lt;/strong&gt;&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="-overview"&gt;📋 Overview&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Equipment Gest Assets&lt;/strong&gt; is designed to eliminate the &amp;ldquo;black hole&amp;rdquo; of equipment tracking in the construction and industrial sectors. It provides a centralized source of truth for every tool and machine in your fleet, ensuring managers know exactly &lt;strong&gt;where&lt;/strong&gt; an asset is, &lt;strong&gt;who&lt;/strong&gt; is responsible for it, and &lt;strong&gt;what&lt;/strong&gt; its current operational health is.&lt;/p&gt;</description></item><item><title>RRGEST</title><link>https://ricardo.grangeia.pt/portfolio/2021-05-rrgest/</link><pubDate>Sat, 01 May 2021 00:00:00 +0000</pubDate><guid>https://ricardo.grangeia.pt/portfolio/2021-05-rrgest/</guid><description>Updated website for RRGEST – Apoio à Gestão, an accounting and consulting firm in Leiria. Redesigned in 2021 through TecPc – Serviços de Informática.</description></item><item><title>AUTOROMAO</title><link>https://ricardo.grangeia.pt/portfolio/2021-03-autoromao/</link><pubDate>Mon, 01 Mar 2021 00:00:00 +0000</pubDate><guid>https://ricardo.grangeia.pt/portfolio/2021-03-autoromao/</guid><description>Redesigned website for Autoromão, an automotive business in Leiria. Updated version developed in 2021 through TecPc – Serviços de Informática.</description></item><item><title>FV Music Banda</title><link>https://ricardo.grangeia.pt/portfolio/2019-06-fvmusic/</link><pubDate>Sat, 01 Jun 2019 00:00:00 +0000</pubDate><guid>https://ricardo.grangeia.pt/portfolio/2019-06-fvmusic/</guid><description>Website for FV Music Banda, a music band based in Leiria, Portugal. Created in 2019 as a freelance project through TecPc – Serviços de Informática.</description></item><item><title>Solicitadora Denise Ferreira</title><link>https://ricardo.grangeia.pt/portfolio/2018-08-deniseferreira/</link><pubDate>Wed, 01 Aug 2018 00:00:00 +0000</pubDate><guid>https://ricardo.grangeia.pt/portfolio/2018-08-deniseferreira/</guid><description>Professional website for Solicitadora Denise Ferreira, a legal services professional in Leiria. Developed in 2018 through TecPc – Serviços de Informática.</description></item><item><title>Primavida</title><link>https://ricardo.grangeia.pt/portfolio/2017-04-primavida/</link><pubDate>Sat, 01 Apr 2017 00:00:00 +0000</pubDate><guid>https://ricardo.grangeia.pt/portfolio/2017-04-primavida/</guid><description>Website for Primavida, a business in Leiria, Portugal. Built in 2017 through TecPc – Serviços de Informática as a freelance web development project.</description></item><item><title>Zen Family</title><link>https://ricardo.grangeia.pt/portfolio/2016-12-zenfamily/</link><pubDate>Thu, 01 Dec 2016 00:00:00 +0000</pubDate><guid>https://ricardo.grangeia.pt/portfolio/2016-12-zenfamily/</guid><description>Website for Zen Family, a wellness or lifestyle brand in Lisbon. Developed in 2016 through TecPc – Serviços de Informática using PHP and WordPress.</description></item><item><title>Sucatas Pedrosa</title><link>https://ricardo.grangeia.pt/portfolio/2016-04-sucataspedrosa/</link><pubDate>Fri, 01 Apr 2016 00:00:00 +0000</pubDate><guid>https://ricardo.grangeia.pt/portfolio/2016-04-sucataspedrosa/</guid><description>Website for Sucatas Pedrosa, a scrap and recycling business in Aveiro. Built in 2016 as part of TecPc freelance work, using PHP and WordPress.</description></item><item><title>Carroçarias Ilídio</title><link>https://ricardo.grangeia.pt/portfolio/2015-02-carrocariasilidio/</link><pubDate>Sun, 01 Feb 2015 00:00:00 +0000</pubDate><guid>https://ricardo.grangeia.pt/portfolio/2015-02-carrocariasilidio/</guid><description>Website for Carroçarias Ilídio, a vehicle bodywork business in Leiria. Developed in 2015 through TecPc – Serviços de Informática using PHP and WordPress.</description></item><item><title>Autoromão</title><link>https://ricardo.grangeia.pt/portfolio/2014-07-autoromao/</link><pubDate>Tue, 01 Jul 2014 00:00:00 +0000</pubDate><guid>https://ricardo.grangeia.pt/portfolio/2014-07-autoromao/</guid><description>Business website for Autoromão, an automotive company in Leiria, Portugal. Built in 2014 via TecPc – Serviços de Informática using PHP and MySQL.</description></item><item><title>Frutas LizCentro</title><link>https://ricardo.grangeia.pt/portfolio/2014-06-frutaslizcentro/</link><pubDate>Sun, 01 Jun 2014 00:00:00 +0000</pubDate><guid>https://ricardo.grangeia.pt/portfolio/2014-06-frutaslizcentro/</guid><description>Website for Frutas LizCentro, a fruit and produce business in Leiria. Developed in 2014 through Hosting 4 Web with PHP, MySQL, and WordPress.</description></item><item><title>Fernando Vieira</title><link>https://ricardo.grangeia.pt/portfolio/2013-09-fernandovieira/</link><pubDate>Sun, 01 Sep 2013 00:00:00 +0000</pubDate><guid>https://ricardo.grangeia.pt/portfolio/2013-09-fernandovieira/</guid><description>Personal or business website created for Fernando Vieira, developed while working at TecPc – Serviços de Informática in Leiria, Portugal in 2013.</description></item><item><title>Hosting Site</title><link>https://ricardo.grangeia.pt/portfolio/2013-08-hosting4web/</link><pubDate>Thu, 01 Aug 2013 00:00:00 +0000</pubDate><guid>https://ricardo.grangeia.pt/portfolio/2013-08-hosting4web/</guid><description>Hosting services website built for Hosting 4 Web, a self-employed venture providing web hosting, server management, and domain services in Leiria.</description></item><item><title>Brightstar</title><link>https://ricardo.grangeia.pt/portfolio/2010-11-brightstar/</link><pubDate>Mon, 01 Nov 2010 00:00:00 +0000</pubDate><guid>https://ricardo.grangeia.pt/portfolio/2010-11-brightstar/</guid><description>Corporate website for Brightstar – Instrumentos Científicos, developed in 2010 in Aveiro, Portugal. Built with PHP, MySQL, and Joomla.</description></item><item><title>BS-Astro E-commerce Platform</title><link>https://ricardo.grangeia.pt/portfolio/2010-02-bs-astro/</link><pubDate>Mon, 01 Feb 2010 00:00:00 +0000</pubDate><guid>https://ricardo.grangeia.pt/portfolio/2010-02-bs-astro/</guid><description>Custom e-commerce platform built for BS-Astro at Brightstar, Aveiro. PHP and MySQL solution with full hosting infrastructure developed in 2010.</description></item><item><title>RRGEST – Apoio à Gestão</title><link>https://ricardo.grangeia.pt/portfolio/2008-02-rrgest-01-site/</link><pubDate>Tue, 01 Jan 2008 00:00:00 +0000</pubDate><guid>https://ricardo.grangeia.pt/portfolio/2008-02-rrgest-01-site/</guid><description>Company website and IT support for RRGEST, an accounting and consulting firm in Leiria. Built with PHP and MySQL as part of an early career role from 2008 to 2010.</description></item><item><title>RRGEST – Apoio à Gestão</title><link>https://ricardo.grangeia.pt/portfolio/2008-02-rrgest-02-rsinox/</link><pubDate>Tue, 01 Jan 2008 00:00:00 +0000</pubDate><guid>https://ricardo.grangeia.pt/portfolio/2008-02-rrgest-02-rsinox/</guid><description>RSINOX client website developed at RRGEST in Leiria. A web project from 2008 built during an IT technician and web programmer role.</description></item><item><title>About</title><link>https://ricardo.grangeia.pt/about/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://ricardo.grangeia.pt/about/</guid><description>Software developer with nearly 20 years of experience in backend systems, DevOps, and AI services. Skilled in PHP, Docker, and Linux infrastructure.</description></item><item><title>Contact</title><link>https://ricardo.grangeia.pt/contact/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://ricardo.grangeia.pt/contact/</guid><description>Get in touch with Ricardo Grangeia for remote opportunities, technical consulting, or collaboration. Based in Portugal, open to remote EU roles.</description></item><item><title>Path</title><link>https://ricardo.grangeia.pt/path/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://ricardo.grangeia.pt/path/</guid><description>Professional timeline of Ricardo Grangeia: software developer, full stack engineer, and IT specialist with experience across Portugal since 2008.</description></item><item><title>Thanks</title><link>https://ricardo.grangeia.pt/thanks/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://ricardo.grangeia.pt/thanks/</guid><description>&lt;div class="thanks-page"&gt;
&lt;div class="thanks-header"&gt;
&lt;p class="thanks-date"&gt;March 2026&lt;/p&gt;
&lt;h1 class="thanks-title"&gt;Thanks to my Parents&lt;/h1&gt;
&lt;div class="thanks-divider"&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class="thanks-photo"&gt;
&lt;img src="https://ricardo.grangeia.pt/parents.jpg" alt="My Parents"&gt;
&lt;/div&gt;
&lt;div class="thanks-text"&gt;
&lt;p&gt;I have my parents to thank for everything.&lt;/p&gt;
&lt;p&gt;I said farewell to both of them this month, March 2026 —&lt;br&gt;I lost my father and my mother.&lt;/p&gt;
&lt;p&gt;They left too early, but together.&lt;br&gt;
I wish they continue their journey in the next life&lt;br&gt;
and keep watching over me and my sister.&lt;/p&gt;
&lt;p&gt;I hope to honor them until the end.&lt;/p&gt;
&lt;p class="thanks-closing"&gt;Mother and Father, thank you for all you have done for me.&lt;/p&gt;</description></item></channel></rss>