Menu

One identity, many roles: what I got wrong about marketplace accounts
📰

One identity, many roles: what I got wrong about marketplace accounts

DEV Community: authentication·Mohamed Elgohary·1 day ago
#YptyYSsK
Reading 0:00
15s threshold

TL;DR

I built EgyGomla, a B2B sourcing platform for Egyptian traders, with a separate email, account and password for each side of the market: buyers on one subdomain, suppliers on another.

A wholesaler buys from factories and sells to retailers. My "clean" design made the people the product is for pay the most.

The better model: the email is the person, and "buyer" and "supplier" are roles. In the data model that is one user with at most one buyer organization and one supplier organization, linked but never merged, with self-dealing blocked in the database.

This is a decided design (ADR-0013, status Accepted, 14 August 2026), and the migrations for it are written in the repo. It is not a claim that traders can do this in production today.

What I built first

EgyGomla helps Egyptian traders find manufacturers and suppliers, browse wholesale catalogues and request quotations. I built it end to end: web apps, dashboards, backend and Flutter apps.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.