chore: tidy root files + reorganize a few stale docs

Root file cleanup:
- mac-mini-setup.sh → scripts/mac-mini/bootstrap.sh  (first-time bootstrap
  belongs next to the other mac-mini setup-* scripts)
- test-chat-auth.sh → scripts/test-chat-auth.sh  (ad-hoc smoke test, no
  reason to live in the repo root)
- cloudflared-config.yml stays in root on purpose — it's the single source
  of truth read by scripts/mac-mini/setup-*.sh and scripts/check-status.sh.

Docs:
- docs/POSTMORTEM_2026-04-07.md → docs/postmortems/2026-04-07-memoro-deploy-prod-wipe.md
  (creates the postmortems/ home for future entries; descriptive name)
- docs/future/MAIL_SERVER_MAC_MINI_TEMP.md deleted — what it described
  ("Bereit zur Umsetzung", Stalwart on Mac Mini) is what's actually
  running today, documented in docs/MAIL_SERVER.md. The DEDICATED variant
  in docs/future/ remains since it's still a real future plan.

Root CLAUDE.md fix:
- @mana/local-store description was wrong — claimed it was legacy/standalone
  only, but it's still used by apps/mana/apps/web itself, plus manavoxel,
  arcade, and three shared packages.

Not touched (flagged for follow-up):
- NewAppIdeas/ (344K of "Roblox Reimagined" planning notes in repo root) —
  user decision: archive externally or move under docs/future/
- Doc giants (PROJECT_OVERVIEW 41k, MATRIX_BOT_ARCHITECTURE 36k, etc.) —
  splitting them is its own refactor
- Service CLAUDE.md staleness audit across 18 services — too broad for
  this pass
This commit is contained in:
Till JS 2026-04-08 12:15:27 +02:00
parent c8ed58b7d1
commit 5581295b12
5 changed files with 1 additions and 557 deletions

View file

@ -0,0 +1,39 @@
#!/bin/bash
# Mac Mini Server Setup Script
# Kopiere diese Datei auf den Mac Mini und führe aus:
# chmod +x mac-mini-setup.sh && ./mac-mini-setup.sh
echo "=== Mac Mini Server Setup ==="
echo ""
# 1. Cloudflare Tunnel installieren
echo "📦 Installiere cloudflared..."
brew install cloudflared
# 2. Git installieren (falls nicht vorhanden)
echo "📦 Installiere git..."
brew install git
# 3. Verzeichnis erstellen
echo "📁 Erstelle Projekt-Verzeichnis..."
mkdir -p ~/projects
cd ~/projects
# 4. Repository klonen
echo "📥 Klone Repository..."
git clone https://github.com/Memo-2023/mana-monorepo.git
cd mana-monorepo
echo ""
echo "✅ Basis-Setup abgeschlossen!"
echo ""
echo "=== NÄCHSTE SCHRITTE (manuell) ==="
echo ""
echo "1. Cloudflare Tunnel authentifizieren:"
echo " cloudflared tunnel login"
echo ""
echo "2. Tunnel erstellen:"
echo " cloudflared tunnel create mana-server"
echo ""
echo "3. Dann melde dich bei Till/Claude für die nächsten Schritte!"
echo ""

64
scripts/test-chat-auth.sh Executable file
View file

@ -0,0 +1,64 @@
#!/bin/bash
# Test script for chat backend + mana-auth integration
echo "========================================="
echo "Testing Chat Backend + Mana Core Auth"
echo "========================================="
echo ""
# 1. Register a test user (or use existing)
echo "1. Registering test user..."
REGISTER_RESPONSE=$(curl -s -X POST http://localhost:3001/api/v1/auth/register \
-H "Content-Type: application/json" \
-d '{
"email": "test-chat@example.com",
"password": "TestPassword123!",
"name": "Chat Test User"
}')
echo "Register response: $REGISTER_RESPONSE"
echo ""
# 2. Login to get token
echo "2. Logging in..."
LOGIN_RESPONSE=$(curl -s -X POST http://localhost:3001/api/v1/auth/login \
-H "Content-Type: application/json" \
-d '{
"email": "test-chat@example.com",
"password": "TestPassword123!"
}')
# Extract token (assuming JSON response with accessToken field)
TOKEN=$(echo $LOGIN_RESPONSE | grep -o '"accessToken":"[^"]*' | cut -d'"' -f4)
if [ -z "$TOKEN" ]; then
echo "❌ Failed to get token!"
echo "Login response: $LOGIN_RESPONSE"
exit 1
fi
echo "✅ Got token: ${TOKEN:0:50}..."
echo ""
# 3. Test protected chat endpoint
echo "3. Testing protected chat endpoint..."
CHAT_RESPONSE=$(curl -s -X GET http://localhost:3002/api/conversations \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json")
echo "Chat response: $CHAT_RESPONSE"
echo ""
# 4. Validate token
echo "4. Validating token..."
VALIDATE_RESPONSE=$(curl -s -X POST http://localhost:3001/api/v1/auth/validate \
-H "Content-Type: application/json" \
-d "{\"token\": \"$TOKEN\"}")
echo "Validate response: $VALIDATE_RESPONSE"
echo ""
echo "========================================="
echo "✅ Test complete!"
echo "========================================="