UDENTIVA Piattaforma Intelligente di Gestione Dentale
SOFTWARE QUALITY & PROCESS MATURITY

Our Software Development Process & SPICE Compliance

UDENTIVA embeds the process maturity sought in health software into the architecture itself. This page presents, with evidence, our development lifecycle, our SPICE / ISO-IEC 15504 capability levels, our continuous error-logging and control mechanisms, our version and security criteria, and our development history.

Basis: Regulation on Health Information Management Systems (Regulation No. 39682), Art. 6 and Art. 20 — software quality (CMMI/SPICE) certification requirement.

UDENTIVA's process architecture is an audit-ready software quality and process management approach, aligned with SPICE / ISO/IEC 15504 principles.

Process definition, implementation, and traceable work products are structured; quantitative measurement, defect prevention, and continuous improvement mechanisms operate in production. An official capability level declaration is subject to an independent appraisal.

SPICE Capability Levels

SPICE assesses processes on a capability scale from 0 to 5. UDENTIVA is structured to meet Level 1-3 expectations at the level of process definition, implementation and traceable work products; for Levels 4-5, quantitative measurement and continuous-improvement mechanisms are in operation. An official level declaration is subject to independent assessment.

0
Eksik (Incomplete)
The process is not applied / does not meet the target.
1
Performed
The process exists and produces its outputs.
2
Managed
The process is planned and monitored; work products are managed.
3
Established
The defined standard process is applied consistently across the whole project.
4
Predictable
The process is controlled quantitatively (by measurement).
5
Optimize Eden (Optimizing)
Continuous improvement + defect prevention + process innovation.

The quantitative control and continuous-improvement mechanisms for Levels 4-5 are operated below with their evidence (live measurement, defect/CAPA log, deployment records).

SPICE Process Areas → Implementation → Evidence

Every process area corresponds to a concrete implementation in UDENTIVA and to auditable evidence. The process is not a document — it is running code.

Process AreaUDENTIVA AppEvidence
ENG.1 Requirements ElicitationPhase map + vertical-slice requirement definition; the UDENTIVA.md project charter locks the requirements.UDENTIVA.md (GOLDEN RULES), 02_tech_spec/ technical specification, phase/module map
ENG.4 Software DesignModular monolith; context packages do not share each other's tables; communication via interfaces; external service = adapter.internal/{identity,patient,billing,export,...} boundary rule; ADR-001..008
ENG.5 Software ConstructionExplicit SQL (sqlc, no ORM); context as the first parameter in every function; error wrapping with %w; money = numeric.sqlc.yaml type override (numeric→string), db/queries/*.sql, gofmt/golangci-lint
ENG.6 Software IntegrationPHP(BFF) ↔ Go ↔ PostgreSQL ↔ Redis loopback chain; single public surface.web/core/ApiClient, /healthz component health (db+redis)
ENG.7 Software TestingCross-tenant isolation test (most critical), idempotency, appointment conflict, monetary precision, 2FA/OTP, TOTP RFC6238 vector, QR (OpenCV+ISO verification).internal/integration/*_test.go, platform/totp/totp_test.go, go test ./...
SUP.1 Quality AssuranceEvery PR must comply with the GOLDEN RULES; lint clean; no merge if the isolation test is red in CI.golangci-lint, Definition of Done kontrol listesi
SUP.8 Configuration ManagementGit version control (branch core); goose sequential schema versioning; build artifacts are backed up.git, goose_db_version tablosu, .tools/deploy yedekleri
SUP.9 Problem ResolutionAppend-only audit log + email/SMS outbox (a record for every send) + deploy backup/rollback discipline.audit_log, email_outbox/sms_outbox, bin/server.exe.bak-* rollback
SUP.10 Change Request ManagementEvery schema change is a new numbered migration; reversible (goose Down); deploy classifier approval.db/migrations/0001..0027, +goose Up/Down
MAN.3 Project ManagementVertical-slice delivery (each slice works end to end); session handover notes.super-devam.md, faz tablosu (DoD per dilim)
MAN.6 MeasurementHealth check, capacity measurement, email/SMS send metrics, audit volume, live event telemetry./healthz, Process Monitoring & Quality dashboard (event/error/deploy/KPI)

Layered Architecture & Data Security

Responsibilities are separated into layers; the domain authority resides at a single point and is isolated via loopback. The browser sees only the thin BFF and can never access the domain and data layers directly.

LayerResponsibility & SecurityLocation
Sunum (BFF)PHP 8.4 — thin BFF: session, render, CSRF, routing. NO business rules/DB. Single public surface (IIS:443).web/
Uygulama / DomainGo modular monolith — the SOLE authority of the domain. RBAC, business rules, transactions. Listens only on 127.0.0.1.api/internal/
VeriPostgreSQL — every table has tenant_id + RLS FORCE; explicit SQL (sqlc), parameterized. Money as numeric.api/db/
Cache / QueueRedis — session, idempotency, distributed lock, asynq queue (SMS/e-Fatura).platform/redisx
Nesne DepolamaS3-compatible — large files (X-rays) presigned/stream; blobs never in the DB.platform/storage
External Service (adapter)e-Fatura, SMS (NetGSM), email (SMTP), (later e-Nabız/MEDULA/DICOM) — abstracted behind an interface.internal/notify

Quantitative Measurement & KPI — Live Process Telemetry

Measurement isn't a statement, it's a working system. All operations are counted live (success/failure), production errors are captured in a permanent log, and the KPI framework below is tied to periodic actions. The data sources are real tables: event_counter (live operation counter), error_log (permanent error log), deploy_log (deployment log).

Measurement AreaKPITargetData SourcePeriodAzione
Tenant isolation securitycross-tenant test fail0CI / izolasyon testiher PRMerge block
Production errorexplicit error (5xx/panic)0error_log (persistent)continuous/liveRCA + CAPA zorunlu
Operation success ratesuccess / toplam event≥ 99%event_counter (live)continuous/liveRoot cause on decline
Resolution timeMTTR (avg. resolution)↓ decreasing trenderror_log (resolved)monthlyTrend incelemesi
Deployment reliabilityrollback rate< %5deploy_log30 daysRollback review
Identity security2FA/OTP kritik olay0audit + event_countermonthlyHardening
Messaging reliabilitySMS/e-posta failure↓ low*_outboxgiornalieroProvider review
Restore readinessrestore test success%100DR test (hedef)quarterlyUpdate runbook
These KPIs are monitored in real time from the live "Process Monitoring & Quality" dashboard that the platform operator accesses: transaction success rate, number of open errors, MTTR (mean time to resolution), deployment count and rollback rate.

Defect Prevention & Continuous Improvement Cycle (RCA/CAPA)

Every production error goes through a standard root-cause analysis (RCA) and corrective/preventive action (CAPA) cycle; recurrence of the same error is prevented through regression control and trend monitoring.

1
Incident / error log

Production errors (5xx/panic) are captured automatically → persistent error_log (on repeat of the same signature, count++, defect trend).

2
Classification

The level (error/panic), impact, and repeat count are determined; prevalence is measured via failed-event counters.

3
Root cause (RCA)

Root cause analysis is performed and recorded on the Process Monitoring dashboard.

4
Corrective/preventive action (CAPA)

A corrective action + preventive action (code, test, migration rule, security control) is defined and recorded.

5
Regression control

A test/rule preventing recurrence of the same error is added; it is monitored via continuous telemetry.

6
Trend incelemesi

KPI trends (MTTR, error rate, rollback) are periodically evaluated; a process-level action is opened for recurring errors.

Mechanisms in Operation — Continuous Error Logging, Control & Improvement

The essence of SPICE Level 5: continuous logging of errors, keeping them under control, defect prevention and continuous improvement. UDENTIVA operates these mechanisms in production.

Continuous Error Logging

The immutable (append-only) audit_log records every critical operation; email_outbox/sms_outbox persist every send (status, attempts, error). No event is silently lost.

audit_log, *_outbox (status/error/attempts)
Error Handling & Rollback

Consistent error envelope {error:{code,message}}; internal error/stack is never leaked. Before every deploy, a binary + web backup; in case of an outage, rollback within seconds via bin/server.exe.bak-*.

httpx.Error, deploy yedek/rollback runbook
Defect Prevention

Fail-closed architecture: no RLS context means 0 rows; idempotency prevents double processing; numeric money makes float errors impossible; whitelist (export dataset) prevents SQL injection. Errors are prevented by design from the start.

RLS FORCE, Idempotency-Key SETNX, numeric, view whitelist
Independent Verification

Critical components are verified by two independent methods: TOTP RFC6238 test vector, for QR an OpenCV cv2 decode + ISO/IEC 18004 reference codeword, and the cross-tenant isolation test.

integration tests + external decoder verification
Continuous Improvement Loop

In every session, security review → findings → hardening (e.g. Phase 2/Phase 3 RBAC added, 2FA, Export API). Institutional memory is preserved via process notes (super-devam.md).

security review → hardening loop
Process Innovation

A new regulatory requirement (VEM View) is turned directly into a product feature and evidence; regulatory changes are continuously monitored and mapped into the compliance map.

Export API/VEM views, /mevzuat compliance map

Edition Control

One codebase, narrowed with a flag — no fork.

  • The EDITION=base flag defines the single-clinic MVP; menu visibility (app.php) and route access (index.php) are read from the Edition::allows() allowlist.
  • Go RBAC is the AUTHORITY; Edition is only a UI/surface restriction — real authorization is enforced at the API layer (visibility ≠ security).
  • In the full edition all modules are enabled; in the base edition the Phase 2/Phase 3 growth modules are hidden. NO fork — a single code base, narrowed by a flag.
  • Capacity limits are measured via a tenant-based plan/package (platform subscription model); on overage, a soft warning (non-blocking).

Versioning Mechanisms

A traceable version at the schema, source, deployment and API layers.

Schema Versioning
goose sequential migrations (0001 → 0027); each change numbered + reversible (Up/Down). The applied version is tracked in the goose_db_version table. Prod migrations are verified on a clean DB.
Source Versioning
Git version control (branch: core); isolated central bare repo. Every meaningful piece of work is committed; secrets (connection.md, .tools) are gitignored — passwords are never committed.
Deployment Versioning
The Go binary is built (-ldflags "-s -w"), ONLY bin/server.exe is swapped (never the WinSW wrapper). Before every deploy, a binary + web backup (timestamped). Static asset cache-bust ?v=N.
API Versioning
Public endpoints are prefixed with /v1; Export API with /export/v1. Backward compatibility is preserved; a breaking change means a new version.

Git Usage, Rewind & Rollback

The entire development process is under version control; every deployment is reversible (rewind/rollback).

Version Control
Git (branch: core); isolated central bare repo. Every meaningful piece of work is committed; history is traceable.
Secret Management
Passwords/keys/connection details are gitignored — NEVER committed (connection.md, .tools, *.zip).
Isolation
Only this project directory is versioned; other projects' source is left untouched.
Traceability
Commits are vertical-slice/feature based; the deploy log (deploy_log) links the commit→release→prod chain.
Rewind / Rollback: Before every deployment, a timestamped backup of the binary, the web tier and the database is taken. The schema is reversible via rollback-capable migrations (goose Down); the running binary is reverted to the previous version (bin/server.exe.bak-*) within seconds; the web tier is restored from the previous archive. In an incident, production can be rolled back to a known-good state.

Security Criteria (Golden Rules)

Security isn't a feature, it's the architecture itself. The non-negotiable rules whose breach means a PR is rejected:

Row-level isolation (RLS FORCE, fail-closed)
Every table has tenant_id; with no context the policy returns 0 rows. The cross-tenant isolation test is a CI gate.
Atomik & idempotent yazma
A multi-entity operation is a single transaction (all or nothing); every mutation prevents double processing with an Idempotency-Key.
Para = numeric
Float FORBIDDEN; rounding in a single place, 2 decimals. Financial errors are impossible by design.
Identity & session
argon2id password; opaque session_key in Redis (sliding TTL); two-factor authentication (TOTP); session_key is never exposed to the browser.
Topoloji izolasyonu
Go listens only on 127.0.0.1; the single public surface is PHP/BFF. Backend ports (DB/Redis) are closed to the outside.
Immutable audit
Append-only audit_log; PII/secrets are not logged/are masked; TCKN/health data are special-category.
Parameterized query
All SQL is parameterized (sqlc/pgx) — SQL injection is impossible; dataset names are whitelisted.
Data residency
Health data only in Turkey; no transfer abroad (KVKK Art. 9, KSV Regulation Art. 16).

Development History

The system was built with vertical slices, each running end to end. Below is a chronology of the phases and recent security/regulation work.

Faz 0 Skeleton

pgx+sqlc, goose, RLS fail-closed test, WithTenantTx, session middleware, login+RBAC, audit, PHP↔Go loopback, asynq foundation, health.

Faz 1 Clinical Core (9 vertical slices)

Patient CRUD + cross-tenant isolation test → Appointment (exclusion constraint + Redis lock) → Odontogram/Treatment plan (FDI, append-only) → Collection/Account/Cash (derive, idempotent) → e-Fatura adapter (fast-follow) → Inventory → X-ray (S3) → SMS reminder (asynq backoff).

Platform Platform management console

Platform-operator (super-admin) tier (X-Platform-Key, separate identity plane); tenant management, subscription/billing model, capacity measurement, legal version editor, reCAPTCHA, NetGSM settings.

Crescita Multi-language & clinic website

i18n (20 dil, key-based, RTL); 20 tema + klinik public site (/s/{slug}) + lead-booking; demo klinik siteleri.

2026-06 Identity & Communication Security

Shared OTP primitive; password reset + magic-link + account activation (real SMTP); NetGSM SMS core; multi-tenant public auth; clinic user management.

2026-06 Verifica in due passaggi (2FA)

TOTP (RFC6238) + backup codes; MANDATORY QR (external-independent, CSP-clean qr.js; independently verified with OpenCV+ISO); SMS phone verification (KVKK consent).

2026-06 Regulatory Compliance

VEM View (Minimum Data Model) 12 export views + Export API (SuperUser-defined, tenant-locked, fail-closed); Legislation & Compliance map; 100% legislation-oriented legal contract revision.

2026-06 Support & Process

Ticket-tracked Support Center; SPICE process documentation (this page); continuous security review + hardening.

More on process maturity and compliance

For detailed information about architecture, security and regulatory compliance, get in touch with our team.

Regulation & Compliance Contattaci