From 76a6cc12c9678852a7d0da3e5f03f86fd93ff38f Mon Sep 17 00:00:00 2001
From: Fernando Tona <105774270+fernandotonacoder@users.noreply.github.com>
Date: Sun, 29 Mar 2026 04:01:54 +0100
Subject: [PATCH 1/2] chore: updat docs & set SQ Server to scan dev branch
---
.github/workflows/sonarqube.yml | 2 +-
README.md | 182 ++++++++++++++++++++++++++++----
docs/sonarqube-admin.md | 55 ++++++++++
3 files changed, 215 insertions(+), 24 deletions(-)
create mode 100644 docs/sonarqube-admin.md
diff --git a/.github/workflows/sonarqube.yml b/.github/workflows/sonarqube.yml
index f8b23c0..9a57178 100644
--- a/.github/workflows/sonarqube.yml
+++ b/.github/workflows/sonarqube.yml
@@ -4,7 +4,7 @@ on:
push:
branches:
# - main # production, already covered automatically by SonarQube Cloud
- - main
+ - dev
# pull_request: # SonarQube Server Community doesn't support PRs
# types: [opened, synchronize, reopened]
workflow_dispatch:
diff --git a/README.md b/README.md
index 45d685a..9b1ea2f 100644
--- a/README.md
+++ b/README.md
@@ -8,33 +8,166 @@
- |
+ | SonarQube Cloud main |
+ SonarQube Server dev (self-hosted on Azure) |
+
+
+
-
+
|
-
-
+
+
|
+
|
+
+
+
+
+ |
+
+
+
+
+
+
+ |
+ N/A — free tier limitation |
+
+
+ | N/A — free tier limitation |
+
+
+
+
+ |
+
+
+ | N/A — free tier limitation |
+
+
+
+
+ |
+
+
+
+
+
+
+
+ |
+
+
+
+
+ |
+
+
+
+
+
+
+ |
+ N/A — free tier limitation |
+
+
+ | N/A — free tier limitation |
+
+
+
+
+ |
+
|
+
+
+
+
+ |
+
+
+
+
+
+
+ |
+
+
+
+
+ |
+
+
+
+
+
+
+ |
+ N/A — free tier limitation |
+
+
+ | N/A — free tier limitation |
+
+
+
+
+ |
+
+
+
+ | N/A — free tier limitation |
+
+
+
+
+ |
+
+
+
+
+
+
+ |
+
+
+
+
+ |
+
+
+
+
+
+
+
+ |
+
+
+
+
+ |
+---
+
A high-performance web platform for a construction firm specializing in ETICS insulation. Built to bridge modern frontend development with real-world business needs, focusing on SEO and lead generation.
## 📋 About
@@ -57,17 +190,17 @@ Optimized for performance and SEO to maximize the company's online visibility. F
## 🚀 Tech Stack
-| Category | Technology |
-| ------------- | --------------------------------------------------------------------------------------- |
-| Framework | React |
-| Language | JavaScript |
-| Styling | Tailwind CSS |
-| UI Components | Shadcn UI |
-| Testing | Vitest |
-| Code Quality | [SonarQube Cloud](https://sonarcloud.io/project/overview?id=fernandotonacoder_chrisert) |
-| Staging | GitHub Pages |
-| Production | Netlify |
-| Forms | Netlify Forms |
+| Category | Technology |
+| ------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
+| Framework | React |
+| Language | JavaScript |
+| Styling | Tailwind CSS |
+| UI Components | Shadcn UI |
+| Testing | Vitest |
+| Code Quality | [SonarQube Cloud](https://sonarcloud.io/project/overview?id=fernandotonacoder_chrisert) (`main`) + [SonarQube Server](https://sonarqube-ft-dpdwb8g8dnhkfbey.swedencentral-01.azurewebsites.net/dashboard?id=fernandotonacoder_chrisert_bbc86f72-9ba6-4533-99be-b85658dca317) (`dev`) |
+| Staging | GitHub Pages |
+| Production | Netlify |
+| Forms | Netlify Forms |
## 🛠️ Getting Started
@@ -81,13 +214,10 @@ Optimized for performance and SEO to maximize the company's online visibility. F
```bash
# Clone the repository
git clone https://github.com/fernandotonacoder/chrisert.git
-
# Navigate to the project directory
cd chrisert
-
# Install dependencies
npm install
-
# Start the development server
npm run dev
```
@@ -97,19 +227,14 @@ npm run dev
```bash
# Run development server
npm run dev
-
# Run dev server accessible from other devices (e.g., mobile)
npm run dev -- --host
-
# Build for production
npm run build
-
# Run tests
npm run test
-
# Run tests with coverage report
npm run test:coverage
-
# Preview production build
npm run preview
```
@@ -132,6 +257,17 @@ npm run preview
- **Deployments:** Automatic on push to respective branches
- **Auto-Sync:** After each push to `main`, changes are automatically rebased onto `dev` to keep branches in sync
+### Code Quality Strategy
+
+This project uses two SonarQube instances with complementary roles:
+
+| Instance | Branch | Role |
+| ------------------------------------------- | ------ | ----------------------------------------------------------------------------------------- |
+| **SonarQube Cloud** | `main` | Automatic analysis of production code; decorates PRs with quality feedback before merge |
+| **SonarQube Server** (self-hosted on Azure) | `dev` | Continuous analysis of active development; monitors code quality before it reaches `main` |
+
+SonarQube Cloud handles PR decoration automatically via GitHub App. The self-hosted server runs via GitHub Actions on every push to `dev`. See [`docs/sonarqube-admin.md`](docs/sonarqube-admin.md) for administration notes.
+
### Deployment Controls
- **Manual Triggers:** Both GitHub Pages and Netlify workflows can also be triggered manually via Actions → Run workflow
diff --git a/docs/sonarqube-admin.md b/docs/sonarqube-admin.md
new file mode 100644
index 0000000..3519647
--- /dev/null
+++ b/docs/sonarqube-admin.md
@@ -0,0 +1,55 @@
+# SonarQube Server — Administration Notes
+
+### Administration commands and notes for the SonarQube Server (self-hosted) for this project.
+
+> Instance: `https://sonarqube-ft-dpdwb8g8dnhkfbey.swedencentral-01.azurewebsites.net`
+
+---
+
+## Changing the project's main branch via API
+
+SonarQube Community Build does not allow changing the default branch from _main_ to _dev_ through the graphical interface. The REST API must be used instead.
+
+```bash
+curl -X POST \
+ -H "Authorization: Bearer " \
+ "https://sonarqube-ft-dpdwb8g8dnhkfbey.swedencentral-01.azurewebsites.net/api/project_branches/rename" \
+ -d "project=fernandotonacoder_chrisert_bbc86f72-9ba6-4533-99be-b85658dca317&name=dev"
+```
+
+Replace `` with a User Token generated under **My Account → Security**.
+
+---
+
+## SonarQube Server Badges
+
+SonarQube Server badges require a dedicated badge token. To generate one:
+
+**Project Settings → Badges → Generate a token**
+
+The badge token is different from the analysis token — it is read-only and is used solely to expose metrics publicly.
+
+Badge URL:
+
+```
+https://sonarqube-ft-dpdwb8g8dnhkfbey.swedencentral-01.azurewebsites.net/api/project_badges/measure?project=fernandotonacoder_chrisert_bbc86f72-9ba6-4533-99be-b85658dca317&metric=alert_status&token=
+```
+
+Available metrics: `alert_status`, `security_rating`, `sqale_rating`, `reliability_rating`, `coverage`, `duplicated_lines_density`
+
+---
+
+## Project Key
+
+```
+fernandotonacoder_chrisert_bbc86f72-9ba6-4533-99be-b85658dca317
+```
+
+---
+
+## Required GitHub Repository Secrets
+
+| Secret | Description |
+| ---------------- | ------------------------------------------------------------------------------------------------ |
+| `SONAR_TOKEN` | Project Analysis Token generated under My Account → Security → Project Analysis Token → chrisert |
+| `SONAR_HOST_URL` | `https://sonarqube-ft-dpdwb8g8dnhkfbey.swedencentral-01.azurewebsites.net` |
From 2e2905db1b841909561695925a3a967afc0f6a3f Mon Sep 17 00:00:00 2001
From: Fernando Tona <105774270+fernandotonacoder@users.noreply.github.com>
Date: Sun, 29 Mar 2026 04:08:57 +0100
Subject: [PATCH 2/2] little improvements on docs
---
README.md | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/README.md b/README.md
index 9b1ea2f..fba822d 100644
--- a/README.md
+++ b/README.md
@@ -306,7 +306,13 @@ The **source code** of this project is licensed under the [MIT License](LICENSE)
**Fernando Tona**
- GitHub: [@fernandotonacoder](https://github.com/fernandotonacoder)
+- LinkedIn: [Fernando Tona](https://www.linkedin.com/in/fernandotona/)
+- Website: [fernandotonacoder.github.io](https://fernandotonacoder.github.io/)
---
+
+
_Built with ❤️ for real-world business needs_
+
+