Back to all projects
Stores and appsB2Clive

NL Collection — footwear store on Saleor

A live online store of shoes and accessories in Romanian and Russian. 1C owns the catalog, managers fill in product cards, and the site itself decides what to show. This case study is about keeping these three sources out of each other's way.

My role: Project engineer and full-stack developer: adapting the Saleor backend and dashboard to the client's requirements, integration services for 1C, MAIB payments and images. Set up the whole project infrastructure on the client's production server: Coolify, Docker Compose, Traefik, CI/CD. Colleagues built the Next.js storefront.

12 a day
full exports from 1C
14
consecutive sync stages
614
tests in four services
138
tests of product visibility rules
NL Collection — footwear store on Saleor

The task

Products, prices and stock live in 1C, while managers add photos, categories, brands and texts on the site. 1C sends a full snapshot of its database every two hours, and the exchange must not overwrite manual work.

Shoes are sold by size, sizes are stored in different warehouses, and some products drop out of the export. A customer must not see what cannot be bought, and a manager must not have to guess why a product disappeared.

Architecture

The core is Saleor (Django, GraphQL). The services are connected as Saleor apps and work with it through GraphQL and webhooks.

  1. Who uses it
    StorefrontNext.js, RO and RU
    Dashboardcustomized Saleor Dashboard
    1Ca full snapshot every two hours
  2. Entry
    TraefikHTTPS, rate limiting
    GraphQL APIthe single Saleor entry point
  3. Modules and services
    Visibilitybackend module: what to show and sell
    1CFastAPI: queue, sync, reports
    MAIBFastAPI, ARQ: payments and refunds
    Imagesproduct photo sync
    CMSWagtail, GraphQL with Strawberry
  4. Data and deployment
    PostgreSQLdata and search
    Redis, Celerycache and background tasks
    Coolify, Docker Composeproduction server, a separate container for each process
    GitHub ActionsCI/CD: checks and deployment

Key decisions

The site decides product visibility, not the sync

The sync reports one fact: whether a product is in the latest export. The backend computes the rest from a rule table: manual ban, card completeness, stock, price. The rules know nothing about the database and are covered by fast tests.

Why
Two places used to make this decision, and they diverged. Now the manager has one manual checkbox, and the card itself lists what is missing.
Trade-off
A new condition changes the visibility of the whole catalog, so it ships switched off and with a report on its consequences.

A fuse against mass hiding

If a recalculation would unpublish or remove from the catalog too large a share of products, the write is cancelled and the reason is given. An incomplete export does not zero out stock.

Why
A single truncated export could have emptied the storefront.
Trade-off
A genuine mass change is made by hand, with a separate command.

A manual edit outranks the export

Prices and stock always come from 1C, a name only until a manager edits it, and the sync does not touch categories and brands. To recognize a human edit, a fingerprint of the last write is stored next to the value.

Why
The sync runs twelve times a day and would erase any editor's work.
Trade-off
It needs a “who owns what” table and a guide for managers.

The queue remembers only the latest snapshot

One sync runs at a time. If two exports arrive meanwhile, the last one goes to work.

Why
Every export is complete, so the intermediate ones are not needed. Parallel syncs would rewrite the same products.
Trade-off
A change in 1C reaches the storefront in 2–3 hours.

Payment is a separate app

The storefront talks only to Saleor. The MAIB app accepts signed webhooks from the core and responses from the bank, keeps its own data, and can re-check a payment and make a refund.

Why
The payment result does not depend on whether the customer returned from the bank page, and the bank credentials reach neither the core nor the storefront.
Trade-off
One more service with its own database, migrations and monitoring.

Card payment to the courier without a gateway

The money does not go through the site, so the method is a minimal plugin: switched on, it is visible on the storefront; switched off, it disappears.

Why
It needed no new tables or migrations, and it is switched on in the dashboard.
Trade-off
The system does not know whether the payment to the courier went through.

Hard parts

The scheduler stopped after a minute

One schedule entry was never considered due and stayed first in Celery's queue. Everything else stopped working: search reindexing, price and visibility recalculation. A workaround process helped first, then the cause was found by comparison on a separate broker.

A sold-out product stayed “in stock”

1C does not send zero balances: the row simply disappears. The sync visited only what arrived, so the stock froze. The old test built its data by hand and could not reproduce the bug, so it was rewritten to follow the real path.

Prices with a fractional tail

1C calculates markups as percentages and sends prices with extra decimals. Saleor rejected the whole update. Prices are now rounded on parsing, and the reason for a rejection goes into the report.

Stack

Backend
Python, Django, Saleor, GraphQL, Celery
Services
FastAPI, Wagtail, Strawberry, Tortoise ORM, ARQ
Data
PostgreSQL, Redis
Dashboard and storefront
React, TypeScript, Next.js (storefront by colleagues)
Deployment
Coolify, Docker, Docker Compose, Traefik, GitHub Actions (CI/CD)

Need a similar system?

Tell me about the task — I reply within a day in RU, RO or EN.