Shohruz Makhmudov — home / Drawing set 2026
W-02 ImportCRM — Landed-cost accounting CRM for an electronics import business Business systems Private

ImportCRM

Every import batch costed down to the unit — cargo, customs and cashbacks included — so three co-owners see real margin before they sell.

Dashboard with invested capital, revenue, profit with ROI and cashbacks, a monthly revenue-versus-profit chart, stock KPIs and tables of active batches and recent sales (Russian UI, demo data).
Phone dashboard with the monthly revenue-versus-profit chart, a 2 × 2 grid of stock KPIs and the bottom tab bar.
  1. Landed cost per unit
  2. Ordered vs received
  3. Expected profit before saving
  4. Audit trail per co-owner
Client
Private electronics import business
Year
2025–26
Authorship
Own build
Status
Private
Role
Sole developer: data model, API, interface and deployment.
Surfaces
Web admin · desktop and phone
Languages
RU
Stack
React 18 · Vite · React Router · Node.js · Express · Prisma · PostgreSQL · JWT · Vercel
W-02.1ImportCRM Sheet 1 of 7

Survey — context and problem.

The problem

Three co-owners importing electronics couldn’t see a unit’s real cost once cargo, customs and cashbacks were added.

A small electronics import business, run by three co-owners, buys VR headsets, smartwatches, consoles and accessories from eBay, Amazon, official stores and Alibaba, then resells them locally through Instagram, Telegram, in person and on marketplaces. All the money is in US dollars.

Before ImportCRM, tracking was manual. Once cargo, customs and insurance were added on top of the purchase price, nobody could say what a single unit really cost, so real profit was a guess. Short shipments blurred the line between what was ordered, what arrived and what was actually in stock. Cashbacks from platforms and producers arrived weeks later and were easy to lose. And with three partners entering data at the same time, there was no record of who changed what.

The requirements were fixed in a detailed specification (v3.2, December 2025): batches as the unit of accounting, ordered-versus-received tracking, cost allocation, profit on every sale, a full audit trail and equal rights for all three co-owners.

W-02.2ImportCRM Sheet 2 of 7

Authorship — who built what.

Own buildSole developer: data model, API, interface and deployment.Client: Private electronics import businessVisibility: Demo data AI-assisted — I build with AI coding agents — Codex, Claude Code, Antigravity. Spec, architecture decisions, review, QA, deployment and handover are mine.

What was mine

  • Delivered the full system against a detailed specification (TZ v3.2)
  • Data model: 9 Prisma models, migrated from SQLite to Postgres
  • Landed-cost engine and sale-time profit snapshots
  • 38-endpoint Express API with JWT auth and audit logging
  • React interface for desktop and phone, with bottom sheets and stacked table cards
  • Serverless deployment on Vercel with managed Postgres

AI in the loop

I build with AI coding agents — Codex, Claude Code, Antigravity. Spec, architecture decisions, review, QA, deployment and handover are mine.

Agents on this project: Antigravity · Codex

Credits & notes

  • Screens show the September 2026 polish build (charts, unified money formatting, corrected stock KPI) on a fictional demo database. The production system and its data are private.
  • Interface in Russian, as used by the business.
W-02.3ImportCRM Sheet 3 of 7

Plan — the system, drawn first.

The solution

A batch-based CRM that allocates landed cost to every unit, shows expected profit before a sale is saved and logs every change by partner.

ImportCRM treats every import batch as the unit of accounting. A batch holds its products with expected quantity and unit price; arrivals record what actually came, with shortage notes, and move the batch status automatically. Cargo, customs and insurance are added as batch expenses, and platform or producer cashbacks move from pending to applied. A landed-cost engine re-runs on every arrival, expense or cashback and writes base and effective cost for each unit. Sales are tied to physical stock: the dialog shows expected profit and margin before saving, the server snapshots cost and profit at that moment, and a cancellation restores inventory. Every create, update, delete and sign-in lands in an audit log with old and new values. The same Express app runs locally and as a Vercel serverless function over Postgres.

System schematic · Not to scale W-02.3
Users & surfaces Web admin · desktop and phone RU
04 · Interface React 18 · Vite · React Router
02 · Logic Express 4 · landed-cost engine · sale snapshots
03 · Intelligence Rule-based profit and margin preview
01 · Data PostgreSQL · Prisma · 9 models
00 · Infra Vercel static + serverless function · JWT · bcrypt

Module key

  1. Import batches with products, ordered-vs-received tracking and automatic status
  2. Batch expenses (cargo, customs, insurance) and cashbacks from pending to applied
  3. Base and effective cost per unit, recalculated on every change
  4. New-sale dialog with live expected profit and margin; overselling is refused
  5. Sale cancellation that restores stock and logs the change
  6. Dashboard with invested capital, revenue, profit and ROI, a monthly revenue-vs-profit chart and stock KPIs
  7. Period reports by product category and sales platform
  8. Audit log filterable by action and section

Key decisions

  1. Why the batch is the unit of accounting

    Costs arrive per shipment, not per product. Spreading batch expenses evenly across the units actually received turns a messy shipment into a clean, predictable unit cost that is easy to audit.

  2. Why each sale snapshots its cost

    Profit and margin are frozen at the moment of sale, so a later expense or cashback updates stock costs without rewriting yesterday’s results.

  3. Why every change keeps its old and new value

    Three partners with equal rights need accountability rather than permissions: the audit log records who changed what, in which record, and from which value to which.

  4. Why one Express app runs in two places

    The API is split from its server entry point, so the same code runs as a long-lived process in development and as a single Vercel function in production.

W-02.4ImportCRM Sheet 4 of 7

Elevations — the desktop screens.

Dashboard with invested capital, revenue, profit with ROI and cashbacks, a monthly revenue-versus-profit chart, stock KPIs and tables of active batches and recent sales (Russian UI, demo data).
Phone dashboard with the monthly revenue-versus-profit chart, a 2 × 2 grid of stock KPIs and the bottom tab bar.

All elevations 05

  1. Fig. 4.1 September period report: revenue, cashbacks, expenses, losses, gross and net profit, average margin and revenue versus profit by product category.
  2. Fig. 4.2 Update-arrival dialog: received quantities entered per product against the order, with a note explaining the shortage.
  3. Fig. 4.3 Inventory with in-stock, sold, under-repair and damaged counts and a per-product comparison of base and effective cost.
  4. Fig. 4.4 Audit log of which co-owner created or changed what, including the automatic stock updates after each sale.
  5. Fig. 4.5 Sign-in screen with an ImportCRM brand panel summarising the main capabilities beside the email and password form.
W-02.5ImportCRM Sheet 5 of 7

Details — the mobile screens.

New-sale bottom sheet on a phone, showing the selected item’s effective cost and the expected profit and margin.
Phone dashboard with the monthly revenue-versus-profit chart, a 2 × 2 grid of stock KPIs and the bottom tab bar.
On phones the sales table turns into labelled cards, each with a status badge, a status selector and a cancel action.

Every mobile screen 04

Phone dashboard with the monthly revenue-versus-profit chart, a 2 × 2 grid of stock KPIs and the bottom tab bar.
Fig. 5.1 Phone dashboard with the monthly revenue-versus-profit chart, a 2 × 2 grid of stock KPIs and the bottom tab bar.
New-sale bottom sheet on a phone, showing the selected item’s effective cost and the expected profit and margin.
Fig. 5.2 New-sale bottom sheet on a phone, showing the selected item’s effective cost and the expected profit and margin.
On phones the sales table turns into labelled cards, each with a status badge, a status selector and a cancel action.
Fig. 5.3 On phones the sales table turns into labelled cards, each with a status badge, a status selector and a cancel action.
Mobile navigation drawer with the six sections and the signed-in co-owner’s profile.
Fig. 5.4 Mobile navigation drawer with the six sections and the signed-in co-owner’s profile.
1 / 4
W-02.6ImportCRM Sheet 6 of 7

Materials schedule — the stack, and why.

W-02.6 · Materials schedule
LayerMaterialWhy
01DataPostgreSQL · Prisma · 9 modelsRelational integrity for batches, stock and sales; the same schema runs on SQLite for local demos.
02LogicExpress 4 · landed-cost engine · sale snapshotsCosts recompute on every arrival, expense or cashback; sold units keep the cost they were sold at.
03IntelligenceRule-based profit and margin previewPartners see the expected result before committing a sale — plain arithmetic, no guesswork.
04InterfaceReact 18 · Vite · React RouterOne responsive admin: sidebar on desktop; drawer, tab bar and bottom sheets on phones.
05InfraVercel static + serverless function · JWT · bcryptOne deploy for interface and API, with stateless auth that suits serverless.

Stack

  • React 18
  • Vite
  • React Router
  • Node.js
  • Express
  • Prisma
  • PostgreSQL
  • JWT
  • Vercel
W-02.7ImportCRM Sheet 7 of 7

Completion — outcome and links.

Verified facts

REST endpoints
38
Source: from the repository, Sep 2026
data models
9
Source: from the repository, Sep 2026

Want to see it running?

I can walk you through the live system on demo data and explain the decisions behind it.

Request a walkthrough
Next sheet W-03 TechGeek.uz Smart-glasses storefront for Uzbekistan, RU / UZ Commerce 2025–26