Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
1ff2486
Enable hCaptcha for prod/staging when site key set
Codebmk Jun 3, 2026
edfa491
Add social auth section and OAuth helpers
Codebmk Jun 3, 2026
69b663b
Merge branch 'staging' into renable-hcaptcha-and-social-auth
Codebmk Jun 3, 2026
762208b
Update auth redirects, middleware, and API proxy
Codebmk Jun 4, 2026
7510be3
Enable hCaptcha in development
Codebmk Jun 4, 2026
9508585
Add NETWORK.VIEW to role permissions
Codebmk Jun 4, 2026
39c9899
Update changelog.md
Codebmk Jun 4, 2026
0de31e7
Correct file paths to follow vertex changelog convention.
Codebmk Jun 4, 2026
0486642
Merge branch 'staging' into renable-hcaptcha-and-social-auth
Codebmk Jun 5, 2026
2bce5ca
Update vertex production image tag
github-actions[bot] Jun 5, 2026
0fe4bcd
Add BookStack-based internal docs Docker setup
Codebmk Jun 6, 2026
4d91f6f
Add Helm chart for internal-docs (Mariana)
Codebmk Jun 6, 2026
f2d106f
Update README.md
Codebmk Jun 6, 2026
2b06a96
Rename docs to Mariana Deep; update DB setup
Codebmk Jun 6, 2026
61fe431
Remove staging Helm values and update README
Codebmk Jun 6, 2026
630b88b
Update .env.example
Codebmk Jun 6, 2026
d594d66
Remove redundant database environment variables.
Codebmk Jun 6, 2026
c33038e
Remove PUID/PGID from MariaDB service.
Codebmk Jun 6, 2026
36d3e9c
Pin the image tag instead of using latest in production.
Codebmk Jun 6, 2026
54ebf73
Fix missing ConfigMap referenced by deployment
Codebmk Jun 6, 2026
c469887
Add liveness and readiness probes for database reliability.
Codebmk Jun 6, 2026
2d7bbff
larger database storage and explicit storageClassName for production
Codebmk Jun 6, 2026
e9aa717
Create hpa.yaml
Codebmk Jun 6, 2026
f0183e6
Update README.md
Codebmk Jun 6, 2026
991cee8
Update README.md
Codebmk Jun 6, 2026
66165aa
Move sensitive env to Secret; bump chart & docs
Codebmk Jun 6, 2026
71f14f2
Merge pull request #3582 from airqo-platform/internal-docs-project
Baalmart Jun 6, 2026
f2e76bf
Merge branch 'staging' into renable-hcaptcha-and-social-auth
Codebmk Jun 7, 2026
ccbad26
Update changelog.md
Codebmk Jun 7, 2026
7a886a4
Update changelog.md
Codebmk Jun 7, 2026
1ce578e
Correct file paths to follow vertex changelog convention
Codebmk Jun 7, 2026
7012b61
OAuth failure banner may not be visible on the email step
Codebmk Jun 7, 2026
02e3d6d
Persist the selected provider before redirecting OAuth.
Codebmk Jun 7, 2026
70799d6
Fix NextAuth auth gating in src/vertex/middleware.ts
Codebmk Jun 7, 2026
8d5f5c9
Consolidate/mirror legacy redirects across Vertex Next.js configs
Codebmk Jun 7, 2026
b0612a7
Handle OAuth token handoff and middleware bypass
Codebmk Jun 7, 2026
7eda50d
Update changelog.md
Codebmk Jun 7, 2026
9eb0f12
Improve OAuth redirect handling in authProvider
Codebmk Jun 7, 2026
cfd1003
Update changelog.md
Codebmk Jun 7, 2026
47acf76
Integrate group onboarding checklist sync
Codebmk Jun 7, 2026
86ef263
Use secureApiProxy and auto-sync onboarding steps
Codebmk Jun 7, 2026
c9e6680
Add group hooks and use in welcome page
Codebmk Jun 7, 2026
4574438
Update changelog.md
Codebmk Jun 7, 2026
44c2f62
Add cleanup for setTimeout to prevent post-unmount execution.
Codebmk Jun 7, 2026
d3209b0
Merge pull request #3575 from airqo-platform/renable-hcaptcha-and-soc…
Baalmart Jun 7, 2026
76ed5f5
Update vertex staging image tag to stage-d3209b04-1780831845
github-actions[bot] Jun 7, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion k8s/vertex/k8s-aks/airqo-vertex/values-prod.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
replicaCount: 2
image:
repository: airqoacr.azurecr.io/airqo-vertex
tag: prod-726b5a3b-1780565472
tag: prod-1786c96c-1780691136
pullPolicy: IfNotPresent
imagePullSecrets: []
nameOverride: ''
Expand Down
2 changes: 1 addition & 1 deletion k8s/vertex/k8s-aks/airqo-vertex/values-stage.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
replicaCount: 2
image:
repository: airqoacr.azurecr.io/airqo-stage-vertex
tag: stage-ce0f32db-1780506966
tag: stage-d3209b04-1780831845
pullPolicy: IfNotPresent
imagePullSecrets: []
nameOverride: ''
Expand Down
43 changes: 43 additions & 0 deletions src/internal-docs/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# -------------------------------------------------------------------------
# BookStack Environment Configuration
# -------------------------------------------------------------------------
# Copy this file to `.env` before running `docker compose up -d`.
# Do not commit the `.env` file to version control.
# -------------------------------------------------------------------------

# The base URL of your BookStack installation.
# Must include the protocol (http:// or https://)
APP_URL=http://localhost:6875

# The name of the application (Shows in the header and emails)
APP_NAME="Mariana Deep"

# Disable public access to enforce authentication for all pages
# Set to 'true' if you want anonymous users to read documentation
APP_PUBLIC=false

# Application Key (Required for sessions and encryption)
# Generate a new one for production using: docker run --rm --entrypoint /bin/bash lscr.io/linuxserver/bookstack:latest appkey
APP_KEY=

# -------------------------------------------------------------------------
# Database Configuration
# -------------------------------------------------------------------------
# Ensure these match the values used in docker-compose.yml.
DB_HOST=bookstack_db
DB_DATABASE=bookstackapp
DB_USER=bookstack
DB_PASSWORD=your_secure_db_password
DB_ROOT_PASSWORD=your_secure_root_password

# -------------------------------------------------------------------------
# Mail Settings (Optional but recommended for user invitations/resets)
# -------------------------------------------------------------------------
# MAIL_DRIVER=smtp
# MAIL_HOST=smtp.mailtrap.io
# MAIL_PORT=2525
# MAIL_USERNAME=null
# MAIL_PASSWORD=null
# MAIL_ENCRYPTION=null
# MAIL_FROM=docs@yourdomain.com
# MAIL_FROM_NAME="Internal Docs"
9 changes: 9 additions & 0 deletions src/internal-docs/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Ignore environment variables file
.env

# Ignore Docker volumes for BookStack application state (uploads, themes, etc.)
config/

# Ignore Docker volumes for MariaDB database files
db_data/
db_data_v2/
99 changes: 99 additions & 0 deletions src/internal-docs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
# Mariana Deep - Internal Documentation

This repository contains the containerized environment and Kubernetes Helm charts for **Mariana Deep**, AirQo's internal documentation platform powered by [BookStack](https://www.bookstackapp.com/).

## Table of Contents
- [Local Setup & Testing](#local-setup--testing)
- [Kubernetes Deployment](#kubernetes-deployment)
- [Creating & Editing Documentation](#creating--editing-documentation)
- [Information Architecture](#information-architecture-product-focused)
- [Contributing Guidelines](#contributing-guidelines)
- [Security & Data Persistence](#security--data-persistence)

## Local Setup & Testing

To spin up the documentation platform locally for testing or local development:

1. **Configure the Environment**
Duplicate the provided example environment file:

*macOS / Linux:*
```bash
cp .env.example .env
```
*Windows (Command Prompt / PowerShell):*
```cmd
copy .env.example .env
```

2. **Start the Containers**
Use Docker Compose to build and start the environment in the background:
```bash
docker compose up -d
```

3. **Access the Application**
Wait approximately 20 seconds for database migrations to complete.
Open your browser and navigate to `http://localhost:6875`.
*(Default credentials on first run: `admin@admin.com` / `password`)*

## Kubernetes Deployment

The project uses Helm charts located in the `k8s/` directory to deploy to our production cluster.

### Environments
- **Production**: Accessible at `https://platform.airqo.net/mariana`

### Deployment Commands
To deploy or upgrade the cluster, run the following Helm commands from the root of this project:

**Production:**
```bash
helm upgrade --install airqo-internal-docs k8s/ -f k8s/values-prod.yaml -n production
```

## Creating & Editing Documentation

BookStack features an intuitive WYSIWYG editor, making it incredibly easy for any technical contributor to document features, APIs, and runbooks without fighting markdown syntax (though Markdown is fully supported!).

### How to Create Content
1. **Navigate to the appropriate Book**: Look at the Information Architecture below to find exactly where your document belongs.
2. **Add a Chapter or Page**: Click the "New Page" or "New Chapter" button in the right sidebar menu.
3. **Use the Editor**: Write your documentation. You can drag-and-drop images directly into the editor. If you prefer raw markdown, you can switch the editor type in your user settings.
4. **Link Internal Content**: Use the "Link" button to easily search and interlink to other existing internal documents.

### Best Practices for Documentation
- **Keep it Concise**: Use bullet points, clear headings, and avoid massive walls of text. Scannability is key.
- **Keep it Updated**: The Boy Scout Rule applies—if you change a system's behavior, update its documentation in the exact same sprint.
- **Use Code Blocks**: When documenting CLI commands, scripts, or JSON payloads, use properly formatted code blocks.
- **Tagging**: Use tags on your pages (e.g., `api`, `deprecated`, `v2`) to make them highly searchable across the platform.

## Information Architecture (Product-Focused)

We organize all of our documentation using a **Product-focused approach**. Whether it's a mobile app, a microservice, or a data pipeline, every major initiative is treated as a Product. Strictly adhere to the following hierarchy:

1. **Shelves (High-Level Domains)**: Groups related products under a larger domain or suite.
*(Examples: AirQo Platform, Data Pipelines, Mobile Apps, Infrastructure)*
2. **Books (The Products)**: Represents a specific Product, Microservice, or distinct Tool.
*(Examples: Netmanager, Beacon, AirQo API, Ingestion Pipeline)*
3. **Chapters (Major Components)**: Groups related documentation topics within a specific Product.
*(Examples: Architecture, API Reference, Deployment Guides, Runbooks)*
4. **Pages (Specific Documents)**: The granular, individual pieces of documentation.
*(Examples: Authentication Flow Diagram, GET /v1/devices, How to run the calibration script)*

**Example Flow:**
`Shelves (AirQo Platform) -> Book (Netmanager) -> Chapter (API Reference) -> Page (Authentication Endpoint)`

## Contributing Guidelines

We encourage all engineers to actively contribute to Mariana Deep. If you see something wrong, fix it!

- **Typos and Minor Fixes**: Fix them immediately using the BookStack web interface. No review needed.
- **Major Architectural Documentation**: Draft the documentation in a Page and request a review (via Slack or email link) from the Lead Engineer of that specific product before finalizing.
- **Infrastructure Changes**: If you are modifying the Helm charts or Docker Compose configurations in this repository, please create a feature branch, test locally using Docker Compose, and open a standard Pull Request on GitHub.

## Security & Data Persistence

- **Public Access**: Explicitly disabled (`APP_PUBLIC=false`). Unauthenticated users cannot view any pages and will be immediately redirected to the login screen.
- **User Management**: Open registration is disabled. Administrators manually provision access.
- **Data Persistence**: In Kubernetes, Persistent Volume Claims (PVCs) ensure uploaded images and database state survive pod restarts. Locally, BookStack configuration and uploads are stored in the bind-mounted `./config` directory, while database data persists in the Docker-managed `bookstack_db_data` volume.
52 changes: 52 additions & 0 deletions src/internal-docs/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
version: "3.8"

services:
bookstack:
image: lscr.io/linuxserver/bookstack:24.05.2
container_name: bookstack
environment:
- PUID=1000
- PGID=1000
- TZ=UTC
- APP_NAME=${APP_NAME:-"Mariana Deep"}
- APP_URL=${APP_URL:-http://localhost:6875}
- APP_KEY=${APP_KEY:-}
- DB_HOST=bookstack_db
- DB_PORT=3306
- DB_USER=${DB_USER:-bookstack}
- DB_PASS=${DB_PASSWORD:-bookstack_secure_password}
- DB_DATABASE=${DB_DATABASE:-bookstackapp}
# Security & Access Control phase settings:
- APP_PUBLIC=${APP_PUBLIC:-false} # Disable public viewing by default
volumes:
- ./config:/config
ports:
- "6875:80"
restart: unless-stopped
depends_on:
- bookstack_db
networks:
- internal-docs-network

bookstack_db:
image: mariadb:10.6
container_name: bookstack_db
environment:
- TZ=UTC
- MYSQL_ROOT_PASSWORD=${DB_ROOT_PASSWORD:-root_secure_password}
- MYSQL_DATABASE=${DB_DATABASE:-bookstackapp}
- MYSQL_USER=${DB_USER:-bookstack}
- MYSQL_PASSWORD=${DB_PASSWORD:-bookstack_secure_password}
volumes:
- bookstack_db_data:/var/lib/mysql
restart: unless-stopped
networks:
- internal-docs-network

networks:
internal-docs-network:
name: internal-docs-network
driver: bridge

volumes:
bookstack_db_data:
10 changes: 10 additions & 0 deletions src/internal-docs/k8s/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
apiVersion: v2
appVersion: "24.05.2"
description: AirQo Internal Docs (Mariana Deep) Helm Chart
name: airqo-internal-docs
home: https://airqo.net
version: 0.1.0
maintainers:
- name: AirQo
email: support@airqo.net
url: https://airqo.net
49 changes: 49 additions & 0 deletions src/internal-docs/k8s/templates/_helpers.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
{{/*
Expand the name of the chart.
*/}}
{{- define "internal-docs.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
{{- end }}

{{/*
Create a default fully qualified app name.
*/}}
{{- define "internal-docs.fullname" -}}
{{- if .Values.fullnameOverride }}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
{{- else }}
{{- $name := default .Chart.Name .Values.nameOverride }}
{{- if contains $name .Release.Name }}
{{- .Release.Name | trunc 63 | trimSuffix "-" }}
{{- else }}
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }}
{{- end }}
{{- end }}
{{- end }}

{{/*
Create chart name and version as used by the chart label.
*/}}
{{- define "internal-docs.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
{{- end }}

{{/*
Common labels
*/}}
{{- define "internal-docs.labels" -}}
helm.sh/chart: {{ include "internal-docs.chart" . }}
{{ include "internal-docs.selectorLabels" . }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- end }}

{{/*
Selector labels
*/}}
{{- define "internal-docs.selectorLabels" -}}
app.kubernetes.io/name: {{ include "internal-docs.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}
19 changes: 19 additions & 0 deletions src/internal-docs/k8s/templates/configmap.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ .Values.app.configmap }}
namespace: {{ .Values.app.namespace }}
labels:
{{- include "internal-docs.labels" . | nindent 4 }}
data:
# BookStack Specific
APP_NAME: {{ .Values.env.APP_NAME | quote }}
APP_PUBLIC: {{ .Values.env.APP_PUBLIC | quote }}

# Shared Database Configuration (Used by BookStack container)
DB_USER: {{ .Values.env.DB_USER | quote }}
DB_DATABASE: {{ .Values.env.DB_DATABASE | quote }}

# MariaDB Specific (Used by MariaDB container)
MYSQL_USER: {{ .Values.env.DB_USER | quote }}
MYSQL_DATABASE: {{ .Values.env.DB_DATABASE | quote }}
60 changes: 60 additions & 0 deletions src/internal-docs/k8s/templates/deployment-app.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ .Values.app.name }}
namespace: {{ .Values.app.namespace }}
labels:
{{- include "internal-docs.labels" . | nindent 4 }}
spec:
replicas: {{ .Values.replicaCount }}
selector:
matchLabels:
app: {{ .Values.app.label }}
template:
metadata:
labels:
app: {{ .Values.app.label }}
spec:
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
containers:
- name: {{ .Values.app.label }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
ports:
- name: http
containerPort: {{ .Values.service.targetPort }}
protocol: TCP
env:
- name: DB_HOST
value: {{ .Values.dbApp.name }}
- name: APP_URL
value: {{ .Values.app.url | quote }}
envFrom:
- configMapRef:
name: {{ .Values.app.configmap }}
- secretRef:
name: {{ .Values.app.configmap }}-secret
volumeMounts:
- name: bookstack-config
mountPath: /config
resources:
{{- toYaml .Values.resources | nindent 12 }}
volumes:
- name: bookstack-config
persistentVolumeClaim:
claimName: {{ .Values.app.name }}-pvc
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
Loading
Loading