AuditSphere Pro (SPFx)
Architecture Overview

AuditSphere Pro (SPFx) - Architecture Overview

Executive Summary

AuditSphere Pro is a SharePoint Framework (SPFx) web part that provides an embedded security and compliance monitoring dashboard directly within SharePoint Online. It serves as the SharePoint-native client interface for the AuditSphere platform, enabling users to monitor audit events, detect anomalies, assess compliance, and manage access reviews without leaving their SharePoint environment.


System Architecture

High-Level Architecture Diagram


Component Architecture

Web Part Structure

Service Layer Architecture


Technology Stack

Frontend Layer

ComponentCategoryPurpose
SharePoint FrameworkPlatformSharePoint-native web part hosting
Component LibraryUI FrameworkReusable, accessible UI components
Design SystemStylingMicrosoft's official design system with theming
Icon LibraryVisual AssetsConsistent iconography
Date UtilitiesData FormattingDate/time display and manipulation

Communication Layer

ComponentCategoryPurpose
Type-Safe API ClientRPC FrameworkEnd-to-end type safety for API calls
JSON SerializerData TransformComplex type serialization
Azure AD ClientAuthenticationBuilt-in SPFx token acquisition

Build and Development

ComponentCategoryPurpose
TypeScriptLanguageType-safe development
Build OrchestratorBuild ToolSPFx-compatible build pipeline
Module BundlerPackagingCode bundling and optimization
Code LinterQualityCode style enforcement

Authentication Architecture

Authentication Flow

Security Model

LayerMechanismDescription
User AuthenticationAzure AD SSOAutomatic via SharePoint session
Token AcquisitionSPFx HTTP ClientBuilt-in Azure AD token service
API AuthorizationBearer TokenJWT validation on backend
User IdentificationToken ClaimsEmail extracted from JWT
Tenant IsolationToken AudienceScoped to registered application

Data Flow Architecture

Dashboard Data Flow

Access Review Workflow


Module Structure

Page Components

PageFunctionalityKey Features
OverviewDashboard summaryStats cards, trends, activity feed
ActivityAudit event browserFiltering, search, pagination
AnomaliesML detection resultsSeverity filtering, status management
ComplianceCIS benchmark checksScore display, remediation steps
AlertsSecurity notificationsAcknowledgment, resolution workflow
Access ReviewPermission campaignsCampaign lifecycle, bulk decisions
SitesSharePoint site listSite sync, security status
ReportsReport generationMultiple formats, download
SettingsConfigurationAPI connection, theme selection

Shared Components

ComponentPurpose
Service ContextDependency injection for API service
Theme ProviderDesign system theming
Data HooksAsync data fetching patterns
Loading StatesSkeleton loaders, spinners
Error BoundariesGraceful error handling

Theming Architecture

Theme System

SharePoint Theme Integration

  • Inherits SharePoint site theme colors
  • Semantic color CSS variables applied to DOM
  • Automatic dark mode detection from SharePoint
  • Fluent UI design tokens for consistency

Deployment Architecture

Package Structure

Deployment Flow

Supported Hosts

HostDescription
SharePoint Web PartStandard SharePoint page embedding
SharePoint Full PageFull-page application experience
Teams Personal AppMicrosoft Teams personal tab
Teams TabMicrosoft Teams channel tab

Performance Optimization

Code Splitting Strategy

Performance Features

FeatureImplementation
Lazy LoadingPages loaded on-demand
Pagination50 items per page default
CachingToken caching via SPFx
Auto-refreshConfigurable interval
Loading StatesSkeleton loaders during fetch

Integration with AuditSphere Platform

System Context

Architecture Relationship

ComponentRoleCommunication
AuditSphere SPFxFrontend client embedded in SharePointSends API requests
AuditSphere APIBackend service providing all business logicReceives requests, returns data

API Integration

  • SPFx web part connects to AuditSphere API backend
  • Type-safe client matches backend API schema
  • All data operations routed through AuditSphere API
  • Authentication tokens validated by API service
  • API handles Microsoft Graph integration and database operations

Configuration Options

Web Part Properties

PropertyTypeDescription
API URLStringBackend API endpoint
Azure AD Client IDStringApp registration identifier
Default PageDropdownInitial page on load
Refresh IntervalNumberAuto-refresh in seconds (0 = disabled)
Theme ColorDropdownVisual theme selection

Runtime Configuration

  • Properties editable in SharePoint page editor
  • Changes apply without page reload
  • Settings persist per web part instance

Document Information

PropertyValue
Version1.0
Last UpdatedDecember 2025
ClassificationClient Documentation