Skip to content

Api

  • Project: hvc-api (solution name HVCWeb.Api)

Overview

hvc-api is the main client-facing API of the HVC platform. It serves the web, mobile, and headset clients with everything they need: authentication, contacts, events and meetings (video calls via Pexip), chat, media/files, notifications, peripherals, and tenant configuration.

It exposes three surfaces at once:

  1. REST controllersapi/... endpoints used mainly by the Flutter apps.
  2. GraphQL (HotChocolate) — /graphql, used by the web portal via Houdini (queries, mutations, and in-memory subscriptions).
  3. SignalR hub/hubs/mobile, the realtime channel for calls, chat, presence, device control, and recordings.

Tech Stack

  • Target: .NET 7
  • GraphQL: HotChocolate 13 (source-generated schema; projections/filtering/sorting, in-memory subscriptions)
  • Data: EF Core 7 (SqlServer), multi-tenant via MultiTenantConnectionInterceptor (connection string swapped per tenant domain), pooled DataContext
  • Messaging: MediatR + Wolverine message bus, Proto.Actor actors (TenantActor, UserActor)
  • HTTP clients: Refit (Pexip, Keycloak, Mailgun, Metabase, OvenMediaEngine), Flurl
  • Auth: Keycloak with dual-scheme JWT ("Keycloak" vs "Internal" tokens) + custom permission-based Authorizer
  • Misc: Hashids, QRCoder, SkiaSharp (image processing), Ical.Net, Serilog → Seq

Backend services (hosted)

  • VmrCreationService — creates Pexip conference rooms up to maxRoomCount.
  • CommandProcessorService — polls PendingCommands (command pattern).
  • NotificationService — system notifications on startup.
  • Proto.Actor actors for per-tenant / per-user work.

Key directories

Controllers/             REST endpoints (chat, events, files, media, meetings, admin, upload)
Features/                Feature modules (Accounts, Contacts, Events, Chat, Media, Tenants,
                         Peripherals, Notification, Security, Dashboards, Data, DeviceId)
Hubs/MobileHub.cs        SignalR hub (realtime)
Resolvers/               GraphQL source-generator resolvers (Chat, Event, Media, Meeting, Role, Tenant)
Commands/                MediatR/Wolverine commands
Services/                Pexip, Keycloak, Mailgun, EmailComposer, MessagingService, Metabase...
Data/                    EF Core DataContext (all entities)
Extensions/              DI + GraphQL server configuration

Client connectivity

  • Web (SvelteKit/Houdini): GraphQL endpoint /graphql, WebSocket subscriptions via graphql-ws, SignalR /hubs/mobile with bearer token, multipart uploads.
  • Mobile/Headset (Flutter): REST api/* + SignalR hub; the headset also registers devices and receives summons via GraphQL.
  • Services — the surrounding .NET services (sink, ws, logger, storage).
  • Web, Mobile, Headset — the clients that consume this API.

Released under the MIT License.