From e9a35510c27ac77962ceac73924be44ecfd0e690 Mon Sep 17 00:00:00 2001 From: Sluijsens <1+sluijsens@noreply@slpsoftware.nl> Date: Fri, 24 Jul 2026 07:48:43 +0200 Subject: [PATCH 01/13] Changes ci cd workflow to separate files --- .gitea/workflows/deploy.yaml | 31 ++++++++++ .gitea/workflows/pipeline.yaml | 110 +++++++++++++++++++++++++++++++++ 2 files changed, 141 insertions(+) create mode 100644 .gitea/workflows/deploy.yaml create mode 100644 .gitea/workflows/pipeline.yaml diff --git a/.gitea/workflows/deploy.yaml b/.gitea/workflows/deploy.yaml new file mode 100644 index 0000000..85d4a32 --- /dev/null +++ b/.gitea/workflows/deploy.yaml @@ -0,0 +1,31 @@ +name: Deploy +on: + workflow_call: + inputs: + artifact_name: + required: true + type: string + environment: + required: true + type: string + +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - name: Download build artifact + uses: actions/download-artifact@v4 + with: + name: ${{ inputs.artifact_name }} + path: dist + + # Placeholder deploy step: voor nu wordt dist/ opnieuw gepubliceerd + # als duidelijk benoemde, downloadbare artifact. Zodra de hosting-/ + # upload-methode (FTP/SFTP/anders) vastligt, vervang deze stap door + # de daadwerkelijke upload en kan deze opmerking weg. + - name: Package release artifact + uses: actions/upload-artifact@v4 + with: + name: release-dist + path: dist/ + retention-days: 1 diff --git a/.gitea/workflows/pipeline.yaml b/.gitea/workflows/pipeline.yaml new file mode 100644 index 0000000..b6e24a8 --- /dev/null +++ b/.gitea/workflows/pipeline.yaml @@ -0,0 +1,110 @@ +name: Build, Test and Package Release +on: + workflow_dispatch: {} + pull_request: + types: [opened, synchronize, reopened] + +jobs: + prepare: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-node@v4 + with: + node-version: '20' + + - uses: pnpm/action-setup@v4 + with: + version: 9 + + - name: Get pnpm store directory + id: pnpm-store + run: echo "path=$(pnpm store path)" >> "$GITHUB_OUTPUT" + + - name: Cache pnpm store + uses: actions/cache@v4 + with: + path: ${{ steps.pnpm-store.outputs.path }} + key: pnpm-${{ hashFiles('pnpm-lock.yaml') }} + + - name: Install dependencies + run: pnpm install --frozen-lockfile + + build: + needs: prepare + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-node@v4 + with: + node-version: '20' + + - uses: pnpm/action-setup@v4 + with: + version: 9 + + - name: Get pnpm store directory + id: pnpm-store + run: echo "path=$(pnpm store path)" >> "$GITHUB_OUTPUT" + + - name: Restore pnpm store + uses: actions/cache@v4 + with: + path: ${{ steps.pnpm-store.outputs.path }} + key: pnpm-${{ hashFiles('pnpm-lock.yaml') }} + + - name: Install dependencies + run: pnpm install --frozen-lockfile + + - name: Build + run: pnpm run build + + - name: Upload build artifact + uses: actions/upload-artifact@v4 + with: + name: dist + path: dist/ + retention-days: 1 + + test: + needs: build + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-node@v4 + with: + node-version: '20' + + - uses: pnpm/action-setup@v4 + with: + version: 9 + + - name: Get pnpm store directory + id: pnpm-store + run: echo "path=$(pnpm store path)" >> "$GITHUB_OUTPUT" + + - name: Restore pnpm store + uses: actions/cache@v4 + with: + path: ${{ steps.pnpm-store.outputs.path }} + key: pnpm-${{ hashFiles('pnpm-lock.yaml') }} + + - name: Install dependencies + run: pnpm install --frozen-lockfile + + - name: Lint + run: pnpm run lint + + - name: Unit tests + run: pnpm run test + + deploy: + needs: [build, test] + if: github.event_name == 'workflow_dispatch' + uses: ./.gitea/workflows/deploy.yaml + with: + artifact_name: dist + environment: production From 3cb50f6f3901b4f8d7c4704eb5b9c6c47dbf521f Mon Sep 17 00:00:00 2001 From: Sluijsens <1+sluijsens@noreply@slpsoftware.nl> Date: Fri, 24 Jul 2026 07:48:58 +0200 Subject: [PATCH 02/13] Delete .gitea/workflows/deploy.yml --- .gitea/workflows/deploy.yml | 76 ------------------------------------- 1 file changed, 76 deletions(-) delete mode 100644 .gitea/workflows/deploy.yml diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml deleted file mode 100644 index 4d1414a..0000000 --- a/.gitea/workflows/deploy.yml +++ /dev/null @@ -1,76 +0,0 @@ -name: Build, Test and Package Release - -# Pipeline (see aidlc-docs/features/react-frontend/operations/deployment/deployment-instructions.md): -# - Runs automatically on every pull request (merge request) as a build/test/lint gate. -# - Can also be triggered manually from Gitea Actions, picking the branch/ref to run against. -# - The "deploy" job currently only packages dist/ as a downloadable artifact -# (no automatic upload to a host yet) and only runs for manual (workflow_dispatch) runs. -# Typically run on a `release/*` branch once you've manually created it for a release. -# - Uploaded artifacts expire after 1 day (retention-days: 1). -# - Gitea Actions has no GitLab/Azure DevOps-style approval gate (a single job with a -# "manual" play button inside an already-running pipeline). The closest equivalent is -# workflow_dispatch: the deploy job only runs when someone presses "Run workflow" in -# the Gitea Actions UI, i.e. a one-click manual approval. - -on: - workflow_dispatch: {} - pull_request: - types: [opened, synchronize, reopened] - -jobs: - build-and-test: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Setup Node.js - uses: actions/setup-node@v4 - with: - node-version: '20' - - - name: Setup pnpm - uses: pnpm/action-setup@v4 - with: - version: 9 - - - name: Install dependencies - run: pnpm install --frozen-lockfile - - - name: Lint - run: pnpm run lint - - - name: Unit tests - run: pnpm run test - - - name: Build - run: pnpm run build - - - name: Upload build artifact - uses: actions/upload-artifact@v3 - with: - name: dist - path: dist/ - retention-days: 1 - - deploy: - needs: build-and-test - if: github.event_name == 'workflow_dispatch' - runs-on: ubuntu-latest - steps: - - name: Download build artifact - uses: actions/download-artifact@v3 - with: - name: dist - path: dist - - # Placeholder deploy step: for now this only re-publishes dist/ as a clearly - # named, ready-to-download artifact. Once the hosting/upload method (FTP/SFTP/ - # other) is finalized, replace this step with the actual upload and this - # comment can be removed. - - name: Package release artifact - uses: actions/upload-artifact@v3 - with: - name: release-dist - path: dist/ - retention-days: 1 From 4e1b57e597cfa83672c8101504d3ed1e188ab209 Mon Sep 17 00:00:00 2001 From: Sluijsens <1+sluijsens@noreply@slpsoftware.nl> Date: Fri, 24 Jul 2026 08:01:23 +0200 Subject: [PATCH 03/13] Fixes artifact upload for workflow --- .gitea/workflows/deploy.yaml | 4 ++-- .gitea/workflows/pipeline.yaml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.gitea/workflows/deploy.yaml b/.gitea/workflows/deploy.yaml index 85d4a32..f7cc395 100644 --- a/.gitea/workflows/deploy.yaml +++ b/.gitea/workflows/deploy.yaml @@ -14,7 +14,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Download build artifact - uses: actions/download-artifact@v4 + uses: actions/download-artifact@v3 with: name: ${{ inputs.artifact_name }} path: dist @@ -24,7 +24,7 @@ jobs: # upload-methode (FTP/SFTP/anders) vastligt, vervang deze stap door # de daadwerkelijke upload en kan deze opmerking weg. - name: Package release artifact - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v3 with: name: release-dist path: dist/ diff --git a/.gitea/workflows/pipeline.yaml b/.gitea/workflows/pipeline.yaml index b6e24a8..748c60d 100644 --- a/.gitea/workflows/pipeline.yaml +++ b/.gitea/workflows/pipeline.yaml @@ -62,7 +62,7 @@ jobs: run: pnpm run build - name: Upload build artifact - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v3 with: name: dist path: dist/ From c1d2d3f15c476e256ec19e442bd68d02f9c5bc95 Mon Sep 17 00:00:00 2001 From: Sluijsens <1+sluijsens@noreply@slpsoftware.nl> Date: Fri, 24 Jul 2026 08:35:19 +0200 Subject: [PATCH 04/13] Delete .gitea/workflows/pipeline.yaml --- .gitea/workflows/pipeline.yaml | 110 --------------------------------- 1 file changed, 110 deletions(-) delete mode 100644 .gitea/workflows/pipeline.yaml diff --git a/.gitea/workflows/pipeline.yaml b/.gitea/workflows/pipeline.yaml deleted file mode 100644 index 748c60d..0000000 --- a/.gitea/workflows/pipeline.yaml +++ /dev/null @@ -1,110 +0,0 @@ -name: Build, Test and Package Release -on: - workflow_dispatch: {} - pull_request: - types: [opened, synchronize, reopened] - -jobs: - prepare: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - - uses: actions/setup-node@v4 - with: - node-version: '20' - - - uses: pnpm/action-setup@v4 - with: - version: 9 - - - name: Get pnpm store directory - id: pnpm-store - run: echo "path=$(pnpm store path)" >> "$GITHUB_OUTPUT" - - - name: Cache pnpm store - uses: actions/cache@v4 - with: - path: ${{ steps.pnpm-store.outputs.path }} - key: pnpm-${{ hashFiles('pnpm-lock.yaml') }} - - - name: Install dependencies - run: pnpm install --frozen-lockfile - - build: - needs: prepare - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - - uses: actions/setup-node@v4 - with: - node-version: '20' - - - uses: pnpm/action-setup@v4 - with: - version: 9 - - - name: Get pnpm store directory - id: pnpm-store - run: echo "path=$(pnpm store path)" >> "$GITHUB_OUTPUT" - - - name: Restore pnpm store - uses: actions/cache@v4 - with: - path: ${{ steps.pnpm-store.outputs.path }} - key: pnpm-${{ hashFiles('pnpm-lock.yaml') }} - - - name: Install dependencies - run: pnpm install --frozen-lockfile - - - name: Build - run: pnpm run build - - - name: Upload build artifact - uses: actions/upload-artifact@v3 - with: - name: dist - path: dist/ - retention-days: 1 - - test: - needs: build - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - - uses: actions/setup-node@v4 - with: - node-version: '20' - - - uses: pnpm/action-setup@v4 - with: - version: 9 - - - name: Get pnpm store directory - id: pnpm-store - run: echo "path=$(pnpm store path)" >> "$GITHUB_OUTPUT" - - - name: Restore pnpm store - uses: actions/cache@v4 - with: - path: ${{ steps.pnpm-store.outputs.path }} - key: pnpm-${{ hashFiles('pnpm-lock.yaml') }} - - - name: Install dependencies - run: pnpm install --frozen-lockfile - - - name: Lint - run: pnpm run lint - - - name: Unit tests - run: pnpm run test - - deploy: - needs: [build, test] - if: github.event_name == 'workflow_dispatch' - uses: ./.gitea/workflows/deploy.yaml - with: - artifact_name: dist - environment: production From 11250a584ebfa978aa824a9d959bdea613e71eba Mon Sep 17 00:00:00 2001 From: Sluijsens <1+sluijsens@noreply@slpsoftware.nl> Date: Fri, 24 Jul 2026 08:36:08 +0200 Subject: [PATCH 05/13] Renames ci pipeline and adds trigger when merging a pr --- .gitea/workflows/continuous_integration.yaml | 112 +++++++++++++++++++ 1 file changed, 112 insertions(+) create mode 100644 .gitea/workflows/continuous_integration.yaml diff --git a/.gitea/workflows/continuous_integration.yaml b/.gitea/workflows/continuous_integration.yaml new file mode 100644 index 0000000..25ec1fe --- /dev/null +++ b/.gitea/workflows/continuous_integration.yaml @@ -0,0 +1,112 @@ +name: Continuous Integration +on: + workflow_dispatch: {} + pull_request: + types: [opened, synchronize, reopened] + push: + branches: [main] + +jobs: + prepare: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-node@v4 + with: + node-version: '20' + + - uses: pnpm/action-setup@v4 + with: + version: 9 + + - name: Get pnpm store directory + id: pnpm-store + run: echo "path=$(pnpm store path)" >> "$GITHUB_OUTPUT" + + - name: Cache pnpm store + uses: actions/cache@v4 + with: + path: ${{ steps.pnpm-store.outputs.path }} + key: pnpm-${{ hashFiles('pnpm-lock.yaml') }} + + - name: Install dependencies + run: pnpm install --frozen-lockfile + + build: + needs: prepare + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-node@v4 + with: + node-version: '20' + + - uses: pnpm/action-setup@v4 + with: + version: 9 + + - name: Get pnpm store directory + id: pnpm-store + run: echo "path=$(pnpm store path)" >> "$GITHUB_OUTPUT" + + - name: Restore pnpm store + uses: actions/cache@v4 + with: + path: ${{ steps.pnpm-store.outputs.path }} + key: pnpm-${{ hashFiles('pnpm-lock.yaml') }} + + - name: Install dependencies + run: pnpm install --frozen-lockfile + + - name: Build + run: pnpm run build + + - name: Upload build artifact + uses: actions/upload-artifact@v3 + with: + name: dist + path: dist/ + retention-days: 1 + + test: + needs: build + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-node@v4 + with: + node-version: '20' + + - uses: pnpm/action-setup@v4 + with: + version: 9 + + - name: Get pnpm store directory + id: pnpm-store + run: echo "path=$(pnpm store path)" >> "$GITHUB_OUTPUT" + + - name: Restore pnpm store + uses: actions/cache@v4 + with: + path: ${{ steps.pnpm-store.outputs.path }} + key: pnpm-${{ hashFiles('pnpm-lock.yaml') }} + + - name: Install dependencies + run: pnpm install --frozen-lockfile + + - name: Lint + run: pnpm run lint + + - name: Unit tests + run: pnpm run test + + deploy: + needs: [build, test] + if: github.event_name == 'workflow_dispatch' || (github.event_name == 'push' && github.ref == 'refs/heads/main') + uses: ./.gitea/workflows/deploy.yaml + with: + artifact_name: dist + environment: production From b8b0cd2e2ca6e137ea731cbb00051af117ad0c0a Mon Sep 17 00:00:00 2001 From: Sluijsens Date: Fri, 24 Jul 2026 15:21:31 +0200 Subject: [PATCH 06/13] Finishes monitoring process in aidlc --- aidlc-docs/active-features.md | 2 +- .../features/react-frontend/aidlc-state.md | 18 +++-- aidlc-docs/features/react-frontend/audit.md | 49 ++++++++++++ .../operations/monitoring/monitoring-plan.md | 34 ++++++++ .../operations/monitoring/monitoring-setup.md | 62 +++++++++++++++ ...onitoring-setup-clarification-questions.md | 31 ++++++++ .../operations/plans/monitoring-setup-plan.md | 78 +++++++++++++++++++ .../production-readiness-checklist.md | 24 ++++++ 8 files changed, 290 insertions(+), 8 deletions(-) create mode 100644 aidlc-docs/features/react-frontend/operations/monitoring/monitoring-plan.md create mode 100644 aidlc-docs/features/react-frontend/operations/monitoring/monitoring-setup.md create mode 100644 aidlc-docs/features/react-frontend/operations/plans/monitoring-setup-clarification-questions.md create mode 100644 aidlc-docs/features/react-frontend/operations/plans/monitoring-setup-plan.md create mode 100644 aidlc-docs/features/react-frontend/operations/production-readiness-checklist.md diff --git a/aidlc-docs/active-features.md b/aidlc-docs/active-features.md index 32baed4..16f8b5b 100644 --- a/aidlc-docs/active-features.md +++ b/aidlc-docs/active-features.md @@ -2,4 +2,4 @@ | Feature | Status | Branch | Affected Components | Session Start | |---------|--------|--------|---------------------|---------------| -| react-frontend | 🟑 Operations | master | React frontend (SLP Software marketing site) | 2026-07-18 | +| react-frontend | βœ… Complete | master | React frontend (SLP Software marketing site) | 2026-07-18 | diff --git a/aidlc-docs/features/react-frontend/aidlc-state.md b/aidlc-docs/features/react-frontend/aidlc-state.md index 42216a3..6de86e5 100644 --- a/aidlc-docs/features/react-frontend/aidlc-state.md +++ b/aidlc-docs/features/react-frontend/aidlc-state.md @@ -5,7 +5,7 @@ - **Feature Slug**: react-frontend - **Project Type**: Greenfield - **Start Date**: 2026-07-18T00:37:00Z -- **Current Stage**: OPERATIONS - Deployment Setup Complete, awaiting approval +- **Current Stage**: OPERATIONS - Monitoring Setup (in progress) - **Branch**: master ## Workspace State @@ -37,6 +37,10 @@ - **Included**: Yes - **Method**: Manually-triggered Gitea Actions pipeline (build/test/lint gate + artifact packaging); actual host upload is manual for now, to be automated later +### Monitoring Setup +- **Included**: Yes +- **Approach**: Combination (Logging + Dashboards; Alerting explicitly out of scope) + ## Execution Plan Summary - **Total Stages**: 10 (2 skipped, 8 executed) - **Stages to Execute**: Functional Design, NFR Requirements, NFR Design, Code Generation, Build and Test, Deployment Setup, Monitoring Setup, Production Readiness Validation @@ -62,11 +66,11 @@ ### 🟑 OPERATIONS PHASE - [x] Deployment Setup (EXECUTE) - Completed 2026-07-19 -- [ ] Monitoring Setup (EXECUTE) -- [ ] Production Readiness Validation (EXECUTE) +- [x] Monitoring Setup (EXECUTE) - Completed 2026-07-24 +- [x] Production Readiness Validation (EXECUTE) - Completed 2026-07-24 ## Current Status -- **Lifecycle Phase**: OPERATIONS -- **Current Stage**: Deployment Setup Complete, awaiting approval -- **Next Stage**: Monitoring Setup (Operations Phase) -- **Status**: Ready to proceed +- **Lifecycle Phase**: Complete +- **Current Stage**: Complete +- **Next Stage**: N/A +- **Status**: Workflow complete diff --git a/aidlc-docs/features/react-frontend/audit.md b/aidlc-docs/features/react-frontend/audit.md index 690a7d8..8ac2ae7 100644 --- a/aidlc-docs/features/react-frontend/audit.md +++ b/aidlc-docs/features/react-frontend/audit.md @@ -287,3 +287,52 @@ **Context**: Deployment Setup (OPERATIONS PHASE) - requested change addressed, re-presenting completion message. --- + +## Deployment Setup - Approved + +**Timestamp**: 2026-07-19T23:20:00Z + +**User Input**: "Commit en ga door naar de volgende fase" + +**AI Response**: "Deployment Setup approved. Committed all deployment artifacts (.gitea/workflows/deploy.yml, deployment-plan.md, deployment-instructions.md, rollback-plan.md) to git. Proceeding to Monitoring Setup (OPERATIONS PHASE)." + +**Context**: Deployment Setup stage complete and approved; moving to Monitoring Setup. + +--- + +## Monitoring Setup - Answers Reviewed, Clarification Needed + +**Timestamp**: 2026-07-21T00:16:00Z + +**User Input**: "ga verder met de aidlc workflow. ik heb de vragen over het monitoring plan beantwoord" (answers filled in directly in operations/plans/monitoring-setup-plan.md: Q1:A, Q2:A, Q3:C, Q4:S, Q5:C, Q6:C, Q7:A) + +**AI Response**: "Detected a contradiction: Question 2 answer is 'A' (Logging only), yet Question 4, 5 and 6 (only relevant for Alerting/Dashboards) were also answered, implying the user may actually want Alerting and/or Dashboards too. Also detected an invalid answer on Question 4 ('S' is not one of the offered A-E options). Created operations/plans/monitoring-setup-clarification-questions.md with 2 clarification questions to resolve both issues before generating monitoring artifacts." + +**Context**: Monitoring Setup (OPERATIONS PHASE) - Step 5, contradiction/ambiguity detection; awaiting user clarification before proceeding to Step 6 (artifact generation). + +--- + +## Monitoring Setup - Clarification Answers Received, Artifacts Generated + +**Timestamp**: 2026-07-24T15:00:00Z + +**User Input**: "Ik heb de vragen ingevuld" (clarification answers filled in directly in operations/plans/monitoring-setup-clarification-questions.md: Clarification Q1:C (Logging + Dashboards, no Alerting), Clarification Q2:D (not applicable / decide later)). + +**AI Response**: "Read and validated the clarification answers: chosen approach resolved to Logging + Dashboards, Alerting explicitly out of scope. Generated operations/monitoring/monitoring-plan.md (decision, chosen approaches, rationale, open items) and operations/monitoring/monitoring-setup.md (concrete logging destination options, analytics + uptime dashboard tool options and setup steps). Updated aidlc-state.md: Operations Configuration > Monitoring Setup (Included: Yes, Approach: Combination) and Stage Progress marked complete." + +**Context**: Monitoring Setup (OPERATIONS PHASE) - Step 6/7 artifacts generated; presenting completion message, awaiting approval before Production Readiness Validation. + +--- + +## Production Readiness Validation - Complete + +**Timestamp**: 2026-07-24T15:12:00Z + +**User Input**: "ga verder" (approval to proceed to Production Readiness Validation) + +**AI Response**: "Reviewed Deployment Setup and Monitoring Setup outcomes; no blocking gaps requiring new user questions were found (remaining items are already-tracked open follow-ups: host upload automation, logging destination, analytics/uptime tool selection, formal Lighthouse run). Generated operations/production-readiness-checklist.md with Overall Readiness = 'Yes with caveats'. Marked Production Readiness Validation and the overall feature as Complete in aidlc-state.md, and updated active-features.md status to βœ… Complete." + +**Overall Readiness**: Yes with caveats +**Feature Status**: Complete + +--- diff --git a/aidlc-docs/features/react-frontend/operations/monitoring/monitoring-plan.md b/aidlc-docs/features/react-frontend/operations/monitoring/monitoring-plan.md new file mode 100644 index 0000000..dc3b4c7 --- /dev/null +++ b/aidlc-docs/features/react-frontend/operations/monitoring/monitoring-plan.md @@ -0,0 +1,34 @@ +# Monitoring Plan + +## Context +This feature is a static marketing website (`dist/` bundle, no back-end, no database) currently deployed manually via a build artifact (see `operations/deployment/deployment-plan.md`). There is no existing monitoring/logging infrastructure in this project yet. + +## Decision +Monitoring/observability is **included** for this feature (Question 1 = A / clarified further via Clarification Question 1). + +Initial answers to the monitoring plan were contradictory: Question 2 selected "Logging" only (A), yet the alerting/dashboard follow-up questions (4, 5, 6) were also answered, and the answer to Question 4 (`S`) was not a valid option. A clarification round was run (`operations/plans/monitoring-setup-clarification-questions.md`) to resolve this before generating artifacts. + +**Clarified answer**: **Logging + Dashboards** (Clarification Question 1 = C). Alerting is explicitly **out of scope** for this feature at this time (Clarification Question 2 = D, "not needed yet / decide later" β€” consistent with not choosing Alerting in Clarification Question 1). + +## Chosen Approach(es) + +### Logging +Client-side errors (JavaScript crashes, broken links) should be logged, but the concrete destination is not yet decided (original Question 3 = C, "not yet determined"). This is tracked as an **open action item** below rather than blocking this stage. + +### Dashboards +A combination of: +- **Website analytics** (visitors, page views, basic engagement) β€” e.g. a simple/free tool such as Plausible, Umami, or Google Analytics/Search Console. +- **Uptime dashboard** (site reachability) β€” e.g. an external monitoring service such as UptimeRobot or Better Uptime. + +(Original Question 6 = C, "Both (analytics + uptime dashboard)".) + +## Explicitly Out of Scope +- **Alerting/notifications**: not requested. If the uptime dashboard tool supports basic notifications (e.g. UptimeRobot's own e-mail alert on downtime), that MAY be enabled opportunistically as part of dashboard setup, but no dedicated alerting channel, escalation policy, or alert-on-error-rate logic is designed or required here. +- **Reuse of existing infrastructure**: this feature does not plug into any pre-existing shared monitoring (original Question 7 = A) β€” there is none yet. Should a shared back-end/CMS monitoring stack be introduced later, this can be revisited. + +## Open Action Items +1. **Decide logging destination**: choose between "browser console only" (no central storage, manual debugging) or a free/low-cost external error-tracking service (e.g. Sentry free tier) once this becomes a priority. Until decided, `monitoring-setup.md` documents both options so either can be adopted without re-doing this stage. +2. **Pick concrete analytics + uptime tools**: `monitoring-setup.md` lists candidate free-tier tools; final tool selection/account creation is a manual follow-up outside this workflow (no code changes required to swap providers, since neither is wired into the codebase yet beyond an optional embed snippet). + +## Rationale +Given this is a simple static marketing site with no backend and no existing monitoring, the aim is lightweight, low/no-cost observability: enough to know if the site is down (uptime) and how it's being used (analytics), plus a documented (if not yet finalized) path for capturing client-side errors. Alerting was deliberately left out to avoid over-engineering a notification pipeline before there's a concrete trigger/audience for it. diff --git a/aidlc-docs/features/react-frontend/operations/monitoring/monitoring-setup.md b/aidlc-docs/features/react-frontend/operations/monitoring/monitoring-setup.md new file mode 100644 index 0000000..7ecd24b --- /dev/null +++ b/aidlc-docs/features/react-frontend/operations/monitoring/monitoring-setup.md @@ -0,0 +1,62 @@ +# Monitoring Setup Instructions + +Concrete setup steps for the approaches chosen in `monitoring-plan.md`: **Logging** and **Dashboards** (no Alerting). + +## Logging + +### What to log +- Uncaught JavaScript errors / exceptions (the app already has an `ErrorBoundary` component from Code Generation β€” this is the natural hook point). +- Broken/failed navigation (e.g. an unexpected router error). +- No user PII, form input, or sensitive data should ever be logged β€” this is a public marketing site, but keep this discipline regardless. + +### Destination β€” open decision +The destination was not finalized (original Question 3 = C). Two supported options, either of which can be adopted later without further design work: + +**Option 1: Browser console only (default today)** +- No code changes needed β€” errors already surface via `console.error` inside the existing `ErrorBoundary`. +- Zero cost, but not centrally visible; only useful for manual debugging (e.g. via a user's screenshot or a support request). + +**Option 2: External error-tracking service (e.g. Sentry free tier)** +- When decided, add `@sentry/react` as a dependency, initialize it once in the app entry point (e.g. `src/main.tsx`) with the project DSN, and report caught errors from the `ErrorBoundary`'s `componentDidCatch`/`onError` hook to Sentry in addition to the console. +- Store the DSN as a Gitea Actions variable (or a build-time `.env` value, since it's not a secret β€” Sentry DSNs are safe to expose client-side) and inject it via Vite's `import.meta.env`. +- Free tier limits (error volume, retention) are typically sufficient for a low-traffic marketing site. + +**Log level strategy**: only errors are logged (no verbose/info-level client logging) β€” this is a static site with no meaningful "business events" beyond page views, which are covered by analytics (see Dashboards below), not logging. + +## Dashboards + +### Website analytics +Pick one (all have generous free tiers suitable for a small marketing site): + +| Option | Notes | +|---|---| +| Plausible / Umami | Privacy-friendly, lightweight, no cookie banner typically required; self-hosted or low-cost hosted tier | +| Google Analytics (GA4) / Search Console | Free, widely known, but heavier script and involves third-party data sharing (cookie/consent implications) | + +**Setup (once a tool is picked)**: +1. Create an account/site entry with the chosen provider and obtain the tracking snippet or `