Henrique Poltronieri
All work

2025
Completed

Brownie

Customer records, purchase history and loyalty for a small sales operation, with weekly and monthly reports read from the same data.

RoleBackend and data model

Year2025

SourcePrivate repository

Overview

A management system for a small business that sells directly to repeat customers. It keeps who bought what and when, tracks loyalty from that history, and produces the weekly and monthly numbers the owner actually looks at.

Problem

A checkout total tells you almost nothing. The useful questions are about the same customer over time: how often they come back, what they buy, whether they have earned anything. That requires purchases to be records with an owner and a date, not just amounts.

Solution

Customers and sales are separate tables joined by the purchase. Loyalty is computed from purchase history instead of being kept as a number someone edits, and the weekly and monthly reports are the same query with a different date range.

My role

I modeled the database and wrote the Python logic behind customers, sales, loyalty and reporting, with a Flutter interface on top.

Architecture

Client Flutter application requests
Logic Python customers, sales, loyalty
Reports Period queries weekly · monthly
Storage MySQL customers, purchases

Technologies

  • LanguagePython
  • DatabaseMySQL
  • ClientFlutter / Dart
  • ModelingRelational schema

Challenges

Making loyalty a consequence of purchase history rather than a field somebody can set by hand.

Reporting periods that keep agreeing with the underlying sales as the history grows.

Keeping the customer record useful without collecting more personal data than the business needs.

What I learned

The schema is the product here. Almost every feature request turned out to be answerable — or impossible — depending on a decision I had already made in the table design weeks earlier.

Next