ADR-020: CLARISSA Portal - Vision & Requirements¶
| Status | Proposed |
|---|---|
| Date | 2026-01-23 |
| Authors | Wolfram Laube, Claude (AI Assistant) |
| Supersedes | - |
| Related | ADR-021 (System & Security Architecture), ADR-022 (Software Architecture), ADR-016 (Runner Load Balancing) |
1 Context¶
1.1 Current State¶
CLARISSA is evolving as a distributed research project with a team spread across two continents:
| Person | Location | Timezone | Role | Infrastructure |
|---|---|---|---|---|
| Wolfram | Schรคrding, AT | CET (UTC+1) | Lead, Admin | Mac #1, Mac #2, Linux Yoga (local), GCP VM |
| Mike | Houston, US | CST (UTC-6) | Consultant | Laptop |
| Ian | Houston, US | CST (UTC-6) | Consultant | Laptop |
| Doug | Houston, US | CST (UTC-6) | Consultant | Laptop |
The physical CI/CD runners (3 local machines) are located in Schรคrding, while the GCP-based system (gitlab-runner, europe-west3-a) runs centrally. This distribution creates operational challenges:
- Observability Gap: The 12-runner matrix (4 machines ร 3 executors) requires centralized monitoring
- Time Tracking Friction: GitLab Issues as workaround for consultant time tracking
- Billing Overhead: Manual PDF generation and Google Drive upload via CI/CD pipeline
- Documentation Fragmentation: MkDocs exists, but without interactive dashboards
1.2 Problem Statement¶
Without a central portal, CLARISSA lacks a platform that:
- Enables team-wide collaboration independent of timezones
- Provides operational awareness of CI/CD state
- Consolidates administrative tasks (billing, time tracking)
- Serves as entry point for new team members and later external users
2 Scope¶
This document defines the vision, requirements, and principles for the CLARISSA Portal. It serves as reference for:
- ADR-021: System & Security Architecture - Infrastructure, Deployment, Auth
- ADR-022: Software Architecture - Hexagonal Pattern, API Design, Code Structure
In Scope: - Portal vision and strategic goals - Functional and non-functional requirements - Architecture principles and guardrails - Ecosystem integration
Out of Scope: - Technical implementation details (โ ADR-021, ADR-022) - API specifications (โ ADR-022) - Security details (โ ADR-021)
3 Vision¶
3.1 Portal Purpose¶
The CLARISSA Portal is the central coordination and observability interface for the distributed team. It abstracts the complexity of the multi-runner infrastructure and consolidates operational workflows.
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ CLARISSA Ecosystem โ
โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ User-Facing Layer โ โ
โ โ โ โ
โ โ โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโ โ โ
โ โ โ Portal โ โ MkDocs โ โ GitLab โ โ โ
โ โ โ (This ADR) โ โ Documentation โ โ Repository โ โ โ
โ โ โ โ โ โ โ โ โ โ
โ โ โ โข Dashboards โ โ โข ADRs โ โ โข Code โ โ โ
โ โ โ โข Time Track โ โ โข Guides โ โ โข Issues โ โ โ
โ โ โ โข Billing โ โ โข Tutorials โ โ โข CI/CD โ โ โ
โ โ โ โข Benchmarks โ โ โข API Docs โ โ โข Registry โ โ โ
โ โ โโโโโโโโโโฌโโโโโโโโโ โโโโโโโโโโฌโโโโโโโโโ โโโโโโโโโฌโโโโโโโโโ โ โ
โ โ โ โ โ โ โ
โ โโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโ โ
โ โ โ โ โ
โ โโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโ โ
โ โ โผ โผ โผ โ โ
โ โ Infrastructure Layer โ โ
โ โ โ โ
โ โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ โ
โ โ โ 12-Runner CI/CD Matrix โ โ โ
โ โ โ โ โ โ
โ โ โ Mac #1 Mac #2 Linux Yoga GCP VM โ โ โ
โ โ โ โโโโโโโ โโโโโโโ โโโโโโโ โโโโโโโ โ โ โ
โ โ โ โShellโ โShellโ โShellโ โShellโ โ โ โ
โ โ โ โDockerโ โDockerโ โDockerโ โDockerโ โ โ โ
โ โ โ โK8s โ โK8s โ โK8s โ โK8s โ โ โ โ
โ โ โ โโโโโโโ โโโโโโโ โโโโโโโ โโโโโโโ โ โ โ
โ โ โ โ โ โ
โ โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ โ
โ โ โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
3.2 Target Users¶
| User Persona | Needs | Portal Features |
|---|---|---|
| Wolfram (Admin) | Billing, runner monitoring, time review | All features + admin views |
| Consultants (Mike, Ian, Doug) | Time entry, view own invoices | Time tracking, billing (read) |
| Future: External Users | Simulation access, results | Public landing + auth |
3.3 Evolutionary Phases¶
Evolutionary development in three phases:
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Portal Evolution Phases โ
โ โ
โ โโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโ โ
โ โ Phase 1 โ โ Phase 2 โ โ Phase 3 โ โ
โ โ Team Tools โ โ Operational โ โ External โ โ
โ โ โ โ โ โ โ โ
โ โ Current Focus โ โ Next Phase โ โ Future Vision โ โ
โ โโโโโโโโโโฌโโโโโโโโโโ โโโโโโโโโโฌโโโโโโโโโโ โโโโโโโโโโฌโโโโโโโโโโ โ
โ โ โ โ โ
โ โผ โผ โผ โ
โ โโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโ โ
โ โ โข Time Tracking โ โ โข Runner Health โ โ โข User Mgmt โ โ
โ โ โข Billing โ โ โข Alert System โ โ โข Simulation UI โ โ
โ โ โข Basic Metrics โ โ โข Trend Analysis โ โ โข Result Viewer โ โ
โ โ โข GitLab OIDC โ โ โข Cost Tracking โ โ โข Public API โ โ
โ โโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโ โ
โ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
4 Requirements¶
4.1 Functional Requirements¶
FR-1: Time Tracking¶
| ID | Requirement | Priority |
|---|---|---|
| FR-1.1 | Consultant can create time entries (date, duration, project, task) | Must |
| FR-1.2 | Consultant can edit/delete own time entries | Must |
| FR-1.3 | Admin can view all time entries | Must |
| FR-1.4 | Aggregated view per week/month | Should |
FR-2: Billing¶
| ID | Requirement | Priority |
|---|---|---|
| FR-2.1 | Admin can generate invoice from time entries | Must |
| FR-2.2 | System generates PDF automatically (async) | Must |
| FR-2.3 | PDF is stored in cloud storage | Must |
| FR-2.4 | Contractor can view own invoices | Should |
FR-3: Benchmarks (Runner Monitoring)¶
| ID | Requirement | Priority |
|---|---|---|
| FR-3.1 | Dashboard shows current status of all 12 runners | Must |
| FR-3.2 | Historical pipeline durations per runner | Should |
| FR-3.3 | Anomaly detection for deviations | Could |
FR-4: Authentication¶
| ID | Requirement | Priority |
|---|---|---|
| FR-4.1 | Login via GitLab (OIDC) | Must |
| FR-4.2 | No separate user registration | Must |
| FR-4.3 | Session management with auto-refresh | Must |
4.2 Non-Functional Requirements¶
| ID | Requirement | Target | Rationale |
|---|---|---|---|
| NFR-1 | Availability | 99% (excl. maintenance) | Team-critical, but not 24/7 operation |
| NFR-2 | Latency | < 500ms for CRUD, < 60s for PDF | Acceptable UX |
| NFR-3 | Cost | $0/month (Free Tier) | Budget constraint during experimental phase |
| NFR-4 | Scalability | 4 โ 50 users without architecture change | Growth path |
| NFR-5 | Security | OIDC, HTTPS, HttpOnly Cookies | Industry best practice |
| NFR-6 | Portability | Platform-agnostic core | Air-gap deployment option |
5 Design Principles¶
Based on established microservices and platform engineering principles:
5.1 Service-Based Approach¶
Instead of a monolith, the portal structures its functionality into logical services:
| Service | Responsibility | Coupling |
|---|---|---|
| Auth Service | OIDC flow, session management | Standalone |
| Time Service | CRUD for time entries | โ Auth |
| Billing Service | Invoice generation, PDF | โ Time, Auth |
| Benchmark Service | Runner metrics, aggregation | โ Auth |
5.2 Hexagonal Architecture¶
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Hexagonal Architecture Principle โ
โ โ
โ "The business logic is platform-independent in the shared/ directory. โ
โ Thin adapters translate between platform (Cloud Run, OpenWhisk) โ
โ and core." โ
โ โ
โ โโโโโโโโโโโโโโโโโโโ โ
โ โ Shared Core โ โ
โ โ (Pure Python) โ โ
โ โ โ โ
โ โ โข Business โ โ
โ โ Logic โ โ
โ โ โข Models โ โ
โ โ โข Validation โ โ
โ โโโโโโโโโโฌโโโโโโโโโ โ
โ โ โ
โ โโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโ โ
โ โ โ โ โ
โ โผ โผ โผ โ
โ โโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโ โ
โ โ Cloud Run โ โ OpenWhisk โ โ Future: โ โ
โ โ Adapter โ โ Adapter โ โ K8s Jobs โ โ
โ โโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโ โ
โ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Rationale: This architecture enables: - Platform switching without core code changes - A/B benchmarking between deployments - Air-gapped installation for security-sensitive environments
5.3 Zero-Infrastructure for Consultants¶
| Team Member | Infrastructure Responsibility |
|---|---|
| Wolfram | GCP, GitLab, Runners, Portal Deployment |
| Mike, Ian, Doug | None - only browser + GitLab login |
Principle: Houston team needs no local setup, no API keys, no cloud credentials.
5.4 Observability by Design¶
Three-tier observability architecture:
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Portal Observability โ
โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ Cloud Run Metrics (GCP) โ โ
โ โ โข Request count, latency, errors โ โ
โ โ โข Cold starts โ โ
โ โ โข Memory/CPU usage โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ โ
โ โผ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ Application Metrics (Custom) โ โ
โ โ โข Benchmark pipeline durations โ โ
โ โ โข PDF generation times โ โ
โ โ โข Active sessions โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ โ
โ โผ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ Portal Dashboard (User-Facing) โ โ
โ โ โข Runner health grid โ โ
โ โ โข Trend charts โ โ
โ โ โข Alerts โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
5.5 Progressive Enhancement¶
The portal complements existing tools, does not replace them:
| Capability | Current Tool | Portal Enhancement |
|---|---|---|
| Time Tracking | GitLab Issues | Dedicated UI, aggregation |
| Billing | CI/CD Pipeline | Async generation, status tracking |
| Documentation | MkDocs | Unified entry point |
| CI Monitoring | GitLab UI | Consolidated dashboard |
6 Constraints & Guardrails¶
6.1 Technical Constraints¶
| Constraint | Rationale |
|---|---|
| Python 3.11+ | Team skills, FastAPI ecosystem |
| GCP Free Tier | Budget during experimental phase |
| GitLab OIDC | No separate identity management |
| Static Frontend (GitLab Pages) | $0, already available |
6.2 Architectural Guardrails¶
Mandatory architecture rules:
| Guardrail | Rule |
|---|---|
| No Secrets in Frontend | GitLab Pages is public - all sensitive data only via auth'd API |
| Core Must Be Platform-Agnostic | shared/ has no cloud-specific imports |
| Adapters Are Thin | Max 50 LOC per adapter, logic belongs in core |
| Explicit Defaults | All assumptions documented, no magic values |
6.3 Security Boundaries¶
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Trust Boundaries โ
โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ PUBLIC (No Auth Required) โ โ
โ โ โ โ
โ โ โข GitLab Pages static content โ โ
โ โ โข MkDocs documentation โ โ
โ โ โข Login button โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ โ
โ OIDC Auth โ
โ โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ AUTHENTICATED (Valid Session Required) โ โ
โ โ โ โ
โ โ โข All Portal API endpoints โ โ
โ โ โข Time entries (own data) โ โ
โ โ โข Invoices (own data) โ โ
โ โ โข Benchmark dashboards โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ โ
โ Role Check โ
โ โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ ADMIN (Role = admin) โ โ
โ โ โ โ
โ โ โข All user time entries โ โ
โ โ โข Invoice generation โ โ
โ โ โข System configuration โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
7 Air-Gapped Deployment Option¶
For future scenarios (e.g., enterprise customers without cloud access):
| Component | Cloud | Air-Gapped |
|---|---|---|
| Compute | Cloud Run | K3s + Deployment |
| Database | Firestore | SQLite/PostgreSQL |
| Storage | GCS | Local filesystem |
| Auth | GitLab.com OIDC | Self-hosted GitLab / Local auth |
| Serverless | Cloud Run Jobs | OpenWhisk / faasd |
Hexagonal architecture makes this possible: Core logic remains identical, only adapters are swapped.
8 Success Criteria¶
| Metric | Phase 1 Target | Measurement |
|---|---|---|
| Adoption | 4/4 team members use portal | Login analytics |
| Time Tracking | 90% of hours tracked via portal | DB query |
| Billing Automation | 100% of invoices via portal | Manual count |
| Runner Visibility | Dashboard shows all 12 runners | Visual check |
| Cost | $0/month | GCP billing |
9 Decision¶
We build the CLARISSA Portal as central team interface with:
- Service-Based Architecture (Auth, Time, Billing, Benchmarks)
- Hexagonal Core for platform portability
- GCP Cloud Run as primary deployment platform
- GitLab OIDC for authentication
- Progressive Enhancement of existing tools
Details see: - ADR-021: System & Security Architecture - ADR-022: Software Architecture