Kolchi.ma is a Moroccan online marketplace for buying and selling new and used products, with something most marketplaces leave out: a built-in repair service. The platform runs on a polyglot microservices architecture, with each service written in the stack best suited to its domain.
The idea#
"Kolchi" means "everything" in Moroccan Darija, and the goal is close to that: a digital souk where people can find deals, sell what they no longer need, and get things fixed instead of replaced. Repair is the differentiator — a buyer looking at a used phone and a seller who can't sell a broken one are both served better by a marketplace that also connects them with repairers.
The platform serves three roles — clients, sellers and admins — each with its own dashboard and workflows.
What it does#
- Multi-role authentication — sign-up and login for admins, sellers and clients, with social login and email verification
- Product listings — sellers create and manage listings for new and used products, including bulk uploads
- Order management — place orders, track status, and handle cancellations and returns, with visibility for seller and admin
- Payments — Stripe and PayPal integration supporting multiple payment methods
- Repair requests — clients request repairs, schedule appointments and track repair status end to end
- Real-time messaging — chat between clients and sellers, with notifications
- Promotions — discount codes and flash sales created by sellers
- Reviews and ratings — on both products and services, moderated by admins
- Admin console — oversight of users, listings, orders, reviews, analytics and support tickets
Architecture#
Each service owns its domain and its data store, and the Angular frontend reaches them all through one gateway:
| Service | Stack | Database |
|---|---|---|
| Identity & Auth | ASP.NET Core (C#) | SQL Server |
| Products & Orders | Spring Boot (Java) | PostgreSQL + Redis |
| Messaging | NestJS (TypeScript) | MongoDB |
| Payments | NestJS (TypeScript) | PostgreSQL |
Angular SPA
│
▼
API Gateway ── validates JWTs issued by the Identity service
├── Identity Service → SQL Server
├── Product Service → PostgreSQL + Redis
├── Order Service → PostgreSQL
├── Messaging Service → MongoDB
└── Payment Service → PostgreSQL (Stripe / PayPal webhooks)
│
message broker (domain events → notifications)Services publish domain events — an order placed, a repair status changed, a message received — to a message broker, and a notification service consumes them to deliver email and in-app alerts.
Key challenges#
Three languages, one API#
Running .NET, Spring Boot and NestJS side by side is powerful and dangerous in equal measure. Without discipline, each service ends up with its own conventions for pagination, errors and authentication, and the frontend becomes a translation layer.
The API gateway is the answer to the consistency half of that: it is the single entry point the frontend knows, it validates tokens once, and it routes to services behind it. Shared conventions for errors and pagination keep the contract uniform regardless of which language answered the request.
One identity for three roles#
Admins, sellers and clients see very different products, but they must not need three accounts. The ASP.NET Core identity service issues JWTs carrying role claims, and every other service trusts those tokens rather than re-implementing login. A seller who also buys is one user with two roles, not two users.
Real-time without tight coupling#
Messaging between buyers and sellers, and status updates on orders and repairs, need to feel immediate. Wiring services to call each other for every update would couple their availability; publishing events and letting the notification and messaging services react keeps each service independently deployable.
Polyglot persistence#
Each data store was chosen for its domain: relational integrity for products, orders and payments in PostgreSQL, flexible documents for chat history in MongoDB, SQL Server alongside ASP.NET Core Identity, and a Redis cache in front of the hottest product queries.
Delivery#
Every service is containerized with Docker. Development follows Git Flow, and GitHub Actions builds and deploys each service on its own pipeline, so a change to messaging doesn't redeploy payments.
Results#
- One marketplace handling products, orders, repairs and messaging
- Automated deployments through GitHub Actions remove most release overhead
- A Redis cache layer significantly reduces average response time for product queries
- Services in three languages present a single, consistent API through the gateway
What I learned#
A polyglot architecture is a cost you pay every day — in tooling, in conventions, in onboarding — in exchange for using the right tool per domain. It earned its keep here because each service's stack matched a real strength, but the gateway and the shared conventions did more for the platform's coherence than any individual language choice.
