Backend (Fastify + TS): FluentForms webhook -> NocoDB row + QR + MailerSend email; PIN auth; scan/lookup/redeem with per-code serialization; reusable QR codes with count-based check-in; admin search. App (Expo, one codebase): Android APK + iPhone PWA. Login, camera scanner (native + web barcode-detector split), green/red overlay with sound + haptics, admin lookup/redeem. Session token persisted per device. Ops: multi-stage Dockerfile serving API + PWA same-origin, compose bound to 127.0.0.1; Forgejo Actions runner + tag-triggered signed APK build for Obtainium. Docs in README.md and INSTALL.md. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
38 lines
1.5 KiB
Bash
38 lines
1.5 KiB
Bash
#!/usr/bin/env bash
|
|
# Generate a release signing keystore for the Android APK (run ONCE), then print
|
|
# the base64 + values to paste into Forgejo repo secrets. Keep the keystore file
|
|
# safe and constant forever — losing it or changing it breaks Obtainium updates
|
|
# (a differently-signed APK will not install over the old one).
|
|
set -euo pipefail
|
|
|
|
KEYSTORE="${1:-campscan-release.keystore}"
|
|
ALIAS="${2:-campscan}"
|
|
|
|
if [ -f "$KEYSTORE" ]; then
|
|
echo "Refusing to overwrite existing $KEYSTORE" >&2
|
|
exit 1
|
|
fi
|
|
|
|
read -r -s -p "Choose a keystore password: " STOREPASS; echo
|
|
read -r -s -p "Confirm keystore password: " STOREPASS2; echo
|
|
[ "$STOREPASS" = "$STOREPASS2" ] || { echo "Passwords do not match" >&2; exit 1; }
|
|
|
|
keytool -genkeypair -v \
|
|
-keystore "$KEYSTORE" \
|
|
-alias "$ALIAS" \
|
|
-keyalg RSA -keysize 2048 -validity 10000 \
|
|
-storepass "$STOREPASS" -keypass "$STOREPASS" \
|
|
-dname "CN=Beartaria Campgrounds, OU=Gate, O=Beartaria, L=, ST=, C=US"
|
|
|
|
echo
|
|
echo "==================== Forgejo repo secrets ===================="
|
|
echo "Set these under: git.mowden.top -> CampgroundTickets -> Settings -> Actions -> Secrets"
|
|
echo
|
|
echo "ANDROID_KEY_ALIAS = $ALIAS"
|
|
echo "ANDROID_KEYSTORE_PASSWORD = (the password you just entered)"
|
|
echo "ANDROID_KEY_PASSWORD = (the same password)"
|
|
echo "ANDROID_KEYSTORE_B64 = (paste the block below, single line)"
|
|
echo
|
|
base64 -w0 "$KEYSTORE"; echo
|
|
echo "============================================================="
|
|
echo "Store $KEYSTORE somewhere safe and OFF this repo (it is git-ignored)."
|