The foundation for adaptive, composable UIs
Stop reinventing common patterns. ProtoFlow provides a comprehensive library of typed, versioned domain models for authentication, billing, notifications, and more. Domain models provide semantic contracts that work across any interface.
Domain models are reusable, typed data structures that represent core business concepts in your application. Instead of recreating "User", "Subscription", or "Notification" entities from scratch in every project, ProtoFlow provides pre-built models with:
We have syntax interoperability (OpenAPI, GraphQL, REST) but NOT semantic interoperability.
APIs describe endpoints, not meaning. They define HOW to call, not WHAT it means.
Example: Two providers can both have a "User" endpoint, but they mean different things (social profile vs. account holder vs. system user). Without semantic contracts, consumers must learn each provider's unique interpretation.
Shared domain models provide semantic contracts. When a provider implements the standard "User" domain model, consumers know exactly what fields exist, what they mean, and how to use them. Same vocabulary, same structure, same meaning.
Domain models live in the semantic interface layer, providing contracts that enable different UIs to consume the same semantic data while storage remains an implementation detail.
Context-aware interfaces that adapt to device, environment, and user preference
Domain models provide contracts, semantics, and interoperability
This is where domain models live
Providers expose semantic contracts. Consumers interact with meaning, not endpoints. Storage is abstracted away.
Storage backend doesn't matter - it's abstracted by semantic contracts
Key Insight: Domain models enable different UIs to consume the same semantic data. Same "User" model serves car dashboard, mobile app, and voice assistant.
The same domain model serves different contexts with different presentations. The semantic contract remains consistent while the interface adapts.
Large buttons, voice-first, simplified
Full features, touch-optimized
Same Semantic Contract, Different Presentations
The Navigation domain model provides: location, destination, route, preferences. The interface adapts to context.
Same terminology and structure across all interfaces. When you see "User", you know exactly what it means - no ambiguity.
New interfaces consume existing models without changes. Build once, use everywhere - from smartwatches to VR headsets.
Cross-provider semantic agreements enable true ecosystem interoperability. Providers compete on quality, not lock-in.
LLMs understand semantic contracts better than arbitrary APIs. Domain models provide clear, consistent context for AI agents.
127 models organized across 15 categories
User, Session, Token, MFA, OAuth Provider, Password Policy, Login Attempt, Permission, Role
Subscription, Invoice, Payment, Card, Plan, Discount, Tax, Refund, Webhook Event
Notification, NotificationPreference, Channel, Template, Digest, Alert, Trigger
Post, Page, Media, Category, Tag, Comment, Author, Revision, SEO Metadata
Product, Order, Cart, Inventory, Shipping, Warehouse, SKU, Variant, Coupon, Review
Organization, Team, Member, Invitation, Workspace, Department, Hierarchy
Event, Calendar, Appointment, Availability, Booking, Recurrence, TimeZone
Event, Metric, Dashboard, Chart, Dimension, Measure, Funnel, Cohort, Report
Workflow, Step, Transition, State, Approval, Trigger, Condition
Message, Conversation, Thread, Participant, Attachment, Reaction, Read Receipt
File, Image, Video, Audio, Document, Thumbnail, Metadata, Transform, Storage
AuditLog, Change, Version, Approval, Policy, Compliance, Evidence
Address, Coordinate, Region, Country, TimeZone, Geofence, Distance
Money, Email, PhoneNumber, URL, UUID, Color, Duration, Range, Percentage, Currency
Domain models built on principles from physics, philosophy, and biology
Physics: Matter, Energy, Space, Time.
Our primitives: Entity (what exists), State (condition), Event (what happened), Relation (how connected), Quantity (how much).
Build complex concepts by combining primitives: Order = Entity + State + Relation(Customer) + Quantity(total). Never deep inheritance trees.
Prefer OrderPlaced → OrderPaid → OrderShipped over order.status = 'shipped'. Events are auditable, replayable, debuggable.
Each primitive models ONE concept: entity = identity, state = condition, event = occurrence, quantity = measurement.
Actor (who acts) + Intent (why) + Tool (how) + Resource (with what). Every action has an agent.
Everything is triples: Subject → Predicate → Object. Maps directly to RDF, Neo4j, knowledge graphs. Queryable, federatable.
From irreducible primitives to full applications—like Atomic Design for data
See how primitives combine into complete domain models
Product catalog, shopping cart, checkout, fulfillment
Order = Entity + State(pending→paid→shipped→delivered)
+ Relation(Customer, Products)
+ Quantity(total: Money)
+ Event(OrderPlaced, OrderPaid, OrderShipped)
+ Actor(buyer) + Resource(payment, inventory)
Vehicles, routes, tracking, maintenance
Vehicle = tracking-asset.Vehicle
+ State(available→in_transit→maintenance)
+ geo-point.Position(lat, lng)
+ routing-route.Route(waypoints)
Trip = Entity + tracking-position.Track
+ Actor(driver) + Resource(fuel, time)
Menu, orders, tabs, inventory, events
Tab = Entity + State(open→paid→closed)
+ Relation(Customer, Table, Server)
+ Quantity(total, tip)
+ Event(TabOpened, ItemAdded, TabClosed)
MenuItem = material.Material(ingredients)
+ Quantity(price, abv)
Conversations, tool use, memory, evaluation
Conversation = llm-conversation.Session
+ llm-message.Message[]
+ llm-participant.Actor(user, assistant)
+ llm-tool-use.Tool[]
+ llm-memory.MemoryBank
ProtoFlow includes a specialized domain modeling agent that automatically generates typed domain models from natural language descriptions or existing schemas. The agent:
The agent recognizes User and File already exist in the domain library and reuses them instead of creating duplicates.
Stop writing the same User, Product, and Order models in every project. Let ProtoFlow's domain library accelerate your development.