Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
5ce7309
WIP got async profiles working, kinda. bug to fix, but at least the s…
Sep 12, 2025
fd2b57e
got profiles loaded corrected. still need to clean up message display…
Sep 14, 2025
74fff92
updating DB load to load cluster-based messages. send message works.
Sep 14, 2025
d354e3d
WIP. Got meeting poinr written to db, but not displaying correctly.
Sep 15, 2025
a9d12e6
finally got the meeting point formatted correctly for DB: POINT(long …
Sep 15, 2025
2d81ee5
cleaning up icons
Sep 15, 2025
34ea3c2
added dialog for meeting point description, and can write to db.
Sep 16, 2025
e33d751
got ios app compiled and running on ipad. needs special config.
Sep 18, 2025
4e896f0
finally got the ipad working! along with config change
Sep 18, 2025
c6ed09d
making place-of-worship purple
Sep 23, 2025
a75a178
first draft of backup and restore scripts. does not capture auth data
Oct 7, 2025
88b9a2b
Initial work to build standard docker-based deployment
Oct 14, 2025
8eb8bcf
updating to deploy via docker compose. adding backup script using sup…
Oct 15, 2025
f9c4d51
Database build and data load is working for both docker compose and k8s.
Oct 20, 2025
0486a7b
rebuilding load data as seed.sql for standard init
Oct 20, 2025
ce14c0d
adding simple group management
Nov 21, 2025
2017369
Tweaking Dockerfile based on https://docs.docker.com/reference/docker…
Nov 21, 2025
30e2360
Updating libraries to build and run android
Nov 23, 2025
2593a59
cleaning up macos, replacing env vars with app_config.json
Dec 2, 2025
c8b8386
creating household data with geometry
Dec 11, 2025
f9c5843
db-init now loads household POINT geometry into the db
Dec 12, 2025
f32301d
Adding app_config settings.
Jan 8, 2026
ad2efcb
Lastest tofu tweaks
Jan 10, 2026
a32eb1b
More progress toward deployment
Jan 22, 2026
6fb59be
Continuing to fix deploy config
Jan 26, 2026
19e0a97
minor userdata cleanup
Jan 27, 2026
e8c9332
resetting desired_capacity after figuring out the run script
Jan 27, 2026
94ccc2a
adding pixi tool dir to root path, to help with troubleshooting
Jan 28, 2026
a4ffef5
trying a wait before aws creds accessed
infrared0 Jan 28, 2026
43b4150
checking out branch with changes
infrared0 Jan 28, 2026
717c622
adding ability to delete key alias, removing 5 pm shutdown
infrared0 Jan 28, 2026
6cf9953
Merge branch 'messages' into tofu-esther
infrared0 Jan 28, 2026
ebd2d3f
remove test userdata change, add kms perms to cloud-account opentofu …
infrared0 Jan 28, 2026
b40b66d
fixing KMS config, hopefully
Jan 28, 2026
82f167a
updating sopc.yaml to match new keys
Jan 28, 2026
aea5d89
remove key delete
Jan 28, 2026
5b774eb
Fixing typo
Jan 28, 2026
cc16298
Adding kms:decrypt to supportsphere-laurelhurst-instance-role
Jan 29, 2026
83199e3
updating build/deploy branch for testing
Jan 29, 2026
baa8693
updating flutter versiob to 3.38.4
Jan 29, 2026
d8c0cd3
updating flutter versiob to 3.38.4
Jan 29, 2026
ef62028
updating flutter versiob to 3.38.4
Jan 29, 2026
2fb559b
Checking env for configuration values
Jan 29, 2026
4fe30cc
Updating invalid ENV loading. Tested locally.
Feb 2, 2026
f8699fb
removing redundant logs
Feb 2, 2026
84b6f35
Change place of worship icon type to person-praying
infrared0 Feb 4, 2026
f877434
Merge pull request #268 from UW-THINKlab/infrared0-iconchange-2-4-26
philion Feb 4, 2026
c3c4622
Update icons for point types in CSV file
infrared0 Feb 5, 2026
06e6f5f
Revise categories and update emergency resources
infrared0 Feb 5, 2026
427b492
Cleaning up versions. Fixing captain role problem.
Feb 16, 2026
07eae80
first pass of working backup. only captures data, not users
Feb 16, 2026
ead8246
tweaking backup script, adding pixi hook: 'pixi run backup'
Feb 16, 2026
d062713
Working backup and restore scripts: pixi run db-backup, pixi run db-r…
Feb 17, 2026
49e68f8
Adding minimal docs for backup and restore
Feb 17, 2026
26aa5d7
Update 1_backend_development.md
philion Feb 17, 2026
f62f54e
update strings for bottom tab labels
infrared0 Feb 19, 2026
78b4e16
Adding invite code to profile page
Feb 19, 2026
db96f9a
Updating flutter version to 3.41.2
Feb 20, 2026
e3de841
added account delete button to profile page
Feb 24, 2026
88791df
radio buttons for choosing who resources can be shared with
infrared0 Mar 1, 2026
34a33d3
Merge branch 'main' into resourcesharing-radiobuttons
infrared0 Mar 1, 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
3 changes: 1 addition & 2 deletions .github/workflows/ci_support_sphere_flutter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
uses: subosito/flutter-action@v2
with:
channel: stable
flutter-version: '3.24.5'
flutter-version: '3.41.2'

- run: flutter pub get

Expand All @@ -37,4 +37,3 @@ jobs:
# Run Flutter tests
- name: Run Unit tests
run: flutter test ./test/unit_tests

2 changes: 1 addition & 1 deletion .github/workflows/run-dev-server.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- name: configure aws credentials
uses: aws-actions/configure-aws-credentials@e3dd6a429d7300a6a4c196c26e071d42e0343502
with:
role-to-assume: arn:aws:iam::871683513797:role/supportsphere-laurelhurst-github-scaling-role
role-to-assume: arn:aws:iam::503561456208:role/supportsphere-laurelhurst-github-scaling-role
role-session-name: github-workflow-run
aws-region: ${{ env.AWS_REGION }}
- name: Run the server
Expand Down
11 changes: 5 additions & 6 deletions .github/workflows/web-main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ permissions:
on:
push:
branches:
- main
- messages
workflow_dispatch:


jobs:
call-run-server:
uses: UW-THINKlab/resilience/.github/workflows/run-dev-server.yml@main
uses: UW-THINKlab/resilience/.github/workflows/run-dev-server.yml@messages
build-and-publish:
runs-on: ubuntu-latest
# This workflow accesses secrets and checks out a PR, so only run if labelled
Expand All @@ -34,16 +34,15 @@ jobs:
uses: subosito/flutter-action@v2
with:
channel: stable
flutter-version: '3.24.5'
flutter-version: '3.41.2'
- run: flutter pub get
# original values are in deployment/values.cloud.yaml
- run: |
flutter build web \
--release \
--base-href "/resilience/" \
--web-renderer html \
--dart-define=SUPABASE_ANON_KEY=${{ secrets.CLOUD_DB_JWT_ANON_KEY}} \
--dart-define=SUPABASE_URL=${{ secrets.CLOUD_DB_URL}}
--dart-define=SUPABASE_URL=${{ secrets.CLOUD_DB_URL}}

- name: Upload Pages HTML
uses: actions/upload-pages-artifact@v3
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/webpreview.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:

jobs:
call-run-server:
uses: UW-THINKlab/resilience/.github/workflows/run-dev-server.yml@main
uses: UW-THINKlab/resilience/.github/workflows/run-dev-server.yml@messages
add-preview:
runs-on: ubuntu-latest
# This workflow accesses secrets and checks out a PR, so only run if labelled
Expand All @@ -26,10 +26,10 @@ jobs:
uses: subosito/flutter-action@v2
with:
channel: stable
flutter-version: '3.24.5'
flutter-version: '3.41.2'
- run: flutter pub get
# original values are in deployment/values.cloud.yaml
- run: flutter build web --web-renderer html --dart-define=SUPABASE_ANON_KEY=${{ secrets.CLOUD_DB_JWT_ANON_KEY}} --dart-define=SUPABASE_URL=${{ secrets.CLOUD_DB_URL}}
- run: flutter build web --dart-define=SUPABASE_ANON_KEY=${{ secrets.CLOUD_DB_JWT_ANON_KEY}} --dart-define=SUPABASE_URL=${{ secrets.CLOUD_DB_URL}}

- name: Deploy Website Preview
if: always()
Expand Down
3 changes: 1 addition & 2 deletions .sops.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# configuration file for SOPS/encryption
creation_rules:
- path_regex: values\.cloud\.yaml$
pgp: 'AD28C8D8C60268C5F329509B31FEC69867EB2B81'
kms: 'arn:aws:kms:us-west-2:871683513797:key/9531919a-aae2-4ad9-bd2a-4f30eb8250c3,arn:aws:kms:us-east-1:871683513797:key/0fc8c451-67d6-4b6f-8ad2-d8537d375937'
kms: 'arn:aws:kms:us-west-2:503561456208:key/8f487e8c-d6c5-4ed4-9ace-c5011baead84,arn:aws:kms:us-east-1:503561456208:key/4ce4551c-4b42-4e0a-ac14-961f385c9517'
13 changes: 7 additions & 6 deletions deployment/cloud/aws/account/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@ provider "aws" {

# s3 tf state bucket

resource "aws_s3_bucket" "tf_state" {
data "aws_s3_bucket" "tf_state" {
bucket = "${var.account_resource_prefix}-${var.account_id}-opentofu-state"
}

resource "aws_s3_bucket_versioning" "this" {
bucket = aws_s3_bucket.tf_state.bucket
bucket = data.aws_s3_bucket.tf_state.bucket

versioning_configuration {
status = "Enabled"
Expand All @@ -41,7 +41,7 @@ resource "aws_s3_bucket_versioning" "this" {
}

resource "aws_s3_bucket_public_access_block" "example" {
bucket = aws_s3_bucket.tf_state.bucket
bucket = data.aws_s3_bucket.tf_state.bucket

block_public_acls = true
block_public_policy = true
Expand Down Expand Up @@ -103,8 +103,8 @@ resource "aws_iam_policy" "tf_state_access" {
"s3:ListBucket",
],
Resource = [
"${aws_s3_bucket.tf_state.arn}/*",
aws_s3_bucket.tf_state.arn,
"${data.aws_s3_bucket.tf_state.arn}/*",
data.aws_s3_bucket.tf_state.arn,
],
},
],
Expand All @@ -130,6 +130,7 @@ resource "aws_iam_role_policy" "kms_key_access" {
"kms:UpdateKeyDescription",
"kms:CreateKey",
"kms:CreateAlias",
"kms:UpdateAlias"
],
Resource = "*",
},
Expand Down Expand Up @@ -196,4 +197,4 @@ resource "aws_iam_group_policy_attachment" "readonly" {
resource "aws_iam_group_policy_attachment" "tf_state_access" {
group = aws_iam_group.this.name
policy_arn = aws_iam_policy.tf_state_access.arn
}
}
2 changes: 1 addition & 1 deletion deployment/cloud/aws/account/terraform.tfvars
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ account_resource_prefix = "supportsphere"
account_additional_tags = {
"Project" = "Support Sphere"
}
account_id = "871683513797"
account_id = "503561456208"
ops_group_name = "ssec-eng"
26 changes: 13 additions & 13 deletions deployment/cloud/aws/infrastructure/.terraform.lock.hcl

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion deployment/cloud/aws/infrastructure/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ locals {
provider "aws" {
region = "us-west-2"
assume_role {
role_arn = "arn:aws:iam::871683513797:role/supportsphere-deploy"
role_arn = "arn:aws:iam::${var.account_id}:role/supportsphere-deploy"
session_name = "${local.resource_prefix}-infra-deployment"
external_id = "${local.resource_prefix}-infra-deployment"
}
Expand Down
31 changes: 16 additions & 15 deletions deployment/cloud/aws/infrastructure/modules/server/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,8 @@ resource "aws_iam_role" "instance" {
"ec2:StartInstances",
"ec2:StopInstances",
"ec2:AssociateAddress",
"ec2:DisassociateAddress"
"ec2:DisassociateAddress",
"kms:Decrypt"
],
Resource = "*",
Condition = {
Expand Down Expand Up @@ -189,18 +190,18 @@ resource "aws_autoscaling_group" "this" {
}
}

// Autoscaling action to shutdown the server every weekday at 1AM UTC (6PM PDT/5PM PST)
resource "aws_autoscaling_schedule" "scale_down" {
# only create this resource in non-prod environments
count = var.stage != "prod" ? 1 : 0

scheduled_action_name = "${var.resource_prefix}-asg-shutdown-after-working-hours"
min_size = 0
desired_capacity = 0
max_size = 1
recurrence = "0 1 * * MON-FRI"
autoscaling_group_name = aws_autoscaling_group.this.name
}
//// Autoscaling action to shutdown the server every weekday at 1AM UTC (6PM PDT/5PM PST)
//resource "aws_autoscaling_schedule" "scale_down" {
// # only create this resource in non-prod environments
// count = var.stage != "prod" ? 1 : 0
//
// scheduled_action_name = "${var.resource_prefix}-asg-shutdown-after-working-hours"
// min_size = 0
// desired_capacity = 0
// max_size = 1
// recurrence = "0 1 * * MON-FRI"
// autoscaling_group_name = aws_autoscaling_group.this.name
//}

// ALB and target group
resource "aws_lb" "this" {
Expand Down Expand Up @@ -249,6 +250,6 @@ resource "aws_autoscaling_attachment" "this" {
}

resource "aws_acm_certificate" "this" {
domain_name = "laurelhurst.supportsphere.nikiofti.me"
domain_name = "laurelhurst.supportsphere.acmerocket.com"
validation_method = "DNS"
}
}
27 changes: 9 additions & 18 deletions deployment/cloud/aws/infrastructure/modules/server/userdata
Original file line number Diff line number Diff line change
Expand Up @@ -11,33 +11,17 @@ users:
groups: docker

packages:
- git
- curl
- wget
- python-pip
- postgresql-client
- awscli
- ca-certificates
- gnupg-agent
- software-properties-common
- apt-transport-https
- cargo
- libpq-dev
- jq
- docker.io

runcmd:
# docker installation borrowed from https://gist.github.com/vtrifonov-esfiddle/068dd818b5f929709b688c805c507e65
# install docker following the guide: https://docs.docker.com/install/linux/docker-ce/ubuntu/
- echo "Installing Docker"
- curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
- sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
- sudo apt-get -y update
- sudo apt-get -y install docker-ce docker-ce-cli containerd.io
- sudo systemctl enable docker
# install docker-compose following the guide: https://docs.docker.com/compose/install/
- sudo curl -L "https://github.com/docker/compose/releases/download/1.25.4/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
- sudo chmod +x /usr/local/bin/docker-compose

# install pixi
- echo "Installing Pixi"
- export PIXI_HOME=/opt/pixi
Expand All @@ -52,6 +36,13 @@ runcmd:
- cd /opt
- git clone https://github.com/${github_organization}/${github_repo}.git
- cd ${github_repo}
# FIXME current dev branch
- git checkout messages

# tool pathing for root
- echo "export PATH=\$PATH:$PWD/.pixi/envs/backend/bin" >> /root/.bashrc
- echo "export KUBECONFIG=$PWD/.kube/config" >> /root/.bashrc


# install backend tools
- echo "Setting up backend infra"
Expand All @@ -71,4 +62,4 @@ runcmd:
- pixi run -e backend cleanup-decrypted-supabase-cloud-values

# Done! :)
- echo "Done!"
- echo "Done!"
16 changes: 16 additions & 0 deletions deployment/compose/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Supabase Docker

This is a minimal Docker Compose setup for self-hosting Supabase. Follow the steps [here](https://supabase.com/docs/guides/hosting/docker) to get started.


## tl;dr
1. Install [Docker](https://docs.docker.com/engine/install/), or your preferred container manager.
2. Install [Supabase CLI](https://supabase.com/docs/guides/local-development/cli/getting-started).
3. `supabase start` to start supabase.
4. `pixi run db-init` to load the database.


## Local Development


## Cloud Deployment
48 changes: 48 additions & 0 deletions deployment/compose/dev/data.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
create table profiles (
id uuid references auth.users not null,
updated_at timestamp with time zone,
username text unique,
avatar_url text,
website text,

primary key (id),
unique(username),
constraint username_length check (char_length(username) >= 3)
);

alter table profiles enable row level security;

create policy "Public profiles are viewable by the owner."
on profiles for select
using ( auth.uid() = id );

create policy "Users can insert their own profile."
on profiles for insert
with check ( auth.uid() = id );

create policy "Users can update own profile."
on profiles for update
using ( auth.uid() = id );

-- Set up Realtime
begin;
drop publication if exists supabase_realtime;
create publication supabase_realtime;
commit;
alter publication supabase_realtime add table profiles;

-- Set up Storage
insert into storage.buckets (id, name)
values ('avatars', 'avatars');

create policy "Avatar images are publicly accessible."
on storage.objects for select
using ( bucket_id = 'avatars' );

create policy "Anyone can upload an avatar."
on storage.objects for insert
with check ( bucket_id = 'avatars' );

create policy "Anyone can update an avatar."
on storage.objects for update
with check ( bucket_id = 'avatars' );
34 changes: 34 additions & 0 deletions deployment/compose/dev/docker-compose.dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
version: "3.8"

services:
studio:
build:
context: ..
dockerfile: apps/studio/Dockerfile
target: dev
ports:
- 8082:8082
mail:
container_name: supabase-mail
image: inbucket/inbucket:3.0.3
ports:
- '2500:2500' # SMTP
- '9000:9000' # web interface
- '1100:1100' # POP3
auth:
environment:
- GOTRUE_SMTP_USER=
- GOTRUE_SMTP_PASS=
meta:
ports:
- 5555:8080
db:
restart: 'no'
volumes:
# Always use a fresh database when developing
- /var/lib/postgresql/data
# Seed data should be inserted last (alphabetical order)
- ./dev/data.sql:/docker-entrypoint-initdb.d/seed.sql
storage:
volumes:
- /var/lib/storage
Loading
Loading