chore: replace all mana-core-auth references with mana-auth

Update docker-compose (dev + macmini), CI/CD workflows, Prometheus,
package.json scripts, env generation, database setup, CODEOWNERS,
and dependabot to reference the new Hono-based mana-auth service.
Delete zombie mana-core-auth directory (already removed from Git).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Till JS 2026-03-28 18:05:31 +01:00
parent e7bcb230be
commit 099a40bbd1
14 changed files with 70 additions and 97 deletions

3
.github/CODEOWNERS vendored
View file

@ -25,8 +25,7 @@ docker/caddy/Caddyfile.production @wuesteon
# ============================================================================= # =============================================================================
# Shared packages and services that affect all apps # Shared packages and services that affect all apps
services/mana-core-auth/ @wuesteon services/mana-auth/ @wuesteon
packages/shared-nestjs-auth/ @wuesteon
packages/shared-auth/ @wuesteon packages/shared-auth/ @wuesteon
# ============================================================================= # =============================================================================

View file

@ -56,7 +56,7 @@ updates:
# Docker updates # Docker updates
- package-ecosystem: "docker" - package-ecosystem: "docker"
directory: "/services/mana-core-auth" directory: "/services/mana-auth"
schedule: schedule:
interval: "weekly" interval: "weekly"
day: "monday" day: "monday"

View file

@ -25,7 +25,7 @@ on:
options: options:
- all - all
- matrix-web - matrix-web
- mana-core-auth - mana-auth
- chat-backend - chat-backend
- chat-web - chat-web
- todo-backend - todo-backend
@ -64,7 +64,7 @@ jobs:
if: github.event_name == 'push' if: github.event_name == 'push'
outputs: outputs:
matrix-web: ${{ steps.changes.outputs.matrix-web }} matrix-web: ${{ steps.changes.outputs.matrix-web }}
mana-core-auth: ${{ steps.changes.outputs.mana-core-auth }} mana-auth: ${{ steps.changes.outputs.mana-auth }}
chat-backend: ${{ steps.changes.outputs.chat-backend }} chat-backend: ${{ steps.changes.outputs.chat-backend }}
chat-web: ${{ steps.changes.outputs.chat-web }} chat-web: ${{ steps.changes.outputs.chat-web }}
todo-backend: ${{ steps.changes.outputs.todo-backend }} todo-backend: ${{ steps.changes.outputs.todo-backend }}
@ -120,7 +120,7 @@ jobs:
echo "" echo ""
check_changes "matrix-web" "apps/matrix/apps/web/" "apps/matrix/packages/" check_changes "matrix-web" "apps/matrix/apps/web/" "apps/matrix/packages/"
check_changes "mana-core-auth" "services/mana-core-auth/" check_changes "mana-auth" "services/mana-auth/"
check_changes "chat-backend" "apps/chat/apps/backend/" "apps/chat/packages/" check_changes "chat-backend" "apps/chat/apps/backend/" "apps/chat/packages/"
check_changes "chat-web" "apps/chat/apps/web/" "apps/chat/packages/" check_changes "chat-web" "apps/chat/apps/web/" "apps/chat/packages/"
check_changes "todo-backend" "apps/todo/apps/backend/" "apps/todo/packages/" check_changes "todo-backend" "apps/todo/apps/backend/" "apps/todo/packages/"
@ -140,7 +140,7 @@ jobs:
# Check if anything needs deploying # Check if anything needs deploying
ANY="false" ANY="false"
for svc in matrix-web mana-core-auth chat-backend chat-web todo-backend todo-web calendar-backend calendar-web clock-web contacts-backend contacts-web mukke-backend mukke-web storage-backend storage-web mana-matrix-bot mana-landing-builder; do for svc in matrix-web mana-auth chat-backend chat-web todo-backend todo-web calendar-backend calendar-web clock-web contacts-backend contacts-web mukke-backend mukke-web storage-backend storage-web mana-matrix-bot mana-landing-builder; do
val=$(grep "^$svc=" $GITHUB_OUTPUT | tail -1 | cut -d= -f2) val=$(grep "^$svc=" $GITHUB_OUTPUT | tail -1 | cut -d= -f2)
if [ "$val" == "true" ]; then if [ "$val" == "true" ]; then
ANY="true" ANY="true"
@ -202,7 +202,7 @@ jobs:
else else
# Build list from detected changes # Build list from detected changes
if [ "${{ needs.detect-changes.outputs.matrix-web }}" == "true" ]; then SERVICES="$SERVICES matrix-web"; fi if [ "${{ needs.detect-changes.outputs.matrix-web }}" == "true" ]; then SERVICES="$SERVICES matrix-web"; fi
if [ "${{ needs.detect-changes.outputs.mana-core-auth }}" == "true" ]; then SERVICES="$SERVICES mana-auth"; fi if [ "${{ needs.detect-changes.outputs.mana-auth }}" == "true" ]; then SERVICES="$SERVICES mana-auth"; fi
if [ "${{ needs.detect-changes.outputs.chat-backend }}" == "true" ]; then SERVICES="$SERVICES chat-backend"; fi if [ "${{ needs.detect-changes.outputs.chat-backend }}" == "true" ]; then SERVICES="$SERVICES chat-backend"; fi
if [ "${{ needs.detect-changes.outputs.chat-web }}" == "true" ]; then SERVICES="$SERVICES chat-web"; fi if [ "${{ needs.detect-changes.outputs.chat-web }}" == "true" ]; then SERVICES="$SERVICES chat-web"; fi
if [ "${{ needs.detect-changes.outputs.todo-backend }}" == "true" ]; then SERVICES="$SERVICES todo-backend"; fi if [ "${{ needs.detect-changes.outputs.todo-backend }}" == "true" ]; then SERVICES="$SERVICES todo-backend"; fi

View file

@ -49,7 +49,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
if: github.event_name == 'push' || github.event_name == 'workflow_dispatch' if: github.event_name == 'push' || github.event_name == 'workflow_dispatch'
outputs: outputs:
mana-core-auth: ${{ steps.changes.outputs.mana-core-auth }} mana-auth: ${{ steps.changes.outputs.mana-auth }}
mana-search: ${{ steps.changes.outputs.mana-search }} mana-search: ${{ steps.changes.outputs.mana-search }}
manacore-web: ${{ steps.changes.outputs.manacore-web }} manacore-web: ${{ steps.changes.outputs.manacore-web }}
chat-backend: ${{ steps.changes.outputs.chat-backend }} chat-backend: ${{ steps.changes.outputs.chat-backend }}
@ -82,7 +82,7 @@ jobs:
# Force build all if workflow_dispatch with force_build_all # Force build all if workflow_dispatch with force_build_all
if [ "${{ github.event_name }}" == "workflow_dispatch" ] && [ "${{ inputs.force_build_all }}" == "true" ]; then if [ "${{ github.event_name }}" == "workflow_dispatch" ] && [ "${{ inputs.force_build_all }}" == "true" ]; then
echo "Force rebuild all services requested" echo "Force rebuild all services requested"
echo "mana-core-auth=true" >> $GITHUB_OUTPUT echo "mana-auth=true" >> $GITHUB_OUTPUT
echo "mana-search=true" >> $GITHUB_OUTPUT echo "mana-search=true" >> $GITHUB_OUTPUT
echo "manacore-web=true" >> $GITHUB_OUTPUT echo "manacore-web=true" >> $GITHUB_OUTPUT
echo "chat-backend=true" >> $GITHUB_OUTPUT echo "chat-backend=true" >> $GITHUB_OUTPUT
@ -119,7 +119,7 @@ jobs:
else else
# workflow_dispatch without force - build all # workflow_dispatch without force - build all
echo "Workflow dispatch without force_build_all - building all" echo "Workflow dispatch without force_build_all - building all"
echo "mana-core-auth=true" >> $GITHUB_OUTPUT echo "mana-auth=true" >> $GITHUB_OUTPUT
echo "mana-search=true" >> $GITHUB_OUTPUT echo "mana-search=true" >> $GITHUB_OUTPUT
echo "manacore-web=true" >> $GITHUB_OUTPUT echo "manacore-web=true" >> $GITHUB_OUTPUT
echo "chat-backend=true" >> $GITHUB_OUTPUT echo "chat-backend=true" >> $GITHUB_OUTPUT
@ -171,12 +171,12 @@ jobs:
echo "Shared UI changed: $SHARED_UI_CHANGED" echo "Shared UI changed: $SHARED_UI_CHANGED"
echo "Shared web changed: $SHARED_WEB_CHANGED" echo "Shared web changed: $SHARED_WEB_CHANGED"
# mana-core-auth: services/mana-core-auth + packages/shared-nestjs-auth # mana-auth: services/mana-auth
AUTH_CHANGED=$(check_pattern "services/mana-core-auth/|packages/shared-nestjs-auth/") AUTH_CHANGED=$(check_pattern "services/mana-auth/")
if [ "$COMMON_CHANGED" == "true" ] || [ "$AUTH_CHANGED" == "true" ]; then if [ "$COMMON_CHANGED" == "true" ] || [ "$AUTH_CHANGED" == "true" ]; then
echo "mana-core-auth=true" >> $GITHUB_OUTPUT echo "mana-auth=true" >> $GITHUB_OUTPUT
else else
echo "mana-core-auth=false" >> $GITHUB_OUTPUT echo "mana-auth=false" >> $GITHUB_OUTPUT
fi fi
# mana-search: services/mana-search # mana-search: services/mana-search
@ -352,7 +352,7 @@ jobs:
echo "" >> $GITHUB_STEP_SUMMARY echo "" >> $GITHUB_STEP_SUMMARY
echo "| Service | Will Build |" >> $GITHUB_STEP_SUMMARY echo "| Service | Will Build |" >> $GITHUB_STEP_SUMMARY
echo "|---------|------------|" >> $GITHUB_STEP_SUMMARY echo "|---------|------------|" >> $GITHUB_STEP_SUMMARY
echo "| mana-core-auth | ${{ steps.changes.outputs.mana-core-auth }} |" >> $GITHUB_STEP_SUMMARY echo "| mana-auth | ${{ steps.changes.outputs.mana-auth }} |" >> $GITHUB_STEP_SUMMARY
echo "| mana-search | ${{ steps.changes.outputs.mana-search }} |" >> $GITHUB_STEP_SUMMARY echo "| mana-search | ${{ steps.changes.outputs.mana-search }} |" >> $GITHUB_STEP_SUMMARY
echo "| manacore-web | ${{ steps.changes.outputs.manacore-web }} |" >> $GITHUB_STEP_SUMMARY echo "| manacore-web | ${{ steps.changes.outputs.manacore-web }} |" >> $GITHUB_STEP_SUMMARY
echo "| chat-backend | ${{ steps.changes.outputs.chat-backend }} |" >> $GITHUB_STEP_SUMMARY echo "| chat-backend | ${{ steps.changes.outputs.chat-backend }} |" >> $GITHUB_STEP_SUMMARY
@ -440,11 +440,11 @@ jobs:
# Build Docker images - only changed services # Build Docker images - only changed services
# =========================================== # ===========================================
build-mana-core-auth: build-mana-auth:
name: Build mana-core-auth name: Build mana-auth
runs-on: ubuntu-latest runs-on: ubuntu-latest
needs: detect-changes needs: detect-changes
if: needs.detect-changes.outputs.mana-core-auth == 'true' if: needs.detect-changes.outputs.mana-auth == 'true'
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- uses: docker/setup-qemu-action@v3 - uses: docker/setup-qemu-action@v3
@ -457,12 +457,12 @@ jobs:
- uses: docker/metadata-action@v5 - uses: docker/metadata-action@v5
id: meta id: meta
with: with:
images: ghcr.io/${{ github.repository_owner }}/mana-core-auth images: ghcr.io/${{ github.repository_owner }}/mana-auth
tags: type=raw,value=latest tags: type=raw,value=latest
- uses: docker/build-push-action@v5 - uses: docker/build-push-action@v5
with: with:
context: . context: .
file: services/mana-core-auth/Dockerfile file: services/mana-auth/Dockerfile
platforms: linux/amd64,linux/arm64 platforms: linux/amd64,linux/arm64
push: true push: true
tags: ${{ steps.meta.outputs.tags }} tags: ${{ steps.meta.outputs.tags }}

View file

@ -4,7 +4,7 @@
# Manual Trigger: workflow_dispatch for on-demand test runs # Manual Trigger: workflow_dispatch for on-demand test runs
# Features: # Features:
# - Integration tests (E2E flows) # - Integration tests (E2E flows)
# - mana-core-auth service tests with coverage # - mana-auth service tests with coverage
# - Database setup/teardown # - Database setup/teardown
# - Discord notifications (always sent on success or failure) # - Discord notifications (always sent on success or failure)
@ -38,9 +38,9 @@ env:
COVERAGE_THRESHOLD: ${{ github.event.inputs.coverage_threshold || '80' }} COVERAGE_THRESHOLD: ${{ github.event.inputs.coverage_threshold || '80' }}
jobs: jobs:
# Job 1: Test mana-core-auth with coverage # Job 1: Test mana-auth with coverage
test-mana-core-auth: test-mana-auth:
name: Test mana-core-auth name: Test mana-auth
runs-on: ubuntu-latest runs-on: ubuntu-latest
services: services:
@ -90,13 +90,13 @@ jobs:
run: pnpm run build:packages run: pnpm run build:packages
- name: Setup test database - name: Setup test database
working-directory: services/mana-core-auth working-directory: services/mana-auth
env: env:
DATABASE_URL: postgresql://manacore:testpassword@localhost:5432/manacore DATABASE_URL: postgresql://manacore:testpassword@localhost:5432/manacore
run: pnpm run db:migrate run: pnpm run db:migrate
- name: Run tests with coverage - name: Run tests with coverage
working-directory: services/mana-core-auth working-directory: services/mana-auth
env: env:
DATABASE_URL: postgresql://manacore:testpassword@localhost:5432/manacore DATABASE_URL: postgresql://manacore:testpassword@localhost:5432/manacore
REDIS_URL: redis://localhost:6379 REDIS_URL: redis://localhost:6379
@ -114,16 +114,16 @@ jobs:
if: always() if: always()
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@v4
with: with:
name: coverage-mana-core-auth name: coverage-mana-auth
path: services/mana-core-auth/coverage path: services/mana-auth/coverage
retention-days: 30 retention-days: 30
- name: Check coverage threshold - name: Check coverage threshold
working-directory: services/mana-core-auth working-directory: services/mana-auth
run: | run: |
if [ -f "coverage/coverage-summary.json" ]; then if [ -f "coverage/coverage-summary.json" ]; then
COVERAGE=$(node -e "const c = require('./coverage/coverage-summary.json'); console.log(c.total.lines.pct)") COVERAGE=$(node -e "const c = require('./coverage/coverage-summary.json'); console.log(c.total.lines.pct)")
echo "Coverage for mana-core-auth: ${COVERAGE}%" echo "Coverage for mana-auth: ${COVERAGE}%"
if (( $(echo "$COVERAGE < $COVERAGE_THRESHOLD" | bc -l) )); then if (( $(echo "$COVERAGE < $COVERAGE_THRESHOLD" | bc -l) )); then
echo "::error::Coverage ${COVERAGE}% is below threshold ${COVERAGE_THRESHOLD}%" echo "::error::Coverage ${COVERAGE}% is below threshold ${COVERAGE_THRESHOLD}%"
@ -183,7 +183,7 @@ jobs:
run: pnpm run build:packages run: pnpm run build:packages
- name: Setup databases for integration tests - name: Setup databases for integration tests
working-directory: services/mana-core-auth working-directory: services/mana-auth
env: env:
DATABASE_URL: postgresql://manacore:testpassword@localhost:5432/manacore DATABASE_URL: postgresql://manacore:testpassword@localhost:5432/manacore
run: pnpm run db:migrate run: pnpm run db:migrate
@ -197,7 +197,7 @@ jobs:
JWT_AUDIENCE: manacore JWT_AUDIENCE: manacore
run: | run: |
# Run auth integration tests # Run auth integration tests
cd services/mana-core-auth cd services/mana-auth
if [ -d "test/integration" ]; then if [ -d "test/integration" ]; then
pnpm run test:e2e || pnpm run test -- test/integration pnpm run test:e2e || pnpm run test -- test/integration
fi fi
@ -207,13 +207,13 @@ jobs:
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@v4
with: with:
name: integration-test-results name: integration-test-results
path: services/mana-core-auth/test-results path: services/mana-auth/test-results
retention-days: 30 retention-days: 30
# Job 3: Always send Discord notification (success or failure) # Job 3: Always send Discord notification (success or failure)
notify: notify:
name: Discord Notification name: Discord Notification
needs: [test-mana-core-auth, test-integration] needs: [test-mana-auth, test-integration]
if: always() if: always()
runs-on: ubuntu-latest runs-on: ubuntu-latest
@ -224,15 +224,15 @@ jobs:
- name: Download coverage summary - name: Download coverage summary
uses: actions/download-artifact@v4 uses: actions/download-artifact@v4
with: with:
name: coverage-mana-core-auth name: coverage-mana-auth
path: coverage-mana-core-auth path: coverage-mana-auth
continue-on-error: true continue-on-error: true
- name: Check test results - name: Check test results
id: check id: check
run: | run: |
# Check if both jobs succeeded # Check if both jobs succeeded
AUTH_STATUS="${{ needs.test-mana-core-auth.result }}" AUTH_STATUS="${{ needs.test-mana-auth.result }}"
INTEGRATION_STATUS="${{ needs.test-integration.result }}" INTEGRATION_STATUS="${{ needs.test-integration.result }}"
if [ "$AUTH_STATUS" = "success" ] && [ "$INTEGRATION_STATUS" = "success" ]; then if [ "$AUTH_STATUS" = "success" ] && [ "$INTEGRATION_STATUS" = "success" ]; then
@ -249,8 +249,8 @@ jobs:
echo "run_url=$RUN_URL" >> $GITHUB_OUTPUT echo "run_url=$RUN_URL" >> $GITHUB_OUTPUT
# Get coverage if available # Get coverage if available
if [ -f "coverage-mana-core-auth/coverage-summary.json" ]; then if [ -f "coverage-mana-auth/coverage-summary.json" ]; then
COVERAGE=$(node -e "const c = require('./coverage-mana-core-auth/coverage-summary.json'); console.log(c.total.lines.pct)") COVERAGE=$(node -e "const c = require('./coverage-mana-auth/coverage-summary.json'); console.log(c.total.lines.pct)")
echo "coverage=${COVERAGE}%" >> $GITHUB_OUTPUT echo "coverage=${COVERAGE}%" >> $GITHUB_OUTPUT
else else
echo "coverage=N/A" >> $GITHUB_OUTPUT echo "coverage=N/A" >> $GITHUB_OUTPUT
@ -296,8 +296,8 @@ jobs:
\"inline\": true \"inline\": true
}, },
{ {
\"name\": \"🧪 mana-core-auth\", \"name\": \"🧪 mana-auth\",
\"value\": \"${{ needs.test-mana-core-auth.result }}\", \"value\": \"${{ needs.test-mana-auth.result }}\",
\"inline\": true \"inline\": true
}, },
{ {

View file

@ -82,7 +82,7 @@ jobs:
# Job 2: Build representative Docker images # Job 2: Build representative Docker images
# =========================================== # ===========================================
# Builds a subset that covers all shared packages: # Builds a subset that covers all shared packages:
# - mana-core-auth: covers shared-storage, shared-nestjs-auth, shared-llm # - mana-auth: covers auth service (Hono + Bun)
# - todo-web: covers most shared-* web packages # - todo-web: covers most shared-* web packages
# - zitare-web: covers content packages, shared-pwa # - zitare-web: covers content packages, shared-pwa
# - calendar-web: covers calendar shared packages # - calendar-web: covers calendar shared packages
@ -97,8 +97,8 @@ jobs:
fail-fast: false fail-fast: false
matrix: matrix:
include: include:
- service: mana-core-auth - service: mana-auth
dockerfile: services/mana-core-auth/Dockerfile dockerfile: services/mana-auth/Dockerfile
context: . context: .
- service: todo-backend - service: todo-backend
dockerfile: apps/todo/apps/backend/Dockerfile dockerfile: apps/todo/apps/backend/Dockerfile

View file

@ -102,36 +102,24 @@ services:
networks: networks:
- manacore-network - manacore-network
# Mana Core Auth Service # Mana Auth Service (Hono + Bun + Better Auth)
mana-core-auth: mana-auth:
profiles: ["auth", "all"] profiles: ["auth", "all"]
build: build:
context: . context: .
dockerfile: ./services/mana-core-auth/Dockerfile dockerfile: ./services/mana-auth/Dockerfile
container_name: manacore-auth container_name: mana-auth
restart: unless-stopped restart: unless-stopped
environment: environment:
NODE_ENV: development NODE_ENV: development
PORT: 3001 PORT: 3001
DATABASE_URL: postgresql://${POSTGRES_USER:-manacore}:${POSTGRES_PASSWORD:-devpassword}@postgres:5432/manacore DATABASE_URL: postgresql://${POSTGRES_USER:-manacore}:${POSTGRES_PASSWORD:-devpassword}@postgres:5432/mana_auth
REDIS_HOST: redis BETTER_AUTH_SECRET: ${BETTER_AUTH_SECRET:-dev-secret-change-me}
REDIS_PORT: 6379 BETTER_AUTH_URL: http://localhost:3001
REDIS_PASSWORD: ${REDIS_PASSWORD:-devpassword}
JWT_PUBLIC_KEY: ${JWT_PUBLIC_KEY}
JWT_PRIVATE_KEY: ${JWT_PRIVATE_KEY}
JWT_ACCESS_TOKEN_EXPIRY: ${JWT_ACCESS_TOKEN_EXPIRY:-15m}
JWT_REFRESH_TOKEN_EXPIRY: ${JWT_REFRESH_TOKEN_EXPIRY:-7d}
JWT_ISSUER: ${JWT_ISSUER:-manacore}
JWT_AUDIENCE: ${JWT_AUDIENCE:-manacore}
CORS_ORIGINS: ${CORS_ORIGINS:-http://localhost:3000,http://localhost:5173,http://localhost:8081} CORS_ORIGINS: ${CORS_ORIGINS:-http://localhost:3000,http://localhost:5173,http://localhost:8081}
CREDITS_SIGNUP_BONUS: ${CREDITS_SIGNUP_BONUS:-150}
CREDITS_DAILY_FREE: ${CREDITS_DAILY_FREE:-5}
GOOGLE_GENAI_API_KEY: ${GOOGLE_GENAI_API_KEY}
depends_on: depends_on:
postgres: postgres:
condition: service_healthy condition: service_healthy
redis:
condition: service_healthy
ports: ports:
- "3001:3001" - "3001:3001"
networks: networks:
@ -157,7 +145,7 @@ services:
AZURE_OPENAI_ENDPOINT: ${AZURE_OPENAI_ENDPOINT} AZURE_OPENAI_ENDPOINT: ${AZURE_OPENAI_ENDPOINT}
AZURE_OPENAI_API_KEY: ${AZURE_OPENAI_API_KEY} AZURE_OPENAI_API_KEY: ${AZURE_OPENAI_API_KEY}
AZURE_OPENAI_API_VERSION: ${AZURE_OPENAI_API_VERSION:-2024-12-01-preview} AZURE_OPENAI_API_VERSION: ${AZURE_OPENAI_API_VERSION:-2024-12-01-preview}
MANA_CORE_AUTH_URL: http://mana-core-auth:3001 MANA_CORE_AUTH_URL: http://mana-auth:3001
depends_on: depends_on:
postgres: postgres:
condition: service_healthy condition: service_healthy

View file

@ -50,9 +50,9 @@ scrape_configs:
# ============================================ # ============================================
# Auth Service # Auth Service
- job_name: 'mana-core-auth' - job_name: 'mana-auth'
static_configs: static_configs:
- targets: ['mana-core-auth:3001'] - targets: ['mana-auth:3001']
metrics_path: '/metrics' metrics_path: '/metrics'
scrape_interval: 30s scrape_interval: 30s

View file

@ -23,7 +23,7 @@
"setup:db": "./scripts/setup-databases.sh", "setup:db": "./scripts/setup-databases.sh",
"setup:db:chat": "./scripts/setup-databases.sh chat", "setup:db:chat": "./scripts/setup-databases.sh chat",
"setup:db:auth": "./scripts/setup-databases.sh auth", "setup:db:auth": "./scripts/setup-databases.sh auth",
"seed:dev-user": "pnpm --filter mana-core-auth db:seed:dev", "seed:dev-user": "pnpm --filter @mana/auth db:seed:dev",
"build:packages": "pnpm --filter '@manacore/*' build", "build:packages": "pnpm --filter '@manacore/*' build",
"postinstall": "node scripts/generate-env.mjs || true && pnpm run build:packages || true", "postinstall": "node scripts/generate-env.mjs || true && pnpm run build:packages || true",
"manacore:dev": "turbo run dev --filter=manacore...", "manacore:dev": "turbo run dev --filter=manacore...",
@ -52,7 +52,7 @@
"dev:chat:landing": "pnpm --filter @chat/landing dev", "dev:chat:landing": "pnpm --filter @chat/landing dev",
"dev:chat:backend": "pnpm --filter @chat/backend start:dev", "dev:chat:backend": "pnpm --filter @chat/backend start:dev",
"dev:chat:app": "turbo run dev --filter=@chat/web --filter=@chat/backend", "dev:chat:app": "turbo run dev --filter=@chat/web --filter=@chat/backend",
"dev:auth": "pnpm --filter mana-core-auth start:dev", "dev:auth": "cd services/mana-auth && bun run --watch src/index.ts",
"dev:sync": "cd services/mana-sync && JWKS_URL=http://localhost:3001/api/auth/jwks DATABASE_URL=postgresql://manacore:devpassword@localhost:5432/mana_sync ./server", "dev:sync": "cd services/mana-sync && JWKS_URL=http://localhost:3001/api/auth/jwks DATABASE_URL=postgresql://manacore:devpassword@localhost:5432/mana_sync ./server",
"dev:sync:build": "cd services/mana-sync && go build -o server ./cmd/server", "dev:sync:build": "cd services/mana-sync && go build -o server ./cmd/server",
"dev:chat:full": "./scripts/setup-databases.sh chat && ./scripts/setup-databases.sh auth && concurrently -n auth,backend,web -c blue,green,cyan \"pnpm dev:auth\" \"pnpm dev:chat:backend\" \"pnpm dev:chat:web\"", "dev:chat:full": "./scripts/setup-databases.sh chat && ./scripts/setup-databases.sh auth && concurrently -n auth,backend,web -c blue,green,cyan \"pnpm dev:auth\" \"pnpm dev:chat:backend\" \"pnpm dev:chat:web\"",
@ -227,7 +227,7 @@
"docker:up:all": "docker compose -f docker-compose.dev.yml --env-file .env.development --profile all up -d", "docker:up:all": "docker compose -f docker-compose.dev.yml --env-file .env.development --profile all up -d",
"docker:down": "docker compose -f docker-compose.dev.yml --env-file .env.development --profile all down", "docker:down": "docker compose -f docker-compose.dev.yml --env-file .env.development --profile all down",
"docker:logs": "docker compose -f docker-compose.dev.yml --env-file .env.development logs -f", "docker:logs": "docker compose -f docker-compose.dev.yml --env-file .env.development logs -f",
"docker:logs:auth": "docker compose -f docker-compose.dev.yml --env-file .env.development logs -f mana-core-auth", "docker:logs:auth": "docker compose -f docker-compose.dev.yml --env-file .env.development logs -f mana-auth",
"docker:logs:chat": "docker compose -f docker-compose.dev.yml --env-file .env.development logs -f chat-backend", "docker:logs:chat": "docker compose -f docker-compose.dev.yml --env-file .env.development logs -f chat-backend",
"docker:ps": "docker compose -f docker-compose.dev.yml --env-file .env.development ps -a", "docker:ps": "docker compose -f docker-compose.dev.yml --env-file .env.development ps -a",
"docker:clean": "docker compose -f docker-compose.dev.yml --env-file .env.development --profile all down -v", "docker:clean": "docker compose -f docker-compose.dev.yml --env-file .env.development --profile all down -v",

View file

@ -56,30 +56,16 @@ function generateEnvContent(vars) {
// App configurations - maps source variables to target variables // App configurations - maps source variables to target variables
const APP_CONFIGS = [ const APP_CONFIGS = [
// Mana Core Auth Service // Mana Auth Service (Hono + Bun)
{ {
path: 'services/mana-core-auth/.env', path: 'services/mana-auth/.env',
vars: { vars: {
NODE_ENV: () => 'development', NODE_ENV: () => 'development',
PORT: (env) => env.MANA_CORE_AUTH_PORT || '3001', PORT: (env) => env.MANA_CORE_AUTH_PORT || '3001',
DATABASE_URL: (env) => env.MANA_CORE_AUTH_DATABASE_URL, DATABASE_URL: (env) => env.MANA_CORE_AUTH_DATABASE_URL,
REDIS_HOST: (env) => env.REDIS_HOST, BETTER_AUTH_SECRET: (env) => env.BETTER_AUTH_SECRET || 'dev-secret-change-me',
REDIS_PORT: (env) => env.REDIS_PORT, BETTER_AUTH_URL: () => 'http://localhost:3001',
REDIS_PASSWORD: (env) => env.REDIS_PASSWORD || '',
JWT_PRIVATE_KEY: (env) => env.JWT_PRIVATE_KEY,
JWT_PUBLIC_KEY: (env) => env.JWT_PUBLIC_KEY,
JWT_ACCESS_TOKEN_EXPIRY: (env) => env.JWT_ACCESS_TOKEN_EXPIRY,
JWT_REFRESH_TOKEN_EXPIRY: (env) => env.JWT_REFRESH_TOKEN_EXPIRY,
JWT_ISSUER: (env) => env.JWT_ISSUER,
JWT_AUDIENCE: (env) => env.JWT_AUDIENCE,
STRIPE_SECRET_KEY: (env) => env.STRIPE_SECRET_KEY,
STRIPE_PUBLISHABLE_KEY: (env) => env.STRIPE_PUBLISHABLE_KEY,
STRIPE_WEBHOOK_SECRET: (env) => env.STRIPE_WEBHOOK_SECRET,
CORS_ORIGINS: (env) => env.CORS_ORIGINS, CORS_ORIGINS: (env) => env.CORS_ORIGINS,
CREDITS_SIGNUP_BONUS: (env) => env.CREDITS_SIGNUP_BONUS,
CREDITS_DAILY_FREE: (env) => env.CREDITS_DAILY_FREE,
RATE_LIMIT_TTL: (env) => env.RATE_LIMIT_TTL,
RATE_LIMIT_MAX: (env) => env.RATE_LIMIT_MAX,
GOOGLE_GENAI_API_KEY: (env) => env.GOOGLE_GENAI_API_KEY, GOOGLE_GENAI_API_KEY: (env) => env.GOOGLE_GENAI_API_KEY,
}, },
}, },

View file

@ -32,7 +32,7 @@ POSTGRES_PASSWORD=your-secure-password
# Redis # Redis
REDIS_PASSWORD=your-redis-password REDIS_PASSWORD=your-redis-password
# JWT Keys (from mana-core-auth) # JWT Keys (from mana-auth)
JWT_SECRET=your-jwt-secret JWT_SECRET=your-jwt-secret
JWT_PUBLIC_KEY= JWT_PUBLIC_KEY=
JWT_PRIVATE_KEY= JWT_PRIVATE_KEY=

View file

@ -166,7 +166,7 @@ for container in $ALL_PROBLEM_CONTAINERS; do
mana-app-photos-web) SERVICE_NAME="photos-web" ;; mana-app-photos-web) SERVICE_NAME="photos-web" ;;
# mana-app-photos-backend: REMOVED # mana-app-photos-backend: REMOVED
mana-app-web) SERVICE_NAME="mana-web" ;; mana-app-web) SERVICE_NAME="mana-web" ;;
mana-core-auth) SERVICE_NAME="mana-auth" ;; mana-auth) SERVICE_NAME="mana-auth" ;;
mana-core-gateway) SERVICE_NAME="api-gateway" ;; mana-core-gateway) SERVICE_NAME="api-gateway" ;;
mana-core-search) SERVICE_NAME="mana-search" ;; mana-core-search) SERVICE_NAME="mana-search" ;;
mana-core-searxng) SERVICE_NAME="searxng" ;; mana-core-searxng) SERVICE_NAME="searxng" ;;

View file

@ -86,7 +86,7 @@ ALL_DATABASES=(
"traces" "traces"
"context" "context"
"citycorners" "citycorners"
# New Hono service databases (extracted from mana-core-auth) # Hono service databases (extracted from former mana-core-auth)
"mana_credits" "mana_credits"
"mana_user" "mana_user"
"mana_subscriptions" "mana_subscriptions"
@ -101,9 +101,9 @@ setup_service() {
local service=$1 local service=$1
case $service in case $service in
auth|mana-core-auth) auth|mana-auth)
create_db_if_not_exists "manacore" create_db_if_not_exists "mana_auth"
push_schema "mana-core-auth" "mana-core-auth" push_schema "@mana/auth" "mana-auth"
;; ;;
chat) chat)
create_db_if_not_exists "chat" create_db_if_not_exists "chat"

View file

@ -29,11 +29,11 @@ export DATABASE_URL_TEMPLATE="postgresql://manacore:devpassword@localhost:5432"
# Seed auth service # Seed auth service
seed_auth() { seed_auth() {
echo -e "\n${GREEN}Seeding mana-core-auth...${NC}" echo -e "\n${GREEN}Seeding mana-auth...${NC}"
export DATABASE_URL="${DATABASE_URL_TEMPLATE}/manacore" export DATABASE_URL="${DATABASE_URL_TEMPLATE}/mana_auth"
cd services/mana-core-auth cd services/mana-auth
# Run migrations # Run migrations
pnpm run db:push pnpm run db:push