E-commerce · Detergents, cosmetics and hygiene products
Zarshop: a bespoke hygiene-products shop with layered stock control and Jalali reporting
A bespoke online shop on ASP.NET Core and Next.js: a thirty-minute stock reservation, weight- and zone-based shipping across five carriers, Jalali-month sales reporting with PDF export, and the migration of more than five thousand historical orders.
- Client
- Zarshop, Babol
- Industry
- Detergents, cosmetics and hygiene products
- Year
- 2025
- Status
- Live
- Discovery and analysis
- UX and UI design
- Software architecture
- Front-end development
- Back-end and API development
- Database design
- Third-party integrations
- Data migration
- Deployment and DevOps
- Technical SEO
- QA and testing
- Support and ongoing development
The result, in numbers
- 1,178+
- automated backend tests
- 5,000+
- historical orders migrated
- 30 min
- stock reservation cycle
unit and integration
with customers, addresses and statuses preserved
unpaid reservations release automatically
The challenge
Zarshop trades every day — and that was the hardest condition on the project: replacing the previous platform without losing a day of sales.
Three operational problems were on the table. Overselling: when several customers have the last item in their cart at once, the shop must not sell it twice and then cancel one. Data migration: hundreds of products with variants and attributes, customers, addresses and more than five thousand historical orders had to move with their structure and statuses intact. And reporting: the manager needs sales by Jalali month, not Gregorian — which no off-the-shelf tool does properly.
There was one small but expensive detail as well: toman and rial. If the shop displays toman, the gateway charges rial and the report stands somewhere else, an error is certain.
The solution
The architecture was split into three independent parts — storefront, admin panel and API — on a core built with Clean Architecture and the CQRS pattern.
Overselling was solved with layered controls: real-time and cumulative stock checks in the cart, reservation at the moment the order is placed with an atomic database check, and automatic release of unpaid reservations after thirty minutes. Duplicate operations are rejected too, so a second click on "pay" does not create two orders.
Currency is defined once in the domain and stays the same from storefront through order and gateway to report.
Reporting is Jalali from the ground up: sales, customer and product reports by Jalali month, with Jalali filters, tables, charts and PDF export, and weekly, monthly and yearly dashboards. Access is separated too: independent roles for orders, warehouse, content and products, and financial data restricted to the principal manager.
Shipping was modelled properly: calculated from product weight in grams, across Post, Dekapost, Chapar and Tipax, with Snap delivery in Babol and surrounding towns, geographic zones, display priority per method, and packaging costs.
The migration preserved products, variants, attributes, images, categories, customers, addresses and historical orders, and releases go out on the live server with a verified backup, health checks and a fast rollback.
Key features
Layered stock control
Real-time and cumulative checks in the cart, atomic reservation at order placement, and rejection of duplicates — overselling does not happen.
A thirty-minute reservation that releases itself
Stock on an unpaid order releases after thirty minutes, so an item is neither sold twice nor locked away for nothing.
Sales reporting by Jalali month
Sales, customers and products with Jalali filters, tables, charts and PDF export, plus weekly, monthly and yearly dashboards.
Separated access, restricted finance
Independent roles for orders, warehouse, content and products — with financial data restricted to the principal manager.
Shipping by weight and zone
Calculated from weight in grams across Post, Dekapost, Chapar and Tipax, with Snap delivery in and around Babol, packaging costs and display priority.
Guest cart with automatic merge
A customer starts without signing in, and on sign-in their cart merges with the account cart.
One currency, end to end
Toman and rial are defined once in the domain and stay consistent from storefront to order, gateway and report.
Safe releases on a trading shop
A verified backup, health checks, a data integrity check and a fast rollback — an update does not stop trading.
Architecture and stack
- Style
- Monolith
- Patterns
- Clean architectureCQRS
Three independent parts on one core: a storefront on Next.js and React for SEO-friendly rendering and a responsive RTL experience, an admin panel on React and Vite with advanced tables, charts and validated forms, and an API on ASP.NET Core with authentication and policy-based access control.
The core is written with Clean Architecture, separating Domain, Application, Infrastructure and API, and uses CQRS: the write path enforces domain rules and the read path is shaped for reporting.
Data: SQL Server with EF Core for writes and Dapper for reports; Redis for cache. The important decision was atomic stock control at the database level — overselling is a defect that only appears under real concurrency and cannot be solved reliably with a lock in application code.
Security: JWT with refresh tokens, rate limiting on sensitive routes, CORS control, centralised input validation, and role- and policy-based access control. Deployment on Docker and nginx behind a CDN, with event logging and service health checks.
- Front end
- Next.jsReact.jsTypeScriptTailwind CSS
Storefront — SEO-friendly rendering, RTL and responsive
- Front end
- Vite
Admin panel — advanced tables, charts and validated forms
- Back end and API
- ASP.NET CoreC#REST APIClean ArchitectureEntity Framework CoreDapperMediatRFluentValidation
- Database
- SQL Server
- Cache
- Redis
- Infrastructure and deployment
- DockernginxSerilog
Container deployment behind a CDN, with event logging and health checks
Integrations
- ZarinPal payment gateway with a controlled callback
- Post, Dekapost, Chapar, Tipax and Snap for delivery
- SMS.ir with dynamic message templates
Full write-up
Capabilities in detail
Catalogue
Simple and variable products with attributes and variants, unique SKUs, list and discounted prices, image galleries, brands, multi-level categories, related and complementary products, shipping notes, and URL, slug, metadata and SEO tooling.
Cart and checkout
Guest and account carts merged automatically on sign-in, real-time and cumulative stock checks, discount codes, a transparent order summary, saved addresses with a complete province and city list, and a checkout optimised for mobile.
Inventory
Independent stock for the product and each variant, change history and quick editing, reservation at order placement, automatic cancellation of unpaid reservations after thirty minutes, and prevention of both overselling and duplicate operations.
Orders and payment
A new-order dashboard with seen status, a status flow from placement to dispatch and delivery, item, customer, address and shipping detail, a secure ZarinPal integration with a controlled callback, and unified toman and rial support.
Shipping and logistics
Postage from product weight in grams; Post, Dekapost, Chapar and Tipax; Snap delivery in and around Babol; geographic zones and display priority per method; packaging costs and per-method notes.
Customers and communications
Mobile and one-time-code login, profile, addresses, orders and wish lists, loyalty points, return requests, dynamic SMS.ir templates, and notifications for orders, payments, status and stock.
Content and marketing
Articles and categories, pages and menus, the home-page slider and dynamic banners, sales festivals, coupons and special offers, brands, customer reviews, a newsletter, and metadata, sitemap and SEO status management.
Reporting and administration
Sales, customer and product reports by Jalali month, Jalali filters, tables, charts and PDF export, weekly, monthly and yearly dashboards, independent roles for orders, warehouse, content and products, and financial data restricted entirely to the principal manager.
Security and resilience
JWT authentication with refresh tokens, rate limiting on sensitive routes, CORS control and centralised input validation, role- and policy-based access control, and activity logging with structured error reporting.
New versions are released onto the live server with a verified backup, health checks, a data integrity check and a fast rollback — so orders and stock are not damaged during an update.
Related services and products
Have a similar project in mind?
Fifteen minutes is enough to say what it needs, how long it takes and where to start.
Similar projects
E-commerce
Daroobin: an online pharmacy with batch tracking, expiry dates and FEFO allocation
An online pharmacy and cosmetics shop on .NET 10: multi-batch inventory with lot numbers and expiry dates, FEFO allocation, three payment gateways, scheduled campaigns and flash sales, and margin reporting.
- Next.js
- React.js
- TypeScript
- Tailwind CSS
Daroobin · 2025
Custom software · E-commerce
Robocode: academy, online exams, shop and a partner network on one platform
The integrated platform for the Robocode academy on .NET 10: online and in-person courses, exams with report cards, a shop with wholesale pricing, certificate issuance with QR verification, a partner and instructor panel with commission, and single sign-on from Shad.
- .NET 10
- C#
- Entity Framework Core
- MediatR
Robocode training institute · 2025

E-commerce
Advino: a specialist spice shop with search and filters that sell
A specialist online spice shop — a catalogue filtered by use and origin, cart and payment, customer accounts and an admin panel — on ASP.NET Core MVC and PostgreSQL.
- HTML5
- CSS3
- JavaScript (ES6+)
- Responsive Design
Advino online shop · 2025

