# Trap 7. Appearance is the person's call; the profile is mandatory

Two things are usually done the wrong way round: the **look** is inherited from a template, and
the **profile** is forgotten. It should be exactly the other way.

---

## How the application looks is decided by the person, not by a template

The `w3ds_casco` template you were pointed at is there for its **mechanics**: working eID
sign-in, the return page for phones, the eVault client, the reading and writing rules. Its
appearance is neither an example nor a recommendation. It is simply how somebody else's project
happened to look.

So:

- **Ask the person how the application should look.** Not "which framework", but in ordinary
  words: what it should resemble, light or dark, restrained or lively, whether there are brand
  colours, a logo, a typeface. If they already have a website or a business card, ask to see it
  — that is where the colours and the character come from.
- **Do not leave someone else's default styles in place.** A screen that looks like the template
  reads to the person as "they built me something that isn't mine".
- If the person genuinely does not care and says "your taste" — then do it calmly and in your own
  way, but say out loud that this was your choice, and show them the result. They are allowed to
  change their mind.
- Do not drag heavy libraries into the project for the sake of appearance unless the person
  asked for them.

In short: **take the mechanics from the template, take the look from the person.**

---

## What every application must have

The person signed in with their eID. So the application holds their identity — and they must be
able to see it. Three things, without which the application is unfinished:

### 1. It is visible that you are signed in, and as whom

In the corner: the signed-in person's name and avatar. Not "You are authenticated", but a
specific person. If there is no name in the data, show what there is — but never invent a name
out of an eName.

### 2. The profile opens and can be edited

One click away: a profile screen showing data **from the person's own eVault**, not from your
database. It is their own record, the same one other W3DS applications see; edited here, it
changes everywhere.

The profile lives under the **User** ontology, `550e8400-e29b-41d4-a716-446655440000`, in the
person's vault. Fields worth showing and letting them edit:

```
displayName, username, firstName, lastName, email, phone,
birthDate, location, address, website, bio, avatarUrl
```

**The trap everyone hits: field names differ between live records.** The same thing appears under
several keys:

| Field | Also seen as |
|---|---|
| `displayName` | `name`, `fullName` |
| `firstName` | `givenName` |
| `lastName` | `familyName`, `surname` |
| `phone` | `telephone`, `mobile` |
| `location` | `city`, `region` |
| `address` | `streetAddress`, `postalAddress` |
| `bio` | `description`, `about` |
| `website` | `url`, `homepage` |
| `avatarUrl` | `avatar`, `photoUrl`, `image`, `picture` |

**Read through every variant, but write into the key the record already uses.** If a record uses
`givenName` and you add `firstName` as well, you have created two spellings of one fact, and the
next application will not know which to trust.

And remember the write rule from the main prompt: **an update replaces the whole object.** Read
the profile in full, change one field, write all of it back — otherwise you erase what other
applications wrote.

An avatar is sometimes not a URL but an enormous `data:` string inside the record. Be ready for
both: a link, and an inline image of tens of kilobytes.

### 3. A sign-out button

An ordinary, visible one, in the same place as the profile. Signing out must end the session so
that the next person at the same computer does not land in someone else's data.

---

## The check by the person

They sign in, see **their** name and **their** avatar, open the profile, change one field,
reload the page — the change is there. They sign out — and see the sign-in screen, not their own
data.

If the same name also changed in another W3DS application, everything was done right: it is one
record, not a copy.
