Files
dtf-system/docs
Cauê Faleiros e3d5558198
All checks were successful
Build and deploy / Validate source (push) Successful in 9s
Build and deploy / Integration suite on a real stack (push) Successful in 2m49s
Build and deploy / Secret scan and release gate (push) Successful in 9s
Build and deploy / Publish images and notify Portainer (push) Has been skipped
feat: connect Tiny through its v3 API with OAuth
Tiny v3 replaces the v2 token adapter. An operator connects Tiny once from
the Kanban; the callback is authorised by a single-use state, because Tiny's
cross-site redirect does not carry the SameSite=Strict operator cookie.
Tokens are kept in provider_tokens, the refresh token rotates under a row
lock, and the worker keeps the connection alive while order creation is off.

Orders find or create the customer's contact by CNPJ, then POST /pedidos
with product ids from TINY_PRODUCT_TEXTIL_FOLHA, _TEXTIL_AVULSA, _UV_FOLHA
and _UV_AVULSA and numeroOrdemCompra DTF-<number>; a retry searches the
customer's recent orders for that number first. The product settings avoid a
_FILE suffix, which the secrets loader reads as a secret file path.

Production passes the application credentials through but keeps
TINY_ADAPTER fake: Tiny has no sandbox, so creating real orders waits for a
supervised test. compose.providers.yaml gives the local API and worker an
internet route for provider testing; the default local stack still has none.

Verified with the full CI integration sequence locally, including the new
tiny_oauth_test against the real database.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-24 12:46:09 -03:00
..

Documents

File What it is
reuniao-2026-09-09-anotacoes.pdf Meeting notes that set the business direction: the bottleneck, the 24h goal, the automation and payment decisions. Still the record of what was asked for.
roadmap-cliente.pdf The client-facing plan, as last sent. Generated by tools/generate_dtf_report.py; regenerate rather than edit.
historico/ The original specification and prototype documents. Background only — they describe a model this system does not implement.

Current engineering documents live at the repository root: CONTEXT.md for how the system works, ROADMAP.md for what is outstanding, LOCAL_SETUP.md to run it, PORTAINER.md to deploy it, SECURITY_REPORT.md and PRODUCTION_INPUTS.md for the security position and the decisions still owed by the client.

Weekly client reports are deliverables, not repository content. They are produced for a specific week and are deliberately not versioned here.