Skip to content
Vektorprogrammet

Enterprise models

Status: Draft target views. Revised 2026-09-24.

This document models the intended Vektorprogrammet replacement through 4EM and ArchiMate viewpoints. It does not define a second business or architecture source.

The diagrams use Mermaid for review in the repository. They use method vocabulary, but they are not exports from a certified modeling tool.

Shared capability keys

These keys connect both views. They identify business capabilities, not packages or implementation status.

KeyCapability
CAP-IDIdentity, sessions, and profile
CAP-RECRecruitment and onboarding
CAP-AFFVolunteer affiliation and placement
CAP-SVCSchool-demand planning and teaching service
CAP-SUBSubstitute coverage
CAP-ORGOrganization administration
CAP-ECOExpense reimbursement
CAP-SURSurveys and school feedback (Google Forms)
CAP-PUBPublic content, contact, and events
CAP-OPSAudit, delivery, migration, and recovery

4EM target model

The 4EM view uses its six connected submodels. The notation and submodel structure follow Overview of the 4EM Method by Sandkuhl, Stirna, Persson, and Wißotzki.

Goals Model

Loading diagram...

G-01 is the primary goal. G-06 is a migration goal, not evidence that cutover has started or is authorized.

Business Rules Model

IDRuleSource
BR-01A Person is the stable human identity. Account, Profile, Appointment, Affiliation, and Placement remain separate.Business facts
BR-02Team membership must not imply volunteer affiliation.Responsibility rules
BR-03Recommendation, invitation, account claim, affiliation, and placement are separate decisions.Recruitment and affiliation
BR-04A coordinator confirms the roster and reviews its exceptions. A proposal does not create a placement or prove attendance.School demand and placement
BR-05Authority requires a usable account, active relationship, covered scope, and allowed capability at the given instant.Authority model
BR-06The backend denies access by default. A hidden frontend action is not enforcement.Authority model
BR-07One transaction records current state, immutable history, command receipt, audit, and required outbox work.Durable effects
BR-08External delivery starts after commit. Retry reuses the immutable first envelope and remains bounded.Delivery and providers
BR-09A report distinguishes current from historical, missing from unavailable, and recorded from inferred.Reporting
BR-10A file path, team label, menu role, or pool membership does not grant business authority.Expense reimbursement and Authority model
BR-11Receipt approval does not imply payment or bank-settlement authority.Reimburse an expense
BR-12Production data, providers, deployment, writer transfer, and destructive actions need explicit operator authority.Cutover gates and authority
BR-13An admission outcome is explicit: admitted, substitute, or rejected. A Kanskje recommendation implies no outcome.Recruitment and affiliation
Loading diagram...

Concepts Model

The model shows business concepts and their meaning-bearing links. It does not set cardinalities that the canonical domain model does not define.

Loading diagram...

The dated-service contract separates planned supply, dated commitments, terminal outcomes, and actual attendance. Cancellation creates no occurrence. Unfulfilled service records an occurrence only when actual attendance exists. Implementation and acceptance remain in STATE.md.

Business Process Model

Recruit and affiliate a volunteer

Loading diagram...

The sequence does not contain a generic accepted-applicant state. BR-13 records the admission outcome separately. A substitute is admitted without a placement and is on call.

Plan and deliver school service

Loading diagram...

This target process covers CAP-SVC and CAP-SUB. A terminal decision records its evidence atomically. Covered and Uncovered describe an absence, not the whole service outcome. Completion requires actual attendance that meets demand. Attendance is the confirmed roster minus absent assistants plus the people in coverage records. Cancellation records no attendance. Certificates are outside the mandatory core path. State records unresolved operational obligations.

Reimburse an expense

Loading diagram...

BP-24 is outside the current product boundary. BR-11 prevents approval from being treated as settlement.

Actors and Resources Model

Loading diagram...

A Person can hold several roles. Assignment depends on relationship, scope, and time. The arrows do not grant authority by themselves.

Technical Components and Requirements Model

Loading diagram...
IDTechnical requirement
TR-Q01Keep one modular backend until an observed operational need requires another deployment boundary.
TR-Q02Keep business rules and capability requirements in the domain package.
TR-Q03Derive HTTP, OpenAPI, and SDK artifacts from one contract.
TR-Q04Encode every external or durable boundary with Effect Schema.
TR-Q05Use PostgreSQL constraints, transactions, locks, and compare-and-set revisions for owned invariants.
TR-Q06Enforce the same relationship-based authority for commands and queries.
TR-Q07Commit business facts and outbox work atomically. Deliver external effects after commit.
TR-Q08Make provider, credential, schema, and storage configuration explicit. Fail before production serving.
TR-Q09Protect private files with ownership checks, no-follow traversal, restricted permissions, and lifecycle handling.
TR-Q10Make one Foldkit Model own each stateful dashboard journey.
TR-Q11Exercise the real browser, HTTP, and PostgreSQL path before accepting a journey.
TR-Q12Fence legacy writers before native ownership starts. Prove backup, recovery, reconciliation, and rollback.

The component graph comes from Product shape. The requirements derive from the remaining architecture sections and production gates.

FromLinkTo
G-01, G-02motivateBP-10 through BP-18 and CAP-SVC
G-03, G-08motivateBR-01, BR-07, BR-09, and history resources
G-04, G-07motivateBR-05, BR-06, BR-10, TR-Q06, and TR-Q09
BR-03, BR-13governBP-01 through BP-09
BR-04governsBP-12 through BP-14
Human rolesperform within authorityBusiness processes
Business processescreate or useConcepts and resources
TR-C01 through TR-C09supportCAP-ID through CAP-OPS, except CAP-SUR
G-06, BR-12, TR-Q12constrainproduction migration

ArchiMate target model

This section uses ArchiMate 3 vocabulary and relationship labels. It separates motivation, strategy, business, application, technology, and migration views.

Motivation and strategy viewpoint

Loading diagram...

The strategy capabilities are the shared CAP-* keys. They group the behavior needed to achieve these goals. They do not map one-to-one to deployable components.

Business service viewpoint

Loading diagram...

Role assignment is conditional. The authority relationship remains a separate business fact and applies at the interaction time.

Application cooperation viewpoint

Loading diagram...

packages/domain, packages/database, packages/http-api, and packages/sdk are implementation modules within these components and interfaces. Their exact dependency graph remains authoritative in architecture.md.

Technology viewpoint

Loading diagram...

The target documents do not define a final production topology. This view therefore stops at runtime responsibilities and explicit external provider seams.

Implementation and migration viewpoint

Loading diagram...

MIG-PLT01 and the local observations in MIG-PLT02 are current facts from STATE.md. All later plateaus are targets. MIG-WP05 requires new operator authority and does not follow automatically from technical completion.

Cross-model traceability

Capability4EM anchorsArchiMate anchorsCanonical source
CAP-IDG-03, BR-01, AR-R01, TR-Q06MOT-GOL02, APP-FNC04Business facts, Identity and authority
CAP-RECBR-03, BR-13, BP-01–BP-09BUS-PRC01, BUS-SVC01Recruitment and affiliation
CAP-AFFBR-02, BP-07–BP-09, AR-R04BUS-PRC02, BUS-SVC02, BUS-OBJ02Return an existing volunteer
CAP-SVCG-01, G-02, BR-04, BP-10–BP-18MOT-GOL01, BUS-PRC03, BUS-SVC03Plan and deliver school service
CAP-SUBBP-17, AR-A04, AR-A07BUS-PRC04, BUS-SVC04Substitute coverage
CAP-ECOG-07, BR-10, BR-11, BP-20–BP-25BUS-PRC05, BUS-SVC05, BUS-OBJ05Expense reimbursement
CAP-OPSG-05, G-06, BR-07, BR-08, BR-12, TR-Q12MOT-GOL03, MIG-*Cutover gates and authority

Capabilities without detailed diagrams still remain in the shared key list. Their canonical behavior stays in the three source documents.

Open model decisions

  1. Define a coordinator admission decision only if it is a real business fact with named authority and lifecycle.
  2. Define payment and settlement ownership before adding a finance integration.
  3. Select the final production topology only after operational requirements justify it.
  4. Promote the ArchiMate draft to an exchange file only if a maintained modeling tool becomes part of the workflow.

Method references

Maintenance rule

Change the canonical source document first. Update these views in the same change when the modeled meaning changes. Record implementation progress only in STATE.md. This prevents a target view from becoming false runtime evidence.