Files
427e7578-d7bf-49c8-aee9-2dd…/specs/003-user-identity-profiles
2026-03-16 22:44:21 +13:00
..
2026-03-16 22:44:21 +13:00

status, created, tags, priority, created_at, depends_on, updated_at
status created tags priority created_at depends_on updated_at
planned 2026-03-16
identity
profiles
high 2026-03-16T07:51:48.340Z
001-project-setup
2026-03-16T07:52:03.509Z

User Identity & Profiles

Status: 🗓️ Planned · Priority: High · Created: 2026-03-16 · Tags: identity, profiles

Overview

Users need a persistent identity without a centralized account system. Each user generates a cryptographic keypair locally. Their public key serves as their unique ID. Users can edit their profile (name, bio, tags).

Design

  • Identity: Ed25519 keypair generated via Web Crypto API, stored in IndexedDB
  • User ID: Base58-encoded public key (short, URL-safe)
  • Profile fields: name (display name), bio (short text), tags (array of categorized tags)
  • Tags structure: { category: string, value: string } — e.g. { category: "location", value: "Berlin" }, { category: "expertise", value: "UX Design" }
  • Tag categories: location, interest, expertise (extensible)
  • Signing: Profile updates are signed with private key (used for server writes; P2P messages use connection identity)
  • Storage: Profile stored locally in IndexedDB; shared with peers on connect
  • Discovery: Deferred. Tags are stored locally and exchanged with peers, but there is no directory server for searching users by tag yet. When added, profiles will already have the right structure (see archived spec 007)

Profile Schema

interface UserProfile {
  id: string;           // base58(publicKey)
  name: string;
  bio: string;
  tags: Tag[];
  updatedAt: number;    // timestamp
  signature: string;    // signed(hash(profile), privateKey)
}

interface Tag {
  category: 'location' | 'interest' | 'expertise' | string;
  value: string;
}

Plan

  • Implement keypair generation + storage in IndexedDB
  • Create profile store (Svelte store backed by IndexedDB)
  • Build profile edit page (name, bio, tag management)
  • Implement tag CRUD with category selector
  • Add profile signing/verification utilities
  • Profile exchange on peer connect

Test

  • Keypair persists across page reloads
  • Profile updates are saved and signed
  • Tags can be added/removed by category
  • Profile signature verification works