Aurasync
A management system for a Nuvemshop store that syncs orders in real time, records offline sales without platform fees and shows the real profit of every sale.

Context
Utopia Pedras sells through Nuvemshop, a leading Latin American e-commerce platform, and also offline, at fairs and through direct sales. To take an offline sale out of stock, the store had to create a manual order in Nuvemshop, and the platform charged a fee for it, even though the sale never went through it.
On top of that, customers, stock and marketing results were scattered, and there was no simple way to know how much profit each sale actually made.
Solution
I built Aurasync, a dashboard that connects to Nuvemshop and brings the store's operation into one place:
- Stock control with restock alerts and an easy-to-read overview.
- Offline sales recorded directly in the system, with no fee, drawing from the same stock as online sales.
- A unified customer base, combining online and offline buyers.
- Custom business and marketing metrics, with indicators that guide the next moves to increase profit.
- Quick access to sales, updated on screen as they happen.



How it works
- Reliable sync. Nuvemshop sends an HMAC-validated webhook with the event ID, and the API fetches the current record. Redeliveries and out-of-order events cause no problems. An incremental sync fetches only what changed since the last run and retries when Nuvemshop rate-limits requests.
- Real time. Each dashboard session keeps a single WebSocket connection. When an order comes in or a product changes, open screens update on their own, without a reload.
- No double stock deductions. One rule applies to every order (online, manual and fair). The system applies only the difference between what an order should deduct and what it already did: reprocessing an order never deducts twice, and cancelling returns the items.
- Real profit per sale. Product cost, packaging, fees, shipping and installments are frozen on each order. Monthly fixed costs, such as accounting and ads, are split across orders at month end.
- A layered back end. Three fixed layers: routes (HTTP and Zod validation), services (business rules) and repositories (PostgreSQL access). Business errors map to the right HTTP status in a single handler.
- Security. Sessions live in an httpOnly cookie with CSRF protection. Signing out, changing a password or deactivating a user revokes access immediately.

The front end uses React, TanStack Query, shadcn/ui and Recharts. The back end runs on Node.js with Fastify and Knex. Everything ships with Docker, CI on GitHub Actions and Caddy as a reverse proxy on a VPS.
Result
- 2,168 orders and 433 products from a real store synced automatically with Nuvemshop.
- Fair sales recorded without platform fees, with stock always accurate.
- 425 automated tests: 298 on the back end, against a real PostgreSQL database, and 127 on the front end.
In production at Utopia Pedras.
Stack
- React
- TypeScript
- Node.js
- Fastify
- PostgreSQL
- WebSocket
- Tailwind CSS
- shadcn/ui
- Docker
- Nuvemshop API