Back to Projects
Transparência BR API
Transparência BR API
2026-05-14
Backend Developer

Transparência BR API

Async REST API built with FastAPI that exposes four datasets from Brazil's Federal Transparency Portal (CGU) — corporate card spending, official travel, contracts and public bids — through versioned /v1/ endpoints. Every page fetched is normalized and stored in PostgreSQL, and stored records can be filtered by agency, period and value range.

Key Features

  • Explicit layers (api, services, clients, schemas, models, core): business logic depends neither on FastAPI nor on the external API's format.

  • pytest suite covering all four resources, with the Portal mocked via pytest-httpx so tests don't depend on the source being available, running on GitHub Actions on every push.

  • httpx client with retry on 429 and explicit timeouts, custom exceptions with centralized handling, and a /health endpoint.

Technical Challenges

  • Keeping the integration stable under the Transparency Portal's rate limit, turning third-party failures into predictable API responses instead of stack traces.

  • Normalizing heterogeneous Portal data — dates in two formats and values as Brazilian-formatted text — into DATE and NUMERIC, with a migration that converts existing data losslessly and background writes that keep the API up if the database goes down.

Project Images

Transparência BR API — Screenshot 1
Transparência BR API — Screenshot 2
Transparência BR API — Screenshot 3

Other Projects

Explore other projects and solutions I have built.

View All Projects →

Portfolio

Featured Projects

Personal Portfolio

Modern, responsive personal portfolio with bilingual support (EN/PT), dark theme, smooth animations, and a secure contact form powered by EmailJS and reCAPTCHA v3.

Next.js 15TypeScriptReactTailwind CSSEmailJS
Transparência BR API

Async REST API built with FastAPI that exposes four datasets from Brazil's Federal Transparency Portal (CGU) — corporate card spending, official travel, contracts and public bids — through versioned /v1/ endpoints. Every page fetched is normalized and stored in PostgreSQL, and stored records can be filtered by agency, period and value range.

PythonFastAPIPostgreSQLSQLAlchemy 2Alembic
Local-LLM Email Triage Agent

Agent that sorts incoming email into 8 semantic categories with an LLM running locally (Ollama + llama3.1), orchestrated by self-hosted n8n on Docker Compose. Prompt, categories and thresholds live in versioned YAML, and no content is sent to third-party APIs.

Pythonn8nOllamallama3.1Docker Compose
Skin Analyser — AI Skin Lesion Triage

Classification pipeline for dermoscopic images from the public HAM10000 dataset: OpenCV preprocessing, lesion-level splits with no data leakage, 8 CNN architectures compared with transfer learning, and evaluation by F1, recall, AUC and confusion matrix. Best result on the lesion-level test set: ResNet50, with 73% recall and 0.85 AUC for melanoma. A triage project: it does not diagnose.

PythonTensorFlow/KerasScikit-learnOpenCVPandas
Transparência BR API | Claudinei Alves