Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
38 changes: 38 additions & 0 deletions Bash-Scripts/sync-static.sh
Original file line number Diff line number Diff line change
@@ -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
Copy link

Copilot AI Mar 7, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The header comment says Use: ./sync-static.sh, but the script lives under Bash-Scripts/ and the README calls it as Bash-Scripts/sync-static.sh. Update the usage line (or mention both repo-root and in-directory invocation) to avoid incorrect copy/paste.

Suggested change
# Use: ./sync-static.sh
# Use: Bash-Scripts/sync-static.sh (from repo root), or ./sync-static.sh (from this directory)

Copilot uses AI. Check for mistakes.

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."
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Comment on lines +79 to +81
Copy link

Copilot AI Mar 7, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This section claims backend/api/static/ is the single source of truth for deep-linking/compliance files, but assetlinks.json is also duplicated (served by the backend at /.well-known/assetlinks.json and present in frontend/public/.well-known/assetlinks.json). Either include it in the “source of truth” list + sync process, or explicitly document why it’s excluded.

Copilot uses AI. Check for mistakes.

Run `Bash-Scripts/sync-static.sh` after editing any file in `backend/api/static/`
to keep the frontend copy in sync.
Comment on lines +83 to +84
Copy link

Copilot AI Mar 7, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The README now instructs running Bash-Scripts/sync-static.sh, but earlier sections still reference ./run-front.sh, ./run-dev.sh, etc. (which actually live under Bash-Scripts/). This mixed guidance is likely to confuse contributors; consider standardizing the invocation style across the README (or add a short note explaining the expected working directory).

Copilot uses AI. Check for mistakes.

## Deployment DB scripts

All deployment database script commands and usage are documented in:
Expand Down
2 changes: 1 addition & 1 deletion frontend/public/account-deletion.html
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ <h2>How to request deletion</h2>
<ol>
<li>
Email us at
<a href="mailto:mail@elifouts.com">mail@elifouts.com</a> with the
<a href="mailto:mail@elifouts.net">mail@elifouts.net</a> with the
subject "Account Deletion Request" and include the username and the
Comment on lines 239 to 241
Copy link

Copilot AI Mar 7, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This page now uses mail@elifouts.net in the “How to request deletion” section, but there are still other mail@elifouts.com mailto links later in the same document (e.g., the footer contact + “Request account deletion” button). This leaves the page with inconsistent contact info; update the remaining occurrences (ideally in backend/api/static/account-deletion.html as the source of truth) and then re-sync to the frontend copy.

Copilot uses AI. Check for mistakes.
email address associated with your account.
</li>
Expand Down