Back to workWork / Onlihub

Onlihub

Technical ownership of a commerce platform

Senior Backend Engineer

The outcome

The work connected the product lifecycle from catalog and inventory to orders, fulfillment and tracking, with ownership extending beyond individual services.

Commerce architecture · Igor Bartenev

A practical example

Connecting a store is more than an API call

A merchant connects a sales channel. The provider may be slow, and the same request may arrive again. The application needs to know what was requested, who is processing it and whether it finished.

Illustrative walkthrough of the implementation

  1. Validate store ownership and the integration’s supported capabilities.

  2. Record the connection request with an idempotency key and an outbox entry.

  3. Let a worker claim the job, renew its lease and record completion or failure.

What this enables

A connection request has a recorded lifecycle instead of depending on one long HTTP request. Retries and exhausted attempts have explicit handling.

Design choice & trade-off

The current implementation keeps intent and worker ownership in PostgreSQL, with bounded concurrency and lease checks. This makes work recoverable, but adds state management and background processing. Delivery is at least once: a provider-side effect still needs idempotency or reconciliation; a local claim token cannot guarantee exactly-once execution in an external service.

Full context & approach

The challenge

Commerce operations had to stay consistent across different product models, warehouses and external systems.

How I approached it

After the lead developer left, I took over development and redesigned the application and database architecture. I implemented an asynchronous FastAPI backend, complex PostgreSQL queries and integrations across commerce and warehouse systems, while coordinating the team and advising the CEO on feasibility.

What I owned and delivered

My responsibility

I joined the existing platform in February 2022 as its second developer. After the lead left, I took responsibility for application architecture, the database and backend, coordinated a small cross-functional team and worked directly with the CEO on feasibility and delivery.

Delivered capability

  • A shared commerce model connects catalog, inventory, orders, fulfillment and tracking across channel-specific systems.

  • APIs and background processing support marketplace and warehouse integrations, with reconciliation of external identifiers and states.

Public product context

Sources checked
stores in the platform’s network
10,000+
MCF orders fulfilled
40,000+

Figures published by Onlihub describe the platform’s reported scale, separately from my contribution and period of work. Amazon lists Onlihub as an MCF integration.

Explore this project

All public links
What that means in practice

Architecture & decisions

01

From developer to technical owner

I joined the startup working alongside an experienced lead. When they left, I took responsibility for the architecture, database and backend, coordinated a small cross-functional team and guided the product through implementation, support and further development. Discussions with the CEO connected business ideas to technical feasibility and delivery decisions.

02

One model across different channels

The original platform was designed for a broader multichannel scenario: a product from one source could be published into another channel. I worked with Amazon, Walmart, eBay, TikTok Shop, Shopify and warehouse integrations, reconciling products, external identifiers, real and virtual warehouses, stock, orders and tracking. That original scope helped give rise to MySellerHub as the products evolved.

03

Asynchronous services and complex SQL

I built and documented API methods with FastAPI, asynchronous processing, threads and queue management. PostgreSQL work included dynamic queries and optimization over large datasets. Recurring-task tooling, parsers and PowerBI analysis complemented the core backend, so integration work and operational processing had their own supporting tools.

04

Architecture that evolved with the product

The platform grew into related products with different responsibilities: supplier operations, retailer workflows and the dedicated high-load catalog. I worked on both architecture and implementation, including subscriptions and one-time payments. Onlihub later appeared as an Amazon MCF integration; that product milestone is separate from my own engineering responsibilities.

Inside the implementation

Architecture in practice

Background work with recorded stateIntegration work uses PostgreSQL-backed tasks with explicit worker ownership, recorded attempts and controlled retries.
  1. Claim a task
  2. Lease and heartbeat
  3. Record the attempt
  4. Complete or retry

Onlihub’s PostgreSQL outbox claims work with SKIP LOCKED and a unique ownership token. Completion, heartbeat and failure updates check that token. Workers claim only as much work as their free execution slots allow, so a lease is not spent waiting in a local queue. Retries are bounded; exhausted attempts go to dead-letter state.

Live updates with bounded queuesOnlihub delivers authenticated WebSocket updates with per-user subscriptions and a resynchronization path for slow clients.
  1. Authenticate and subscribe
  2. Fan out user events
  3. Bound each client queue
  4. Request resynchronization

Redis Pub/Sub carries transient user events to shared subscriptions. Authenticated WebSocket connections receive them through bounded per-client queues. If a queue overflows, older events are dropped and the server requests resynchronization. Origin checks, heartbeat and task cleanup are part of the connection lifecycle.

Image processing and HTTP cachingThe image service keeps originals locally and prepares requested sizes and formats with bounded processing concurrency.
  1. Find or fetch the original
  2. Limit concurrent processing
  3. Resize and encode
  4. Set HTTP cache headers

Originals are fetched on demand, with an in-process lock combining requests for the same missing file. Pillow handles orientation, proportional resizing, backgrounds and encoding outside the async event loop. Original JPEGs can be served directly; HTTP headers set a one-day freshness policy for browser and shared caches, including CDN caches.

Modular code architectureOnlihub groups catalog, orders, finance and integrations into modules with explicit contracts and inward-facing dependencies.
  1. Define business modules
  2. Declare application ports
  3. Implement external adapters
  4. Wire dependencies at startup

Each business module keeps its use cases and contracts together. HTTP handlers call application services: CatalogService depends on a CatalogRepository Protocol, with PostgreSQL queries supplied by an infrastructure adapter. The runtime wires the implementation into the service. Adapters import application contracts; application code stays independent of HTTP and database implementations. Provider connections have separate ports too.

04 / Tools & technologies

Tools & technologies

Explore all skills (90)
Continue exploring

BOS / Business Operations System

Contact / Kraków, Poland

A role or a project? Let’s talk.

Hiring for your team or looking for help with a product? Tell me about the role or the problem. A name, contact and short outline are enough to start.

The portfolio, inside TelegramBrowse projects and send an offer in the Mini App. Open the bot, then choose the app.Open the bot

Start a conversation

A role, a product, or a technical challenge. Share a little context.

To use the form, enable JavaScript. You can also write to me directly on Telegram.

Write on Telegram