Architecture

Eight projects working together — a .NET 10 domain and API with a 12-constraint booking engine, a Next.js 16 web dashboard, a TypeScript MCP server with 515 AI tools (477 entity + 34 workflow + 4 utility) and specialty-aware demo seeding, and native Android Staff and Client mobile apps built with Kotlin and Jetpack Compose.

System Overview

Domain + API

.NET 10 / EF Core / CQRS

  • 130 domain entities with code-first migrations
  • 98 REST endpoint groups
  • Constraint-based booking engine
  • Automated schedule generation engine
  • Multi-channel notification delivery
  • Event-driven webhook system
  • 887 unit tests

Web + MCP + Agent

Next.js 16 / TypeScript / MCP SDK

  • 312 components across 264 pages
  • Card-based dashboard hubs
  • In-dashboard AI agent with 515 tools
  • MCP server for external AI clients
  • Client self-scheduling portal
  • Webhook management and 6 audit log viewers
  • Tenant-configurable branding

Mobile Apps

Kotlin / Jetpack Compose / Material 3

  • Native Android Staff app
  • Native Android Client app
  • Three-channel messaging system
  • Push notifications with deep linking
  • Encrypted token storage
  • Tenant branding at runtime
  • Direct API auth with MFA

Domain Layer

Rdn.FacLT.Domain — 133 Entities, Entity Framework Core

Entity Categories

Organization & Facilities15 entities

Multi-tenant organizations, facility configuration, settings, and branding

People & Roles18 entities

Staff, clients, roles, contact information, and emergency contacts

Scheduling & Bookings20 entities

Appointments, schedules, shifts, availability, time-off, and booking invites

Services & Supply Chain12 entities

Service catalog, suppliers, inventory tracking, and procurement

Notifications & Consent14 entities

Multi-channel delivery, consent management, and device registration

Webhooks & Audit8 entities

Event subscriptions, delivery tracking, and system logging

Reference Data6 entities

Geographic, classification, and lookup data

Design Principles

  • Soft-deletable entities with automatic audit field population
  • Encryption at rest for sensitive fields
  • Immutable snapshot logs capture full entity state at every status change
  • Role-based booking eligibility connects staff roles to service types
  • Shared contact information model across all entity types
  • Append-only consent ledger with version-locked legal text
  • Schedule generation produces batch-correlated audit trails
  • Separate event logs for notification delivery tracking

Why “Client,” Not “Patient”

Multi-Vertical by Design

Client is the universal person entity at the center of the platform — any individual who receives services from a facility. The term “Patient” implies healthcare. FacLT supports infusion clinics, cancer centers, medspas, fitness studios, veterinary practices, tutoring centers, and salons. A scheduling platform that serves all of these cannot name its core entity after one vertical.

Think of Client the way a hotel thinks about a guest. Whether someone is there for a business conference, a wedding, or a vacation, the reservation system treats them the same: name, contact info, room, dates. The reason for the stay is context layered on top — not baked into the reservation model.

One Person, Many Contexts

Infusion Clinic / Cancer CenterClient with healthcare extensions
MedspaClient with aesthetic service history
Fitness StudioClient with membership and class enrollment
Veterinary PracticeClient (pet owner) with linked pet records
Tutoring CenterClient (student) with subject preferences

How Healthcare Fits In

Healthcare-specific data doesn’t replace the Client — it extends it. When a facility operates in a healthcare context, vertical-specific extension models layer clinical data (allergies, insurance, referring providers) on top of the core scheduling identity.

The Boundary

  • Core workflows — booking, scheduling, messaging, identity — operate on the universal Client model
  • The booking engine, schedule generator, and mobile apps work identically regardless of vertical
  • Healthcare is a vertical module, not a platform assumption
  • Vertical-specific data extends Client — it never replaces it

API Layer

Rdn.FacLT.Api — 95 Endpoint Groups, .NET 10 / ASP.NET Core

CQRS Architecture

Clean separation of reads and writes with dedicated handlers per operation. Cross-cutting concerns handled via pipeline behaviors for logging, validation, and error handling.

Security

JWT authentication with multi-factor support. Role-based access control with tenant scoping. Rate limiting, CORS, HSTS, and structured request logging. Clean error responses — no internal details exposed.

API Design

RESTful endpoints with OpenAPI documentation, API versioning, and paginated data grids. Dedicated endpoints for booking engine, schedule generation, mobile content, and agent workflows.

12-Constraint Booking Engine

Every booking request passes through a 12-constraint validation chain covering scheduling, staffing, capacity, supply chain, insurance eligibility, prior authorization status, and compliance rules — then calculates estimated cost automatically. Evaluation order: Facility → Client → Service → Eligibility → PA → Staff → Station → Supply → Date → Lead Time → Time → Duration.

  • Multiple evaluation modes for different use cases (interactive, API, agent)
  • Supply-aware scheduling with lead time and stock validation
  • Intelligent date suggestions when constraints block the requested slot
  • Automated inventory management on booking confirmation

Automated Schedule Generation

Select a facility and week, and the engine assigns staff to shifts based on role eligibility, availability windows, and seniority-weighted fairness. Produces a complete weekly schedule in one click with full audit traceability.

  • Fairness algorithm ensures equitable distribution of assignments across staff
  • Seniority weighting respects tenure while balancing workload
  • Every generated assignment produces a correlated audit record for compliance
  • Manual overrides remain available without affecting fairness tracking

Web Dashboard

rdn-faclt-web — Next.js 16 / React 19 / 309 Components

Organization

Multi-page CRUD

Tenant and facility management with card-based dashboards, station configuration, hours of operation, staff profiles with roles, patient records, and service catalog.

Scheduling

Calendar + Engine

Booking calendar with month/week/day views, booking engine form with constraint validation, staff availability management, weekly schedule grid, schedule generator, and shift management.

Supply Chain

4 entity sets

Supplier management, supply catalog with shelf life and lead times, tenant-wide supply catalog, and per-facility inventory tracking with stock levels and reorder points.

Onboarding & Invites

Wizards + Public

Staff and client invitation wizards with magic-link flows. Client self-scheduling via encrypted booking invite tokens with slot picker and confirmation.

Webhooks & Logs

6 log viewers

Webhook subscription management, event viewer, and 6 read-only audit log viewers for bookings, schedules, shifts, notifications, system events, and webhook deliveries.

AI & Configuration

Agent + Lookups

In-dashboard AI agent chat with 515 tools (477 entity + 34 workflow + 4 utility) and SSE streaming. Lookup pages for types and statuses. Auth with 2FA, registration, and public legal pages.

MCP Server + Agent Workflows

477 entity tools + 34 workflow tools + 4 utility tools = 515 total

Agent Workflow Tools (34)

Purpose-built workflow tools that go beyond CRUD. Each tool is designed for a specific operational task with full context and identity awareness.

  • Booking Validation

    Run the full constraint evaluation chain and return results

  • Facility Overview

    Complete snapshot of a facility — staff, services, stations, hours, inventory

  • Availability Checks

    Real-time availability for staff, stations, and time slots

  • Identity Resolution

    Resolve the current user context and their role-based permissions

  • Profile Lookups

    Staff or client profile with booking history in a date range

  • Demo Environment Seeding

    Create fully-integrated demo tenants with specialty-specific data

  • Schedule & Time-Off

    Generate schedules, manage time-off lifecycle, and resolve conflicts

MCP Server Design

  • Full API Coverage

    CRUD operations across all entity types for external AI clients like Claude Code and Cursor, plus purpose-built workflow tools.

  • Multi-Step Workflows

    Responses are structured to enable chained operations — the agent can create resources and reference them in follow-up steps.

  • Safety Guards

    Destructive operations require confirmation. System-critical records are protected from accidental deletion.

  • Clean Error Handling

    API errors are translated into clear, actionable messages with field-level validation details.

  • Authenticated Operations

    Every tool call runs with the user's identity — RBAC and tenant scoping are enforced at every layer.

Mobile Apps

Native Android — Kotlin / Jetpack Compose / Material 3

Staff App (Bridge)

Staff-facing Android app for managing bookings, viewing weekly schedules, three-channel messaging, AI agent chat, client search, push notifications, and profile management.

Client App (Connect)

Client-facing Android app for viewing appointments, self-scheduling via invite links, secure messaging with clinic staff, push notifications, and profile management. Tenant branding applied at runtime.

Secure Authentication

Both apps authenticate with MFA support. Tokens stored securely using platform-native encrypted storage.

Modern Android Stack

Declarative UI with Material 3 design system. Modern dependency injection, type-safe networking, and structured serialization.

Push Notifications

Real-time push delivery with deep linking to relevant appointments and conversations. Notification history tracking.

Technology Stack

Backend

.NET 10
Entity Framework Core
SQL Server
CQRS Architecture

Frontend

Next.js 16
React 19
TypeScript
Tailwind CSS 4

AI & Integration

MCP SDK
Claude AI
Webhook Events
Multi-Channel SMS

Mobile

Kotlin
Jetpack Compose
Material 3
Push Notifications