# Reliable data and indicators A number is useful when you know what it means. Metric contracts, availability states and consent-based collection. An engineering foundation that prevents interfaces and AI applications from treating missing information as a measured fact. Data contracts · React · Express · PostgreSQL · Consent · Testing Contracts · local tests ## The problem behind an apparently simple indicator A dashboard can display zero because no event occurred, a filter found no records or an integration failed to respond. Those states have different implications for a business decision. I led implementation and validation of contracts that preserve the distinctions, alongside collection privacy controls. The purpose was to make information interpretable before it reaches an interface or an AI assistant. A convincing chart does not repair an ambiguous contract. Engineering starts with the definition of an indicator, its available source and the conditions under which the application may present a value. Interpretation needs a foundation before presentation can be trusted. ## How this case connects to a product The work combines analytics and collection components. React and Vite support an interface source, while Express and PostgreSQL appear in the backend architecture. This briefing examines payload contracts, filter classification, metric availability, consent and data minimization. Evidence consists of local tests for the analyzed slice without connecting to real advertising accounts or private business operations. The explorable CRM demonstration provides an indicator experience with synthetic records. It is not presented as certification of this case's integrations. Keeping visual experience separate from integration evidence prevents a screen from being used to prove something that its environment does not execute. ## Contracts before visualization Payload contracts establish the expected shape of information entering the application. This boundary helps detect incompatible structure before a component converts it into a chart or summary. Filter classification keeps the scope producing an indicator explicit. A number separated from its definition and period can be technically valid while still encouraging an incorrect interpretation. I treated the contract as part of the product rather than only a convention between programmers. Interface and backend must agree on meaning, availability and context so an assisted decision has a comprehensible foundation. Validation belongs before interpretation, not after a misleading visualization has already been produced. ## Availability is information When a metric is unavailable, the application should preserve that state rather than filling the field with a convenient zero. A measured zero describes the operation; unavailability describes the ability to observe it. Combining them can make a person or a model conclude that nothing happened when a reliable reading was actually missing. This distinction guides charts, summaries and exports. It also allows integration failures to be handled without disguising them as commercial results. Absence acquires an explicit meaning and can be investigated as an operational condition rather than being silently incorporated into a business narrative. ## Consent-based collection and minimization The implemented collector slice requires explicit consent. IP handling uses a hash as part of minimization, reducing exposure of the raw value in the analyzed flow. Hashing does not by itself remove every privacy obligation, and I do not describe it as absolute anonymization. Its effect must be understood within the contract, purpose and other information still associated with an event. Tests exercise collection and privacy with synthetic examples. Public materials contain no real visitor events, private campaign identifiers or third-party records. The same discipline applies to technical examples used to explain how the product behaves. ## Why this also belongs to AI engineering A model can generate a fluent explanation from an incorrect or unavailable indicator. Improving input quality is therefore an important part of AI integration. The application needs to represent measured data, empty scopes and unavailable dependencies. The model should not receive absence silently converted into a numerical fact. This case complements agent runtimes and assistance: contracts and availability states reduce ambiguity before interpretation. It is not presented as model training, distributed processing or a Big Data pipeline. It is product data engineering applied to reliability, making the relationship between information and a generated explanation easier to examine. ## Choices and their costs I preferred preserving unavailability over keeping every card populated. This improves interpretive precision while requiring additional interface states and explanations of their meaning. I preferred explicit consent over collecting for convenience, accepting that some situations produce no event. I chose verifiable contracts instead of assuming an external response format would always match expectations. These choices require coordination across API, interface and tests. The benefit is keeping an observation problem visible as an observation problem. Dashboard appearance should not pressure the backend into inventing a value merely to complete a composition or make a generated narrative sound more certain. ## What was exercised The October 4, 2026 audit passed 9 contract, metric and privacy tests alongside 3 collector tests. These 12 focused tests exercise local rules in the analyzed sources. No real advertising integration or private record was used to establish the scenarios. Validation supports the exercised behaviors without turning the slice into full analytics certification. I do not claim financial outcomes, distributed-scale processing or statistical model training from this evidence. The verifiable contribution is designing and implementing boundaries that prevent missing information, incompatible formats and legitimately measured values from being confused. Test scope remains part of the explanation rather than being hidden behind a total count. ## The next step depends on the question Evolution would begin with the decision an indicator needs to support. Source, period, availability criteria and failure scenarios would then be defined. Real integrations require certified contracts in an appropriate environment, using synthetic records where possible. Only after that would it make sense to evaluate alerts, comparisons or model-generated narratives about those metrics. This is a proposed direction rather than completed work. The case demonstrates that building a product with AI includes caring for information before it reaches a model: its definition, boundaries, quality and relationship to what the interface allows a visitor or decision-maker to conclude from the available evidence. --- César Machado · https://cesarmachado.com