diff --git a/Bash-Scripts/sync-static.sh b/Bash-Scripts/sync-static.sh new file mode 100755 index 0000000..02df63d --- /dev/null +++ b/Bash-Scripts/sync-static.sh @@ -0,0 +1,38 @@ +#!/usr/bin/env bash +# Script: sync-static.sh +# Does: Copies compliance/static files from backend/api/static (source of truth) to frontend/public. +# Run this whenever the backend static files change to keep the frontend web build in sync. +# Use: ./sync-static.sh + +set -euo pipefail + +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +ROOT="$(cd "$SCRIPT_DIR/.." && pwd)" + +SRC="$ROOT/backend/api/static" +DST="$ROOT/frontend/public" + +FILES=( + apple-app-site-association + privacy-policy.html + account-deletion.html +) + +for file in "${FILES[@]}"; do + src_path="$SRC/$file" + dst_path="$DST/$file" + + if [[ ! -f "$src_path" ]]; then + echo "WARNING: Source file not found, skipping: $src_path" + continue + fi + + if cmp -s "$src_path" "$dst_path" 2>/dev/null; then + echo "Up to date: $file" + else + cp "$src_path" "$dst_path" + echo "Synced: $file" + fi +done + +echo "Sync complete." diff --git a/README.md b/README.md index 4ee1967..a502674 100644 --- a/README.md +++ b/README.md @@ -74,6 +74,15 @@ Scan the QR code with Expo Go on your phone. The app will automatically connect For detailed instructions, see [INSTRUCTIONS.md](INSTRUCTIONS.md). +## Static file sync + +`backend/api/static/` is the source of truth for compliance and deep-linking files +(`apple-app-site-association`, `privacy-policy.html`, `account-deletion.html`). +The same files are mirrored into `frontend/public/` for the Expo web build. + +Run `Bash-Scripts/sync-static.sh` after editing any file in `backend/api/static/` +to keep the frontend copy in sync. + ## Deployment DB scripts All deployment database script commands and usage are documented in: diff --git a/frontend/public/account-deletion.html b/frontend/public/account-deletion.html index 12e5725..8828e83 100644 --- a/frontend/public/account-deletion.html +++ b/frontend/public/account-deletion.html @@ -237,7 +237,7 @@

How to request deletion

  1. Email us at - mail@elifouts.com with the + mail@elifouts.net with the subject "Account Deletion Request" and include the username and the email address associated with your account.