Kraftvakt
Kraftvakt is a web-based application used to communicate planned and unplanned outages to Kalmar Energi’s fiber, electricity, and district heating customers.
The application provides operational staff with tooling to create outage events and distribute information to affected customers as well as subscribers who opt in to receive all notifications.
Kraftvakt is hosted as an Azure Static Web App and backed by platform APIs running on-prem.
Purpose and scope
Section titled “Purpose and scope”What this application does
Section titled “What this application does”- Allows creation of planned and unplanned outages
- Identifies affected customers based on ERP data
- Distributes outage notifications via push, email, and SMS
- Supports scheduled notifications for planned outages
- Publishes outage information to the external website (map view)
- Provides subscription support for customers who want all notifications
Out of scope
Section titled “Out of scope”- External website presentation layer
- Third-party SMS and email infrastructure
High-level architecture
Section titled “High-level architecture”Kraftvakt consists of:
- Azure Static Web App frontend
- Backend APIs hosted on on-prem Kubernetes
- Notification services for push, email, and SMS
- Integration with ERP (BFUS) for customer data
- ScheduleAPI for delayed or planned notifications
- External integrations for SMS and email delivery
The frontend communicates with backend services via the shared platform edge (Front Door + API Management).
Conceptual data flow
Section titled “Conceptual data flow”flowchart LR subgraph Users["Users"] OpsUser["Operations user"] Customers["Customers"] end subgraph Cloud["Cloud"] UI["Kraftvakt UI<br/>(Azure Static Web App)"] Edge["Front Door + API Management"] KC["Keycloak<br/>(Identity)"] end subgraph OnPrem["On-prem services"] OutageAPI["Outage API"] Sched["ScheduleAPI"] IntBiz["IntegrationBusinessAPI"] Notif["NotificationAPI"] ERP["ERP / BFUS"] end subgraph Providers["External channels / providers"] Tellus["TellusTalk<br/>(SMS)"] SendGrid["SendGrid<br/>(Email)"] Bright["Bright mobile app"] Web["kalmarenergi.se<br/>(outage map)"] end %% UI flow OpsUser --> UI --> Edge --> OutageAPI %% Auth Edge <-.-> KC %% Customer communication OutageAPI --> Tellus --> Customers OutageAPI --> SendGrid --> Customers OutageAPI --> Notif --> Bright --> Customers %% Scheduling OutageAPI <--> Sched %% External web publishing OutageAPI <--> Web %% Customer data OutageAPI <--> IntBiz <--> ERP
Components
Section titled “Components”Outage API
Section titled “Outage API”Core backend service responsible for:
- Creating and managing outage records
- Resolving affected customers via BFUS database views
- Triggering notification flows
- Publishing outage data to the external website
- Coordinating scheduled deliveries via ScheduleAPI
This service acts as the central orchestrator.
NotificationAPI
Section titled “NotificationAPI”Internal service used for push notifications to subscribed users.
ScheduleAPI
Section titled “ScheduleAPI”Used when outages are planned in advance, allowing notification delivery to be scheduled for future execution.
Web frontend
Section titled “Web frontend”Azure-hosted web interface used by operational staff to:
- Create and manage outages
- Select affected areas
- Configure notification timing
- Monitor delivery status
Data sources
Section titled “Data sources”| Source | Purpose |
|---|---|
| BFUS / ERP | Customer and contract data (via database views) |
| Kraftvakt UI | Outage definitions and operational input |
Notification channels
Section titled “Notification channels”Kraftvakt distributes information through:
- Push notifications (via NotificationAPI)
- Email (via SendGrid)
- SMS (via TellusTalk)
Channel selection depends on customer preferences and outage configuration.
Platform integration
Section titled “Platform integration”Kraftvakt follows standard platform patterns:
- Frontend hosted in Azure Static Web Apps
- External access via Azure Front Door and API Management
- Backend services deployed on on-prem Kubernetes
- Authentication and secrets handled by shared platform services
- Service-owned databases hosted on-prem
Data ownership
Section titled “Data ownership”Kraftvakt owns:
- Outage records
- Notification configuration
- Subscription metadata
Customer master data remains owned by BFUS.
Operations
Section titled “Operations”Deployment
Section titled “Deployment”- Frontend deployed via Azure Static Web Apps
- Backend services deployed on on-prem Kubernetes
- Container images published through Azure Container Registry
Observability
Section titled “Observability”- Centralized service logging
- Platform-level monitoring
Common operational concerns
Section titled “Common operational concerns”- BFUS availability or schema changes
- SMS delivery failures (TellusTalk)
- Email delivery issues (SendGrid)
- Push notification failures
- ScheduleAPI execution problems
- External website integration issues
Ownership
Section titled “Ownership”- Functional owner: Kommunikationsstöd
Known constraints
Section titled “Known constraints”- Customer targeting depends on BFUS data quality
- Notification delivery relies on external providers
- Planned outages require ScheduleAPI availability
- External website map depends on successful outage publishing