Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
73 commits
Select commit Hold shift + click to select a range
04d9d4a
feat: completed base models
superwaih Mar 2, 2026
48edd44
feat: completed base models page
superwaih Mar 2, 2026
eb0d5c2
chore: implement all review corrections
superwaih Mar 3, 2026
2daca11
Merge pull request #17 from Spatialnode/feat/base-model-contribution
jeafreezy Mar 4, 2026
d8da16f
fix: import alias path changed
superwaih Mar 4, 2026
449f81c
Merge pull request #19 from Spatialnode/feat/base-model-contribution
jeafreezy Mar 4, 2026
a99506f
feat: complete all base model enhancement
superwaih Mar 5, 2026
90fd2d2
Merge pull request #21 from Spatialnode/feat/base-model-contribution
jeafreezy Mar 7, 2026
5cf3d7d
feat: completed ai predictions page
superwaih Mar 18, 2026
ee59d3b
chore: changed heading text
superwaih Mar 18, 2026
ce095d8
fix: replace success modal with toast
superwaih Mar 18, 2026
7f563c2
fix: replace success modal with toast
superwaih Mar 18, 2026
a79ea07
feat: added published predictions table and map view feature
superwaih Mar 22, 2026
d4d6531
feat: updated public predictions page
superwaih Mar 22, 2026
c171ca9
fix: push requested pr changes
superwaih Mar 24, 2026
e5d417a
Merge pull request #25 from Spatialnode/feat/wale-ai-predictions
jeafreezy Mar 24, 2026
49ff6ae
fix: push requested changes
superwaih Mar 24, 2026
8f909b5
chore: renamed dataset navbar
jeafreezy Mar 27, 2026
93df2f4
chore: fixed focus style bug in dropdown menu
jeafreezy Mar 27, 2026
92f75b9
Merge branch 'develop' into feat/ai-predictions
jeafreezy Mar 27, 2026
746a8bb
chore: capitalized navbar/login button
jeafreezy Mar 27, 2026
5237bb9
chore: align styles in navbar for consistency
jeafreezy Mar 27, 2026
cffb01a
chore: capitalized all button texts
jeafreezy Mar 27, 2026
394a7de
fix: fixed mapswipe result downloading instead of showing modal
superwaih Apr 1, 2026
dcca184
fix: mapswipe modal not showing up
superwaih Apr 1, 2026
4601c85
Merge pull request #26 from Spatialnode/feat/wale-ai-predictions
jeafreezy Apr 2, 2026
3002db7
chore: clean ups. renamed published predictions to ai-predictions
jeafreezy Apr 12, 2026
07ac7f2
feat: added model_name to prediction request config|
jeafreezy Apr 12, 2026
7f1d920
Merge branch 'develop' into feat/ai-predictions
jeafreezy Apr 12, 2026
3740164
chore: fixed type mismatch
jeafreezy Apr 12, 2026
45a39a2
chore: fallback model_name to model_name in config object
jeafreezy Apr 12, 2026
0835630
build: add a simple helm chart for backend deployment only + publish …
spwoodcock Mar 20, 2026
2d6c1e9
build: replace custom helm chart build justfile with reusable
spwoodcock Apr 20, 2026
912b16b
Merge pull request #496 from Spatialnode/feat/ai-predictions
kshitijrajsharma May 5, 2026
d3309f4
Merge pull request #495 from hotosm/build/helm
kshitijrajsharma May 5, 2026
f44ac63
Merge branch 'develop' into feat/base-models
jeafreezy May 10, 2026
9fb7b45
feat: stacified base models
jeafreezy May 10, 2026
e1a68b0
fix(auth): fix auth issues in development environment
jeafreezy May 11, 2026
3cecddd
chore (auth): fixed for mobile:
jeafreezy May 11, 2026
60e0ad9
Merge branch 'feat/base-models' of https://github.com/Spatialnode/fAI…
superwaih May 19, 2026
f3e4da3
completed ui conversion
superwaih May 19, 2026
bd3d60e
completed ui conversion
superwaih May 19, 2026
49586f4
added grid to try fair map
superwaih May 20, 2026
5c99867
updated navbar links
superwaih May 21, 2026
dd7c049
fix: stop grid from moving around
superwaih May 21, 2026
a5ba570
updated draggable grid
superwaih May 24, 2026
d80730d
updated draggable grid
superwaih May 24, 2026
aab165c
chore: set config and update chlorpleth colors
superwaih May 24, 2026
4ba4147
chore: set config and update chlorpleth colors
superwaih May 24, 2026
9d5e313
chore: set config and update chlorpleth colors
superwaih May 24, 2026
2ded335
feat: disabled buttons when prediction is running
superwaih May 25, 2026
624350f
feat: implemented video feedback corrections
superwaih May 25, 2026
2df7c5a
updated default resolution
superwaih May 25, 2026
9f75b8e
updated default resolution
superwaih May 25, 2026
6eaf9ec
removed banner in try fair page
superwaih May 25, 2026
38b44cc
removed banner in try fair page
superwaih May 25, 2026
2db8e24
feat: implement corrections
superwaih May 26, 2026
db73688
feat: implement corrections
superwaih May 26, 2026
8ced984
feat: implement corrections
superwaih May 26, 2026
4503e3a
feat: implement corrections
superwaih May 28, 2026
e702b85
feat: implement corrections
superwaih May 28, 2026
af828e2
feat: implement new layer actions
superwaih May 28, 2026
e790f65
feat: implement new layer actions
superwaih May 28, 2026
1fc6a9a
fix: fix layer control icon on mobile
superwaih May 28, 2026
2e0a52b
fix: fix chloropleth label not showing inside grid
superwaih May 28, 2026
7684b4d
chore: update navbar and map click count
superwaih May 28, 2026
fbe9ce0
fix: fix tile math
superwaih May 28, 2026
7a10453
feat: update active colors
superwaih May 29, 2026
690cc76
feat: update active colors
superwaih May 29, 2026
3f57898
feat: added site tour and download
superwaih May 29, 2026
640bdb3
feat: added site tour and download
superwaih May 29, 2026
5ed49f3
chore: type usestates
superwaih May 30, 2026
fa410b1
chore: type usestates
superwaih May 30, 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
24 changes: 24 additions & 0 deletions .github/workflows/release_chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Release Chart

on:
# Push includes PR merge
push:
branches:
- develop
paths:
# Workflow is triggered only if chart dir changes
- chart/**
# Allow manual trigger
workflow_dispatch:

permissions:
contents: read
packages: write

jobs:
publish:
uses: hotosm/gh-workflows/.github/workflows/just.yml@3.3.2
with:
environment: "test"
command: "chart publish"
secrets: inherit
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -62,3 +62,6 @@ fAIr-utilities
data

fair-app-data/*

# helm charts
fair-*.tgz
34 changes: 34 additions & 0 deletions Justfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
set dotenv-load

# List available commands
[private]
default:
just help

# List available commands
help:
just --justfile {{justfile()}} --list

# Chart module from https://github.com/hotosm/justfiles
chart *args:
@curl -sS https://raw.githubusercontent.com/hotosm/justfiles/main/chart.just \
-o {{justfile_directory()}}/tasks/chart.just;
@just --justfile {{justfile_directory()}}/tasks/chart.just --set chart_name "fair" {{args}}

# Echo to terminal with blue colour
[no-cd]
_echo-blue text:
#!/usr/bin/env sh
printf "\033[0;34m%s\033[0m\n" "{{ text }}"

# Echo to terminal with yellow colour
[no-cd]
_echo-yellow text:
#!/usr/bin/env sh
printf "\033[0;33m%s\033[0m\n" "{{ text }}"

# Echo to terminal with red colour
[no-cd]
_echo-red text:
#!/usr/bin/env sh
printf "\033[0;41m%s\033[0m\n" "{{ text }}"
9 changes: 9 additions & 0 deletions chart/.helmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
.DS_Store
.git
.gitignore
.idea
*.swp
*.bak
*.tmp
*.orig
*~
6 changes: 6 additions & 0 deletions chart/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
apiVersion: v2
name: fair
description: AI Assisted Mapping Tool
type: application
version: 0.1.0
appVersion: "2.2.19"
48 changes: 48 additions & 0 deletions chart/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# fAIr Helm Chart

Deploys the fAIr backend API and Django-Q async worker.

The frontend is deployed separately (S3 + CloudFront via GitHub Actions).
PostgreSQL is expected to be provided externally (e.g.
[CloudNativePG](https://cloudnative-pg.io/) or a managed database service).

## Quick start

```bash
helm install fair oci://ghcr.io/hotosm/charts/fair
```

## Example values

```yaml
externalDatabase:
host: my-pg-cluster-rw.db.svc
database: ai
username: fair
existingSecret: fair-db-credentials
existingSecretKey: password

ingress:
enabled: true
className: nginx
hosts:
- host: fair.example.com
paths:
- path: /api
pathType: Prefix

backend:
envFrom:
- secretRef:
name: fair-backend-secrets
```

## Key values

| Parameter | Description | Default |
|---|---|---|
| `externalDatabase.host` | PostgreSQL host | `""` |
| `externalDatabase.existingSecret` | Secret containing DB password | `""` |
| `backend.djangoQ.enabled` | Run Django-Q sidecar for async tasks | `true` |
| `backend.migrate.enabled` | Run migrations on install/upgrade | `true` |
| `ingress.enabled` | Create Ingress resource | `false` |
20 changes: 20 additions & 0 deletions chart/templates/NOTES.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
fAIr has been deployed!

Components:
- Backend API: {{ include "fair.backend.fullname" . }}
{{- if .Values.backend.djangoQ.enabled }}
- Django-Q: running as sidecar in backend pod
{{- end }}
- PostgreSQL: external ({{ .Values.externalDatabase.host }})

{{- if .Values.ingress.enabled }}

Access the application at:
{{- range .Values.ingress.hosts }}
http{{ if $.Values.ingress.tls }}s{{ end }}://{{ .host }}
{{- end }}
{{- else }}

To access the backend API, run:
kubectl port-forward svc/{{ include "fair.backend.fullname" . }} 8000:{{ .Values.backend.service.port }}
{{- end }}
90 changes: 90 additions & 0 deletions chart/templates/_helpers.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
{{/*
Expand the name of the chart.
*/}}
{{- define "fair.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
{{- end }}

{{/*
Create a default fully qualified app name.
*/}}
{{- define "fair.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 "fair.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
{{- end }}

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

{{/*
Selector labels
*/}}
{{- define "fair.selectorLabels" -}}
app.kubernetes.io/name: {{ include "fair.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}

{{/*
Create the name of the service account to use
*/}}
{{- define "fair.serviceAccountName" -}}
{{- if .Values.serviceAccount.create }}
{{- default (include "fair.fullname" .) .Values.serviceAccount.name }}
{{- else }}
{{- default "default" .Values.serviceAccount.name }}
{{- end }}
{{- end }}

{{/*
Backend fullname
*/}}
{{- define "fair.backend.fullname" -}}
{{- printf "%s-backend" (include "fair.fullname" .) | trunc 63 | trimSuffix "-" }}
{{- end }}

{{/*
Backend selector labels
*/}}
{{- define "fair.backend.selectorLabels" -}}
{{ include "fair.selectorLabels" . }}
app.kubernetes.io/component: backend
{{- end }}

{{/*
Backend image
*/}}
{{- define "fair.backend.image" -}}
{{- $tag := default .Chart.AppVersion .Values.image.backend.tag -}}
{{- printf "%s:%s" .Values.image.backend.repository $tag }}
{{- end }}

{{/*
DATABASE_URL for Django
*/}}
{{- define "fair.databaseUrl" -}}
postgis://$(DATABASE_USER):$(DATABASE_PASSWORD)@{{ .Values.externalDatabase.host }}:{{ .Values.externalDatabase.port | toString }}/{{ .Values.externalDatabase.database }}
{{- end }}
15 changes: 15 additions & 0 deletions chart/templates/backend/configmap.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ include "fair.backend.fullname" . }}
labels:
{{- include "fair.labels" . | nindent 4 }}
app.kubernetes.io/component: backend
data:
DATABASE_HOST: {{ .Values.externalDatabase.host | quote }}
DATABASE_PORT: {{ .Values.externalDatabase.port | toString | quote }}
DATABASE_NAME: {{ .Values.externalDatabase.database | quote }}
DATABASE_USER: {{ .Values.externalDatabase.username | quote }}
{{- range $key, $value := .Values.backend.env }}
{{ $key }}: {{ $value | quote }}
{{- end }}
126 changes: 126 additions & 0 deletions chart/templates/backend/deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "fair.backend.fullname" . }}
labels:
{{- include "fair.labels" . | nindent 4 }}
app.kubernetes.io/component: backend
spec:
replicas: {{ .Values.backendReplicaCount }}
selector:
matchLabels:
{{- include "fair.backend.selectorLabels" . | nindent 6 }}
template:
metadata:
annotations:
checksum/config: {{ include (print $.Template.BasePath "/backend/configmap.yaml") . | sha256sum }}
{{- with .Values.backend.podAnnotations }}
{{- toYaml . | nindent 8 }}
{{- end }}
labels:
{{- include "fair.backend.selectorLabels" . | nindent 8 }}
spec:
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
serviceAccountName: {{ include "fair.serviceAccountName" . }}
{{- with .Values.backend.podSecurityContext }}
securityContext:
{{- toYaml . | nindent 8 }}
{{- end }}
containers:
- name: api
image: {{ include "fair.backend.image" . }}
imagePullPolicy: {{ .Values.image.backend.pullPolicy }}
{{- with .Values.backend.command }}
command:
{{- toYaml . | nindent 12 }}
{{- end }}
ports:
- name: http
containerPort: {{ .Values.backend.port }}
protocol: TCP
envFrom:
- configMapRef:
name: {{ include "fair.backend.fullname" . }}
{{- with .Values.backend.envFrom }}
{{- toYaml . | nindent 12 }}
{{- end }}
env:
- name: DATABASE_PASSWORD
valueFrom:
secretKeyRef:
{{- if .Values.externalDatabase.existingSecret }}
name: {{ .Values.externalDatabase.existingSecret }}
key: {{ .Values.externalDatabase.existingSecretKey }}
{{- else }}
name: {{ include "fair.backend.fullname" . }}-db
key: password
{{- end }}
- name: DATABASE_URL
value: {{ include "fair.databaseUrl" . | quote }}
{{- with .Values.backend.livenessProbe }}
livenessProbe:
{{- toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.backend.readinessProbe }}
readinessProbe:
{{- toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.backend.resources }}
resources:
{{- toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.backend.securityContext }}
securityContext:
{{- toYaml . | nindent 12 }}
{{- end }}
{{- if .Values.backend.djangoQ.enabled }}
- name: django-q
image: {{ include "fair.backend.image" . }}
imagePullPolicy: {{ .Values.image.backend.pullPolicy }}
command:
- python
- manage.py
- qcluster
envFrom:
- configMapRef:
name: {{ include "fair.backend.fullname" . }}
{{- with .Values.backend.envFrom }}
{{- toYaml . | nindent 12 }}
{{- end }}
env:
- name: DATABASE_PASSWORD
valueFrom:
secretKeyRef:
{{- if .Values.externalDatabase.existingSecret }}
name: {{ .Values.externalDatabase.existingSecret }}
key: {{ .Values.externalDatabase.existingSecretKey }}
{{- else }}
name: {{ include "fair.backend.fullname" . }}-db
key: password
{{- end }}
- name: DATABASE_URL
value: {{ include "fair.databaseUrl" . | quote }}
{{- with .Values.backend.djangoQ.resources }}
resources:
{{- toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.backend.securityContext }}
securityContext:
{{- toYaml . | nindent 12 }}
{{- end }}
{{- end }}
{{- with .Values.backend.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.backend.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.backend.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
Loading
Loading