Big commit

This commit is contained in:
2026-03-02 00:13:34 +01:00
parent d146138fca
commit 6d7465ff18
54 changed files with 5999 additions and 2291 deletions

28
generate-cert.sh Executable file
View File

@@ -0,0 +1,28 @@
#!/usr/bin/env bash
# Generate a self-signed certificate for local development.
# The cert is shared by both ng serve (--ssl-cert/--ssl-key) and the Express API.
set -e
DIR="$(cd "$(dirname "$0")" && pwd)"
CERT_DIR="$DIR/.certs"
if [ -f "$CERT_DIR/localhost.crt" ] && [ -f "$CERT_DIR/localhost.key" ]; then
echo "Certs already exist at $CERT_DIR skipping generation."
echo " Delete .certs/ and re-run to regenerate."
exit 0
fi
mkdir -p "$CERT_DIR"
echo "Generating self-signed certificate..."
openssl req -x509 -nodes -days 3650 \
-newkey rsa:2048 \
-keyout "$CERT_DIR/localhost.key" \
-out "$CERT_DIR/localhost.crt" \
-subj "/CN=localhost" \
-addext "subjectAltName=DNS:localhost,IP:127.0.0.1,IP:0.0.0.0"
echo "Done. Certificate written to:"
echo " $CERT_DIR/localhost.crt"
echo " $CERT_DIR/localhost.key"