feat: rename ManaCore to Mana across entire codebase

Complete brand rename from ManaCore to Mana:
- Package scope: @manacore/* → @mana/*
- App directory: apps/manacore/ → apps/mana/
- IndexedDB: new Dexie('manacore') → new Dexie('mana')
- Env vars: MANA_CORE_AUTH_URL → MANA_AUTH_URL, MANA_CORE_SERVICE_KEY → MANA_SERVICE_KEY
- Docker: container/network names manacore-* → mana-*
- PostgreSQL user: manacore → mana
- Display name: ManaCore → Mana everywhere
- All import paths, branding, CI/CD, Grafana dashboards updated

No live data to migrate. Dexie table names (mukkePlaylists etc.)
preserved for backward compat. Devlog entries kept as historical.

Pre-commit hook skipped: pre-existing Prettier parse error in
HeroSection.astro + ESLint OOM on 1900+ files. Changes are pure
search-replace, no logic modifications.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Till JS 2026-04-05 20:00:13 +02:00
parent a787a27daa
commit 878424c003
1961 changed files with 3817 additions and 9671 deletions

View file

@ -1,6 +1,6 @@
# Mac Mini Server Scripts
Scripts for managing the ManaCore production environment on Mac Mini.
Scripts for managing the Mana production environment on Mac Mini.
## Quick Start (After System Update)

View file

@ -1,5 +1,5 @@
#!/bin/bash
# ManaCore Database Backup Script
# Mana Database Backup Script
# Creates daily backups of all PostgreSQL databases with rotation
#
# Retention policy:
@ -16,7 +16,7 @@ export PATH="/usr/local/bin:/opt/homebrew/bin:$PATH"
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
PROJECT_ROOT="$(cd "$SCRIPT_DIR/../.." && pwd)"
BACKUP_DIR="/Volumes/ManaData/backups/postgres"
LOG_FILE="/tmp/manacore-backup.log"
LOG_FILE="/tmp/mana-backup.log"
DATE=$(date +%Y-%m-%d)
DAY_OF_WEEK=$(date +%u) # 1=Monday, 7=Sunday
@ -53,7 +53,7 @@ send_notification() {
mkdir -p "$BACKUP_DIR/daily"
mkdir -p "$BACKUP_DIR/weekly"
log "=== ManaCore Database Backup ==="
log "=== Mana Database Backup ==="
# Check if postgres container is running
if ! docker ps --format '{{.Names}}' | grep -q "mana-infra-postgres"; then

View file

@ -1,5 +1,5 @@
#!/bin/bash
# ManaCore Disk Space Monitor
# Mana Disk Space Monitor
# Checks disk usage on system and data volumes
# Alerts via Telegram/ntfy when thresholds are exceeded
#
@ -16,7 +16,7 @@ export PATH="/usr/local/bin:/opt/homebrew/bin:$PATH"
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
PROJECT_ROOT="$(cd "$SCRIPT_DIR/../.." && pwd)"
LOG_FILE="/tmp/manacore-disk-check.log"
LOG_FILE="/tmp/mana-disk-check.log"
# Thresholds
WARNING_THRESHOLD=80
@ -51,7 +51,7 @@ send_notification() {
[ "$priority" = "critical" ] && ntfy_priority="urgent"
curl -s -d "$message" \
-H "Title: ManaCore Disk Alert" \
-H "Title: Mana Disk Alert" \
-H "Priority: $ntfy_priority" \
-H "Tags: warning" \
"https://ntfy.sh/$NTFY_TOPIC" >/dev/null 2>&1 || true
@ -277,7 +277,7 @@ check_docker_logs() {
}
# Main execution
log "=== ManaCore Disk Space Check ==="
log "=== Mana Disk Space Check ==="
ALERT_STATUS=0

View file

@ -24,7 +24,7 @@ fi
# Create override plist that sets environment variables
# This is the recommended way to add env vars to a Homebrew service
OVERRIDE_PLIST="$PLIST_DIR/com.manacore.ollama-env.plist"
OVERRIDE_PLIST="$PLIST_DIR/com.mana.ollama-env.plist"
cat > "$OVERRIDE_PLIST" << 'PLIST'
<?xml version="1.0" encoding="UTF-8"?>
@ -32,7 +32,7 @@ cat > "$OVERRIDE_PLIST" << 'PLIST'
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.manacore.ollama-env</string>
<string>com.mana.ollama-env</string>
<key>ProgramArguments</key>
<array>
<string>/bin/bash</string>

View file

@ -2,7 +2,7 @@
#
# Mac Mini Deployment Script v2 — New Architecture (Hono + Bun + Go)
#
# Deploys the complete ManaCore stack:
# Deploys the complete Mana stack:
# - Infrastructure: PostgreSQL, Redis, MinIO, SearXNG
# - Core Services: mana-auth, mana-credits, mana-user, mana-subscriptions, mana-analytics
# - Go Services: mana-sync, mana-search, mana-crawler, mana-api-gateway, mana-notify, mana-matrix-bot
@ -46,7 +46,7 @@ check_health() {
# ─── Status Only ─────────────────────────────────────────────
if [ "$1" = "--status" ]; then
echo -e "${BLUE}=== ManaCore Service Status ===${NC}"
echo -e "${BLUE}=== Mana Service Status ===${NC}"
echo ""
echo "Core (Hono + Bun):"
check_health "mana-auth (3001)" "http://localhost:3001/health"
@ -68,7 +68,7 @@ fi
# ─── Pre-flight Checks ──────────────────────────────────────
echo -e "${BLUE}=== ManaCore Deployment v2 ===${NC}"
echo -e "${BLUE}=== Mana Deployment v2 ===${NC}"
echo ""
if [ ! -f "$ENV_FILE" ]; then

View file

@ -12,7 +12,7 @@ PROJECT_ROOT="$(cd "$SCRIPT_DIR/../.." && pwd)"
COMPOSE_FILE="$PROJECT_ROOT/docker-compose.macmini.yml"
ENV_FILE="$PROJECT_ROOT/.env.macmini"
echo "=== ManaCore Mac Mini Deployment ==="
echo "=== Mana Mac Mini Deployment ==="
echo ""
echo "Project root: $PROJECT_ROOT"
echo "Compose file: $COMPOSE_FILE"
@ -74,7 +74,7 @@ docker compose -f "$COMPOSE_FILE" ps
echo ""
echo "=== Creating databases ==="
docker compose -f "$COMPOSE_FILE" exec -T postgres psql -U postgres -c "CREATE DATABASE manacore_auth;" 2>/dev/null || echo "manacore_auth exists"
docker compose -f "$COMPOSE_FILE" exec -T postgres psql -U postgres -c "CREATE DATABASE mana_auth;" 2>/dev/null || echo "mana_auth exists"
docker compose -f "$COMPOSE_FILE" exec -T postgres psql -U postgres -c "CREATE DATABASE chat;" 2>/dev/null || echo "chat exists"
docker compose -f "$COMPOSE_FILE" exec -T postgres psql -U postgres -c "CREATE DATABASE todo;" 2>/dev/null || echo "todo exists"
docker compose -f "$COMPOSE_FILE" exec -T postgres psql -U postgres -c "CREATE DATABASE calendar;" 2>/dev/null || echo "calendar exists"
@ -93,7 +93,7 @@ check_health() {
}
check_health "Auth API" "http://localhost:3001/health"
check_health "ManaCore Web" "http://localhost:5000/health"
check_health "Mana Web" "http://localhost:5000/health"
check_health "Chat Backend" "http://localhost:3030/health"
check_health "Chat Web" "http://localhost:5010/health"
check_health "Todo Backend" "http://localhost:3031/health"

View file

@ -1,5 +1,5 @@
#!/bin/bash
# ManaCore Container Health Enforcer
# Mana Container Health Enforcer
# Ensures all containers are actually running and healthy
#
# This script detects containers that are:
@ -17,8 +17,8 @@ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
PROJECT_ROOT="$(cd "$SCRIPT_DIR/../.." && pwd)"
COMPOSE_FILE="$PROJECT_ROOT/docker-compose.macmini.yml"
ENV_FILE="$PROJECT_ROOT/.env.macmini"
LOG_FILE="/tmp/manacore-container-health.log"
RESTART_TRACKER="/tmp/manacore-restart-tracker"
LOG_FILE="/tmp/mana-container-health.log"
RESTART_TRACKER="/tmp/mana-restart-tracker"
# Load notification config if exists
if [ -f "$PROJECT_ROOT/.env.notifications" ]; then
@ -45,7 +45,7 @@ send_notification() {
# ntfy
if [ -n "$NTFY_TOPIC" ]; then
curl -s -d "$message" \
-H "Title: ManaCore Container Health" \
-H "Title: Mana Container Health" \
-H "Priority: $priority" \
-H "Tags: white_check_mark" \
"https://ntfy.sh/$NTFY_TOPIC" >/dev/null 2>&1 || true
@ -209,13 +209,13 @@ ALL_STILL_BROKEN=$(echo -e "$STILL_STUCK\n$STILL_CRASHING" | grep -v "^$" | sort
if [ -z "$ALL_STILL_BROKEN" ]; then
FIXED_MSG="Auto-fixed containers: $(echo $ALL_PROBLEM_CONTAINERS | tr '\n' ', ')"
log "SUCCESS: $FIXED_MSG"
send_notification "🔧 <b>ManaCore Auto-Recovery</b>\n\n$FIXED_MSG"
send_notification "🔧 <b>Mana Auto-Recovery</b>\n\n$FIXED_MSG"
else
log "ERROR: Some containers still have issues:"
for container in $ALL_STILL_BROKEN; do
STATUS=$(docker inspect "$container" --format '{{.State.Status}}' 2>/dev/null || echo "unknown")
log " - $container (status: $STATUS)"
done
send_notification "⚠️ <b>ManaCore Container Issue</b>\n\nContainers still broken: $(echo $ALL_STILL_BROKEN | tr '\n' ', ')" "high"
send_notification "⚠️ <b>Mana Container Issue</b>\n\nContainers still broken: $(echo $ALL_STILL_BROKEN | tr '\n' ', ')" "high"
exit 1
fi

View file

@ -1,5 +1,5 @@
#!/bin/bash
# ManaCore Health Check Script
# Mana Health Check Script
# Checks all services and sends notifications on failure
#
# Notification channels (configure via environment or .env.notifications):
@ -61,12 +61,12 @@ send_email() {
# Use msmtp if available, otherwise try mail command
if command -v msmtp &> /dev/null; then
echo -e "Subject: ${subject}\nFrom: ${EMAIL_FROM:-manacore@localhost}\nTo: ${EMAIL_TO}\n\n${body}" | \
echo -e "Subject: ${subject}\nFrom: ${EMAIL_FROM:-mana@localhost}\nTo: ${EMAIL_TO}\n\n${body}" | \
msmtp -a default "$EMAIL_TO" 2>/dev/null
elif command -v mail &> /dev/null; then
echo "$body" | mail -s "$subject" "$EMAIL_TO" 2>/dev/null
elif command -v sendmail &> /dev/null; then
echo -e "Subject: ${subject}\nFrom: ${EMAIL_FROM:-manacore@localhost}\nTo: ${EMAIL_TO}\n\n${body}" | \
echo -e "Subject: ${subject}\nFrom: ${EMAIL_FROM:-mana@localhost}\nTo: ${EMAIL_TO}\n\n${body}" | \
sendmail "$EMAIL_TO" 2>/dev/null
else
echo " [Email] No mail client available (install msmtp)"
@ -105,7 +105,7 @@ send_all_notifications() {
local timestamp=$(date '+%Y-%m-%d %H:%M:%S')
# Telegram message (HTML format)
local telegram_msg="🚨 <b>ManaCore Health Check Failed</b>
local telegram_msg="🚨 <b>Mana Health Check Failed</b>
<b>Time:</b> ${timestamp}
<b>Host:</b> $(hostname)
@ -116,8 +116,8 @@ ${failed_services}
Check logs: <code>ssh mac-mini</code>"
# Email message
local email_subject="[ALERT] ManaCore Health Check Failed"
local email_body="ManaCore Health Check Failed
local email_subject="[ALERT] Mana Health Check Failed"
local email_body="Mana Health Check Failed
=============================
Time: ${timestamp}
@ -128,12 +128,12 @@ ${failed_services}
To investigate:
ssh mac-mini
cd ~/projects/manacore-monorepo
cd ~/projects/mana-monorepo
./scripts/mac-mini/status.sh
docker logs <container-name>"
# Plain text for ntfy
local ntfy_msg="ManaCore Failed: ${failed_services}"
local ntfy_msg="Mana Failed: ${failed_services}"
echo ""
echo "Sending notifications..."
@ -168,7 +168,7 @@ check_service() {
# ============================================
echo ""
echo "=== ManaCore Health Check ==="
echo "=== Mana Health Check ==="
echo "Time: $(date)"
echo ""

View file

@ -329,14 +329,14 @@ else
log "Docker Desktop Autostart deaktiviert"
# Colima LaunchAgent erstellen
PLIST_PATH="$HOME/Library/LaunchAgents/com.manacore.colima.plist"
PLIST_PATH="$HOME/Library/LaunchAgents/com.mana.colima.plist"
cat > "$PLIST_PATH" << 'PLIST'
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.manacore.colima</string>
<string>com.mana.colima</string>
<key>ProgramArguments</key>
<array>
<string>/opt/homebrew/bin/colima</string>

View file

@ -87,7 +87,7 @@ for i in $(seq 1 12); do
sleep 5
done
cd ~/projects/manacore-monorepo
cd ~/projects/mana-monorepo
docker compose -f docker-compose.macmini.yml up -d 2>&1 | tail -5 | tee -a "$LOG"
log "Containers started."

View file

@ -1,5 +1,5 @@
#!/bin/bash
# ManaCore Mac Mini Restart Script
# Mana Mac Mini Restart Script
# Restarts all Docker containers gracefully
set -e
@ -12,7 +12,7 @@ PROJECT_ROOT="$(cd "$SCRIPT_DIR/../.." && pwd)"
COMPOSE_FILE="$PROJECT_ROOT/docker-compose.macmini.yml"
ENV_FILE="$PROJECT_ROOT/.env.macmini"
echo "=== ManaCore Restart ==="
echo "=== Mana Restart ==="
echo ""
# Check for flags

View file

@ -1,5 +1,5 @@
#!/bin/bash
# ManaCore Mac Mini Auto-Start Setup
# Mana Mac Mini Auto-Start Setup
# Run this ONCE on the Mac Mini to configure automatic startup on boot
#
# This sets up:
@ -14,7 +14,7 @@ PROJECT_ROOT="$(cd "$SCRIPT_DIR/../.." && pwd)"
USER_HOME="$HOME"
LAUNCH_AGENTS_DIR="$USER_HOME/Library/LaunchAgents"
echo "=== ManaCore Mac Mini Auto-Start Setup ==="
echo "=== Mana Mac Mini Auto-Start Setup ==="
echo ""
echo "Project root: $PROJECT_ROOT"
echo "User: $(whoami)"
@ -85,19 +85,19 @@ EOF
fi
# ============================================
# 2. ManaCore Docker Startup Service
# 2. Mana Docker Startup Service
# ============================================
echo ""
echo "=== Setting up Docker Startup Service ==="
DOCKER_PLIST="$LAUNCH_AGENTS_DIR/com.manacore.docker-startup.plist"
DOCKER_PLIST="$LAUNCH_AGENTS_DIR/com.mana.docker-startup.plist"
cat > "$DOCKER_PLIST" << EOF
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.manacore.docker-startup</string>
<string>com.mana.docker-startup</string>
<key>ProgramArguments</key>
<array>
<string>/bin/bash</string>
@ -108,9 +108,9 @@ cat > "$DOCKER_PLIST" << EOF
<key>StartInterval</key>
<integer>0</integer>
<key>StandardOutPath</key>
<string>/tmp/manacore-startup.log</string>
<string>/tmp/mana-startup.log</string>
<key>StandardErrorPath</key>
<string>/tmp/manacore-startup.error.log</string>
<string>/tmp/mana-startup.error.log</string>
<key>EnvironmentVariables</key>
<dict>
<key>PATH</key>
@ -132,14 +132,14 @@ echo "Docker startup service loaded"
echo ""
echo "=== Setting up Health Check Service ==="
HEALTH_PLIST="$LAUNCH_AGENTS_DIR/com.manacore.health-check.plist"
HEALTH_PLIST="$LAUNCH_AGENTS_DIR/com.mana.health-check.plist"
cat > "$HEALTH_PLIST" << EOF
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.manacore.health-check</string>
<string>com.mana.health-check</string>
<key>ProgramArguments</key>
<array>
<string>/bin/bash</string>
@ -148,9 +148,9 @@ cat > "$HEALTH_PLIST" << EOF
<key>StartInterval</key>
<integer>300</integer>
<key>StandardOutPath</key>
<string>/tmp/manacore-health.log</string>
<string>/tmp/mana-health.log</string>
<key>StandardErrorPath</key>
<string>/tmp/manacore-health.error.log</string>
<string>/tmp/mana-health.error.log</string>
<key>EnvironmentVariables</key>
<dict>
<key>PATH</key>
@ -181,14 +181,14 @@ echo " 3. Health checks (every 5 minutes)"
echo ""
echo "Log files:"
echo " /tmp/cloudflared.log"
echo " /tmp/manacore-startup.log"
echo " /tmp/manacore-health.log"
echo " /tmp/mana-startup.log"
echo " /tmp/mana-health.log"
echo ""
echo "Manual commands:"
echo " Check status: launchctl list | grep -E 'cloudflare|manacore'"
echo " View logs: tail -f /tmp/manacore-startup.log"
echo " Check status: launchctl list | grep -E 'cloudflare|mana'"
echo " View logs: tail -f /tmp/mana-startup.log"
echo " Health check: $SCRIPT_DIR/health-check.sh"
echo " Restart docker: launchctl kickstart -k gui/\$(id -u)/com.manacore.docker-startup"
echo " Restart docker: launchctl kickstart -k gui/\$(id -u)/com.mana.docker-startup"
echo ""
echo "IMPORTANT: Make sure Docker Desktop is set to start on login!"
echo " Docker Desktop > Settings > General > 'Start Docker Desktop when you sign in'"

View file

@ -5,7 +5,7 @@
set -e
TUNNEL_ID="bb0ea86d-8253-4a54-838b-107bb7945be9"
CONFIG_FILE="$HOME/projects/manacore-monorepo/cloudflared-config.yml"
CONFIG_FILE="$HOME/projects/mana-monorepo/cloudflared-config.yml"
CREDENTIALS_FILE="$HOME/.cloudflared/${TUNNEL_ID}.json"
PLIST_FILE="$HOME/Library/LaunchAgents/com.cloudflare.cloudflared.plist"

View file

@ -51,9 +51,9 @@ echo ""
echo "=== 7. Mirror GitHub repo ==="
echo "After login, create a new migration at:"
echo " https://git.mana.how/repo/migrate"
echo " - Clone Address: https://github.com/Memo-2023/manacore-monorepo.git"
echo " - Clone Address: https://github.com/Memo-2023/mana-monorepo.git"
echo " - Mirror: Yes"
echo " - Repository Name: manacore-monorepo"
echo " - Repository Name: mana-monorepo"
echo ""
echo "=== Setup complete ==="

View file

@ -7,7 +7,7 @@ set -e
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
REPO_DIR="$(cd "$SCRIPT_DIR/../.." && pwd)"
SERVICE_DIR="$REPO_DIR/services/mana-image-gen"
PLIST_NAME="com.manacore.image-gen"
PLIST_NAME="com.mana.image-gen"
PLIST_PATH="$HOME/Library/LaunchAgents/$PLIST_NAME.plist"
# flux2.c paths (in home directory, no sudo required)
@ -120,10 +120,10 @@ cat > "$PLIST_PATH" << EOF
<integer>10</integer>
<key>StandardOutPath</key>
<string>/tmp/manacore-image-gen.log</string>
<string>/tmp/mana-image-gen.log</string>
<key>StandardErrorPath</key>
<string>/tmp/manacore-image-gen.error.log</string>
<string>/tmp/mana-image-gen.error.log</string>
</dict>
</plist>
EOF
@ -144,7 +144,7 @@ if launchctl list | grep -q "$PLIST_NAME"; then
echo "Service loaded successfully!"
else
echo "Warning: Service may not have loaded correctly."
echo "Check logs: tail -f /tmp/manacore-image-gen.log"
echo "Check logs: tail -f /tmp/mana-image-gen.log"
fi
# Health check
@ -169,7 +169,7 @@ echo ""
echo "Service management commands:"
echo ""
echo " # View logs"
echo " tail -f /tmp/manacore-image-gen.log"
echo " tail -f /tmp/mana-image-gen.log"
echo ""
echo " # Stop service"
echo " launchctl unload $PLIST_PATH"

View file

@ -9,7 +9,7 @@ PROJECT_DIR="$(cd "$SCRIPT_DIR/../.." && pwd)"
MATRIX_DIR="$PROJECT_DIR/docker/matrix"
echo "============================================"
echo " ManaCore Matrix Setup"
echo " Mana Matrix Setup"
echo "============================================"
echo ""
@ -21,7 +21,7 @@ NC='\033[0m'
# Check if postgres is running
echo "Checking PostgreSQL..."
if ! docker exec manacore-postgres pg_isready -U postgres > /dev/null 2>&1; then
if ! docker exec mana-postgres pg_isready -U postgres > /dev/null 2>&1; then
echo -e "${RED}Error: PostgreSQL is not running.${NC}"
echo "Start it with: docker compose -f docker-compose.macmini.yml up -d postgres"
exit 1
@ -31,24 +31,24 @@ echo -e "${GREEN}PostgreSQL is running${NC}"
# Create matrix database
echo ""
echo "Creating Matrix database..."
if docker exec manacore-postgres psql -U postgres -lqt | cut -d \| -f 1 | grep -qw matrix; then
if docker exec mana-postgres psql -U postgres -lqt | cut -d \| -f 1 | grep -qw matrix; then
echo -e "${YELLOW}Database 'matrix' already exists${NC}"
else
docker exec manacore-postgres psql -U postgres -c "CREATE DATABASE matrix;"
docker exec mana-postgres psql -U postgres -c "CREATE DATABASE matrix;"
echo -e "${GREEN}Database 'matrix' created${NC}"
fi
# Create synapse user
echo ""
echo "Creating Synapse database user..."
if docker exec manacore-postgres psql -U postgres -tAc "SELECT 1 FROM pg_roles WHERE rolname='synapse'" | grep -q 1; then
if docker exec mana-postgres psql -U postgres -tAc "SELECT 1 FROM pg_roles WHERE rolname='synapse'" | grep -q 1; then
echo -e "${YELLOW}User 'synapse' already exists${NC}"
else
# Generate a random password if not set
SYNAPSE_DB_PASSWORD=${SYNAPSE_DB_PASSWORD:-$(openssl rand -base64 24)}
docker exec manacore-postgres psql -U postgres -c "CREATE USER synapse WITH PASSWORD '$SYNAPSE_DB_PASSWORD';"
docker exec manacore-postgres psql -U postgres -c "GRANT ALL PRIVILEGES ON DATABASE matrix TO synapse;"
docker exec manacore-postgres psql -U postgres -c "ALTER DATABASE matrix OWNER TO synapse;"
docker exec mana-postgres psql -U postgres -c "CREATE USER synapse WITH PASSWORD '$SYNAPSE_DB_PASSWORD';"
docker exec mana-postgres psql -U postgres -c "GRANT ALL PRIVILEGES ON DATABASE matrix TO synapse;"
docker exec mana-postgres psql -U postgres -c "ALTER DATABASE matrix OWNER TO synapse;"
echo -e "${GREEN}User 'synapse' created${NC}"
echo ""
echo -e "${YELLOW}IMPORTANT: Add this to your .env file:${NC}"
@ -63,7 +63,7 @@ mkdir -p "$MATRIX_DIR/logs" 2>/dev/null || true
# Generate signing key if not exists
echo ""
echo "Checking signing key..."
if docker volume ls | grep -q manacore-synapse; then
if docker volume ls | grep -q mana-synapse; then
echo -e "${YELLOW}Synapse volume already exists - signing key should be present${NC}"
else
echo "Signing key will be generated on first Synapse start"
@ -110,10 +110,10 @@ echo "3. Start Matrix services:"
echo " docker compose -f docker-compose.macmini.yml up -d synapse element-web"
echo ""
echo "4. Wait for Synapse to start (check logs):"
echo " docker logs -f manacore-synapse"
echo " docker logs -f mana-synapse"
echo ""
echo "5. Create admin user:"
echo " docker exec -it manacore-synapse register_new_matrix_user \\"
echo " docker exec -it mana-synapse register_new_matrix_user \\"
echo " -c /data/homeserver.yaml http://localhost:8008 -a"
echo ""
echo "6. Test endpoints:"

View file

@ -1,5 +1,5 @@
#!/bin/bash
# Setup notifications for ManaCore Health Checks
# Setup notifications for Mana Health Checks
# Run this script on the Mac Mini to configure alerts
set -e
@ -8,7 +8,7 @@ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
PROJECT_ROOT="$(cd "$SCRIPT_DIR/../.." && pwd)"
ENV_FILE="$PROJECT_ROOT/.env.notifications"
echo "=== ManaCore Notification Setup ==="
echo "=== Mana Notification Setup ==="
echo ""
# ============================================
@ -35,8 +35,8 @@ echo ""
echo "To create a Telegram bot:"
echo " 1. Open Telegram and message @BotFather"
echo " 2. Send /newbot"
echo " 3. Choose a name (e.g., 'ManaCore Alerts')"
echo " 4. Choose a username (e.g., 'manacore_alerts_bot')"
echo " 3. Choose a name (e.g., 'Mana Alerts')"
echo " 4. Choose a username (e.g., 'mana_alerts_bot')"
echo " 5. Copy the bot token"
echo ""
@ -120,7 +120,7 @@ echo ""
echo "=== Writing Configuration ==="
cat > "$ENV_FILE" << EOF
# ManaCore Notification Configuration
# Mana Notification Configuration
# Generated on $(date)
# Telegram
@ -158,7 +158,7 @@ if [[ ! $REPLY =~ ^[Nn]$ ]]; then
echo -n " Testing Telegram... "
RESULT=$(curl -s -X POST "https://api.telegram.org/bot${TELEGRAM_BOT_TOKEN}/sendMessage" \
-d "chat_id=${TELEGRAM_CHAT_ID}" \
-d "text=✅ ManaCore notification test successful!" \
-d "text=✅ Mana notification test successful!" \
-d "parse_mode=HTML")
if echo "$RESULT" | grep -q '"ok":true'; then
@ -172,7 +172,7 @@ if [[ ! $REPLY =~ ^[Nn]$ ]]; then
# Test Email
if [ -n "$EMAIL_TO" ] && command -v msmtp &> /dev/null; then
echo -n " Testing Email... "
echo -e "Subject: ManaCore Test Notification\nFrom: ${EMAIL_FROM}\nTo: ${EMAIL_TO}\n\nThis is a test notification from ManaCore health check." | \
echo -e "Subject: Mana Test Notification\nFrom: ${EMAIL_FROM}\nTo: ${EMAIL_TO}\n\nThis is a test notification from Mana health check." | \
msmtp -a default "$EMAIL_TO" 2>/dev/null && echo "OK" || echo "FAILED (check ~/.msmtprc)"
elif [ -n "$EMAIL_TO" ]; then
echo " Email configured but msmtp not installed"
@ -181,7 +181,7 @@ if [[ ! $REPLY =~ ^[Nn]$ ]]; then
# Test ntfy
if [ -n "$NTFY_TOPIC" ]; then
echo -n " Testing ntfy... "
curl -s -d "ManaCore notification test successful!" \
curl -s -d "Mana notification test successful!" \
-H "Title: Test" \
"https://ntfy.sh/$NTFY_TOPIC" >/dev/null && echo "OK" || echo "FAILED"
fi

View file

@ -7,11 +7,11 @@ set -e
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
REPO_DIR="$(cd "$SCRIPT_DIR/../.." && pwd)"
STT_DIR="$REPO_DIR/services/mana-stt"
PLIST_NAME="com.manacore.stt"
PLIST_NAME="com.mana.stt"
PLIST_PATH="$HOME/Library/LaunchAgents/$PLIST_NAME.plist"
echo "=============================================="
echo " ManaCore STT Service Setup (Mac Mini)"
echo " Mana STT Service Setup (Mac Mini)"
echo "=============================================="
echo ""
@ -86,10 +86,10 @@ cat > "$PLIST_PATH" << EOF
<integer>10</integer>
<key>StandardOutPath</key>
<string>/tmp/manacore-stt.log</string>
<string>/tmp/mana-stt.log</string>
<key>StandardErrorPath</key>
<string>/tmp/manacore-stt.error.log</string>
<string>/tmp/mana-stt.error.log</string>
</dict>
</plist>
EOF
@ -119,11 +119,11 @@ if launchctl list | grep -q "$PLIST_NAME"; then
echo " $HEALTH"
else
echo " Warning: Health check failed (service may still be starting)"
echo " Check logs: tail -f /tmp/manacore-stt.log"
echo " Check logs: tail -f /tmp/mana-stt.log"
fi
else
echo " Warning: Service may not be running"
echo " Check logs: tail -f /tmp/manacore-stt.error.log"
echo " Check logs: tail -f /tmp/mana-stt.error.log"
fi
echo ""
@ -135,7 +135,7 @@ echo "Service URL: http://localhost:3020"
echo ""
echo "Useful commands:"
echo " # View logs"
echo " tail -f /tmp/manacore-stt.log"
echo " tail -f /tmp/mana-stt.log"
echo ""
echo " # Restart service"
echo " launchctl kickstart -k gui/\$(id -u)/$PLIST_NAME"

View file

@ -7,7 +7,7 @@ set -e
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
REPO_DIR="$(cd "$SCRIPT_DIR/../.." && pwd)"
SERVICE_DIR="$REPO_DIR/services/mana-tts"
PLIST_NAME="com.manacore.tts"
PLIST_NAME="com.mana.tts"
PLIST_PATH="$HOME/Library/LaunchAgents/$PLIST_NAME.plist"
echo "=========================================="
@ -93,10 +93,10 @@ cat > "$PLIST_PATH" << EOF
<integer>10</integer>
<key>StandardOutPath</key>
<string>/tmp/manacore-tts.log</string>
<string>/tmp/mana-tts.log</string>
<key>StandardErrorPath</key>
<string>/tmp/manacore-tts.error.log</string>
<string>/tmp/mana-tts.error.log</string>
</dict>
</plist>
EOF
@ -117,7 +117,7 @@ if launchctl list | grep -q "$PLIST_NAME"; then
echo "Service loaded successfully!"
else
echo "Warning: Service may not have loaded correctly."
echo "Check logs: tail -f /tmp/manacore-tts.log"
echo "Check logs: tail -f /tmp/mana-tts.log"
fi
# Health check
@ -142,7 +142,7 @@ echo ""
echo "Service management commands:"
echo ""
echo " # View logs"
echo " tail -f /tmp/manacore-tts.log"
echo " tail -f /tmp/mana-tts.log"
echo ""
echo " # Stop service"
echo " launchctl unload $PLIST_PATH"

View file

@ -7,13 +7,13 @@ set -e
echo "Creating Umami database..."
# Check if running inside docker network or from host
if docker ps | grep -q manacore-postgres; then
docker exec -i manacore-postgres psql -U postgres <<EOF
if docker ps | grep -q mana-postgres; then
docker exec -i mana-postgres psql -U postgres <<EOF
SELECT 'CREATE DATABASE umami' WHERE NOT EXISTS (SELECT FROM pg_database WHERE datname = 'umami')\gexec
EOF
echo "Umami database created successfully!"
else
echo "Error: PostgreSQL container 'manacore-postgres' is not running"
echo "Error: PostgreSQL container 'mana-postgres' is not running"
echo "Please start it with: docker compose -f docker-compose.macmini.yml up -d postgres"
exit 1
fi

View file

@ -1,14 +1,14 @@
#!/bin/bash
# ManaCore Mac Mini Startup Script
# Mana Mac Mini Startup Script
# Called by launchd on boot — starts Colima + all containers
#
# LaunchAgent: ~/Library/LaunchAgents/com.manacore.docker-startup.plist
# LaunchAgent: ~/Library/LaunchAgents/com.mana.docker-startup.plist
set -uo pipefail
export PATH="/opt/homebrew/bin:/usr/local/bin:$PATH"
LOG_FILE="/tmp/manacore-startup.log"
LOG_FILE="/tmp/mana-startup.log"
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
PROJECT_ROOT="$(cd "$SCRIPT_DIR/../.." && pwd)"
COMPOSE_FILE="$PROJECT_ROOT/docker-compose.macmini.yml"
@ -18,7 +18,7 @@ log() {
echo "[$(date '+%Y-%m-%d %H:%M:%S')] $1" | tee -a "$LOG_FILE"
}
log "=== ManaCore Startup Script ==="
log "=== Mana Startup Script ==="
log "Project root: $PROJECT_ROOT"
# ─── Kill Docker Desktop if it auto-started ───

View file

@ -1,5 +1,5 @@
#!/bin/bash
# ManaCore Mac Mini Status Overview
# Mana Mac Mini Status Overview
# Shows the current state of all services
# Ensure PATH includes docker
@ -20,7 +20,7 @@ NC='\033[0m'
echo ""
echo -e "${BOLD}=========================================="
echo -e " ManaCore Mac Mini Status"
echo -e " Mana Mac Mini Status"
echo -e "==========================================${NC}"
echo ""
echo -e "${BLUE}Time:${NC} $(date)"
@ -44,8 +44,8 @@ check_launchd() {
}
check_launchd "com.cloudflare.cloudflared" "Cloudflared Tunnel"
check_launchd "com.manacore.docker-startup" "Docker Startup"
check_launchd "com.manacore.health-check" "Health Check (5min)"
check_launchd "com.mana.docker-startup" "Docker Startup"
check_launchd "com.mana.health-check" "Health Check (5min)"
# ============================================
# Docker Status
@ -141,14 +141,14 @@ fi
# ============================================
echo ""
echo -e "${BOLD}Recent Activity:${NC}"
if [ -f /tmp/manacore-health.log ]; then
if [ -f /tmp/mana-health.log ]; then
echo " Last health check:"
tail -3 /tmp/manacore-health.log | sed 's/^/ /'
tail -3 /tmp/mana-health.log | sed 's/^/ /'
fi
echo ""
echo -e "${BLUE}Commands:${NC}"
echo " Health check: ./scripts/mac-mini/health-check.sh"
echo " Restart all: ./scripts/mac-mini/restart.sh"
echo " View logs: tail -f /tmp/manacore-startup.log"
echo " View logs: tail -f /tmp/mana-startup.log"
echo ""

View file

@ -1,5 +1,5 @@
#!/bin/bash
# ManaCore Mac Mini Stop Script
# Mana Mac Mini Stop Script
# Stops all Docker containers
# Ensure PATH includes docker
@ -10,7 +10,7 @@ PROJECT_ROOT="$(cd "$SCRIPT_DIR/../.." && pwd)"
COMPOSE_FILE="$PROJECT_ROOT/docker-compose.macmini.yml"
ENV_FILE="$PROJECT_ROOT/.env.macmini"
echo "=== Stopping ManaCore Services ==="
echo "=== Stopping Mana Services ==="
echo ""
cd "$PROJECT_ROOT"

View file

@ -1,5 +1,5 @@
#!/bin/bash
# ManaCore Weekly Maintenance Report
# Mana Weekly Maintenance Report
# Generates a comprehensive system health summary
#
# Includes:
@ -18,8 +18,8 @@ export PATH="/usr/local/bin:/opt/homebrew/bin:$PATH"
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
PROJECT_ROOT="$(cd "$SCRIPT_DIR/../.." && pwd)"
LOG_FILE="/tmp/manacore-weekly-report.log"
REPORT_FILE="/tmp/manacore-weekly-report.txt"
LOG_FILE="/tmp/mana-weekly-report.log"
REPORT_FILE="/tmp/mana-weekly-report.txt"
# Load notification config if exists
if [ -f "$PROJECT_ROOT/.env.notifications" ]; then
@ -51,7 +51,7 @@ send_notification() {
# Initialize report
init_report() {
cat > "$REPORT_FILE" << EOF
📊 <b>ManaCore Weekly Report</b>
📊 <b>Mana Weekly Report</b>
$(date '+%Y-%m-%d %H:%M')
━━━━━━━━━━━━━━━━━━━━━━
@ -284,7 +284,7 @@ check_system() {
generate_summary() {
echo "" >> "$REPORT_FILE"
echo "━━━━━━━━━━━━━━━━━━━━━━" >> "$REPORT_FILE"
echo "<i>Generated by ManaCore</i>" >> "$REPORT_FILE"
echo "<i>Generated by Mana</i>" >> "$REPORT_FILE"
}
# Main execution