Skip to main content
Mostafa Effati

About this platform

A working notebook for engineering practice

This is Mostafa Effati’s personal engineering platform: a place to turn hands-on work into clear writing, structured learning, and useful digital products.

Student collaborator

  • Ms Zahra Ehsani

    Former student · platform contributor

    Ms Zahra Ehsani worked on parts of this platform during her studies and brought thoughtful, practical contributions to its development. I'm glad to recognize her work here.

What you will find

  • Long-form articles, books, tutorials, and practical snippets.
  • Courses and guided learning paths built around real engineering work.
  • Case studies, open-source work, experiments, and product releases.

Built deliberately

  • A bilingual Persian and English experience with native RTL support.
  • Theme-aware, keyboard-friendly interfaces with a focused visual language.
  • Content and product changes developed as one versioned system.

The platform is continuously evolving. Some sections are complete products; others are active experiments that improve as the underlying work develops.

Why User and Person Are Different

Why a user account is not the same thing as a human being in identity systems.
Mostafa Effati3 min readsoftware-architecture

Why User and Person Are Different Concepts

When I started redesigning my Identity Service, one of the first decisions was separating User Accounts from Persons.

At first it seemed unnecessary. Most applications have a users table and store everything there. For many systems, that works.

But the deeper I explored real-world scenarios, the clearer it became: User and Person are related — and not the same.

The common approach

A typical application starts like this:

User
 ├── first_name
 ├── last_name
 ├── email
 ├── phone
 └── ...

Simple. Easy to ship. The pain appears when the business grows.

Side by side

User AccountPerson
Exists because…The software needs authz / sessionsA human exists outside the app
LifecycleCreated, suspended, deleted by the systemContinues even if accounts vanish
MultiplicityOne person → many accountsOne identity across contexts
OwnsCredentials, permissions, sessionsLegal identity, orgs, citizenship

User belongs to the system

A User Account is a technical concept. It exists because the software needs:

  • Authentication
  • Authorization
  • Session management
  • Access control

Without the system, the User Account does not exist. The software creates it and manages it.

Person belongs to the real world

A Person exists independently of any application. The software only represents that person.

Subtle on paper. Decisive in the schema.

Real-world pressure tests

A person can have multiple accounts

  • Personal account
  • Organization account
  • Partner account

Same human. Different access surfaces.

A user account can disappear

Deleted, suspended, archived — the person still exists. Collapsing both into one entity makes recovery and audit messy.

A person can belong to multiple organizations

Employee, contractor, customer, shareholder — cleaner when Person is independent.

My model

Instead of making User the center of everything, Person became the hub:

Person
    │
    ├── User Account #1
    ├── User Account #2
    └── Organization Employee
  • Person → real-world identity
  • User Account → access to a specific system
  • Each has its own responsibilities and lifecycle

Benefits

BenefitWhat you gain
Cleaner domainSchema mirrors reality
FlexibilityNew account types without rewriting “the human”
Reduced couplingAuth changes don’t thrash person data
Org modelingRoles without stuffing everything into users

A lesson about architecture

Many architectural problems start when we combine concepts that look similar but represent different things.

User and Person are one of those cases. Related. Not the same. Recognizing that early prevents a lot of later complexity.

Takeaway

Authentication is usually the easy part. Modeling reality is the hard part — and it often starts by splitting User from Person.

Continue with Contact Information as an Aggregate.


Canonical version. Also on Medium.

Related documents

Command menu

↑ ↓to move · Enter to select · Esc to close
Navigation
Actions

Press Esc to close · ⌘K to toggle