One Go backend for the Rowshen store — website, admin panel and mobile app: catalog, orders, store locations and content, organized as independent domain modules.
My role
Backend developer. Built the API, the data model, authentication and the admin features.
Stack
Go
Echo
GORM
PostgreSQL
JWT
Swagger
The problem
The store needed one backend for several clients: a catalog organized by categories, collections, seasons and product types, reliable order placement, and an admin team managing content in Russian and Turkmen.
Architecture
The website, admin panel and mobile app use one REST API built with Echo on PostgreSQL through GORM. Each domain — products, categories, collections, orders, users, shops, banners, guides — is a module with its own handler, service and repository layers. An order and its line items are written in a single transaction.
Key decisions
01One API for three clients
Why
Business rules — prices, availability, order flow — live in one place, so the website, the admin panel and the mobile app can't drift apart.
Trade-off
API changes must stay backward compatible, because mobile app updates reach users later than web deploys.
02A module per domain, three layers each
Why
Handlers deal with HTTP, services with business rules, repositories with SQL. A dozen domains stay independent, so each one is easy to test and extend without touching the others.
Trade-off
More files and boilerplate for simple CRUD.
03Orders written atomically
Why
An order and its line items are created or updated in one transaction, so a failure never leaves an order without products or with partial totals.
What I built
Single REST API for website, admin panel and mobile app
Catalog organized by categories, collections, seasons and product types
Orders and their line items written inside database transactions
JWT authentication for customers and role-based admins, bcrypt password hashing
Store locations with opening hours, banners and bilingual (RU/TK) guides
Swagger documentation for the whole API
In numbers
clients served by one API: website, admin panel, mobile app