Work
Entegretzy: marketplace order and e-invoice integration (SaaS)
A multi-tenant SaaS that brings Trendyol, Hepsiburada and N11 orders into one panel, issues Turkish e-Arşiv/e-Fatura invoices through Nilvera in one click and passes the invoice link back to the marketplace.
- Client
- Kodzoft — kendi ürünü
- Services
- Ready-made softwareCustom software

Goal
Marketplace sellers repeat the same loop every day: see the order, issue its invoice, paste the link into the marketplace, prepare the package. Entegretzy collapses that loop into one panel, records every step and never invoices an order twice.
What we did
Turborepo monorepo: a Next.js 16 app (panel, API, webhooks), marketplace clients (Trendyol order stream and webhook, Hepsiburada, N11 REST + SOAP), a provider-agnostic e-invoice layer with a Nilvera client, a job scheduler and an e-mail package.
No extra server: Vercel Cron calls a “tick” every minute; due jobs are leased in the database (FOR UPDATE SKIP LOCKED). Job functions are independent of the transport, so moving to a dedicated worker later only swaps that layer.
Tenant isolation with PostgreSQL row-level security: the app connects with a restricted role and every tenant access goes through a single wrapper. Marketplace and Nilvera keys are stored with AES-256-GCM envelope encryption.
Invoice flow: package set to picking on the marketplace → e-Fatura if the buyer is registered, e-Arşiv otherwise → public PDF link sent to the marketplace → package invoiced. No invoice on amount mismatch; idempotent retries.
Identity and licensing live on kodzoft.com: kodzoft as OIDC provider, “Sign in with Kodzoft”, signed licence events on every subscription change (HMAC, time tolerance, queued retries).
UI: shadcn/ui, bulk invoicing with TanStack Table, URL-backed filters, command palette, sales chart, light/dark themes. Alert e-mails via Resend with a 24-hour repeat limit.
Highlights
Even when an order arrives through both the webhook and polling, the idempotent upsert and “never overwrite newer data” rule keep it conflict-free. Live: entegretzy.kodzoft.com.