sidon.dev

supply-base-api.md · sidon.dev

Dynamic supply base reassignment API

Part of: Senior Developer · Backend, Ipiranga (Grupo Ultra)

A Python/FastAPI API that automates the monthly reassignment of customers’ supply bases. It starts from the recommendations of a logistics network optimizer and integrates with the commercial system’s microservices.

  • Main author of the repository, from the initial setup (following the corporate template) through the business rules.
  • Processing of CIF reallocations and FOB base ranking, with price lookups, data disaggregation and aggregation, and the plan’s adherence index.
  • Domain organized with Repository, Unit of Work and Message Bus/Commands, with aggregates identified from the data model.
  • Concurrency control with PostgreSQL locks for runs triggered by a scheduler (CronJob).
  • Technical specification, OpenAPI contract, ER and sequence diagrams, and structured logging with Fluent Bit.
  • Python
  • FastAPI
  • SQLAlchemy
  • PostgreSQL (RDS)
  • Docker
  • AWS EKS