# ============================================
# Mana Core Monorepo - Development Environment
# ============================================
# This is the central source of truth for all dev environment variables.
# Run `pnpm setup:env` to generate app-specific .env files.
#
# DO NOT commit real API keys or production values here.
# This file contains development/local values only.
# ============================================

# ============================================
# SHARED - Used across multiple apps
# ============================================

# GlitchTip Error Tracking (self-hosted Sentry-compatible)
# Set DSN after creating projects in GlitchTip admin
# Format: https://<key>@glitchtip.mana.how/<project-id>
GLITCHTIP_DSN=

# Mana Core Auth Service
MANA_CORE_AUTH_URL=http://localhost:3001
# Service key for bot-to-auth communication (Matrix-SSO-Link)
MANA_CORE_SERVICE_KEY=dev-service-key-for-bot-sso-2024

# JWT Keys (shared across apps for token verification)
JWT_PRIVATE_KEY="-----BEGIN PRIVATE KEY-----\nMIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQDGRsOXROB4lprw\n9oXaOIt+cwHe3UxBOoiWiUXcpFuXwb+kBWn/LyjeCIOXtefOwE0S10JEodK+6foe\naqGHanq86qAmmkb4a8sjj5LAxXkHL35sJo8HaYcx5NkJQLxQSRHpTfdfxsKsKwxa\n4R4uqrvToqdo6tl/VMsGDPS8L7KzaiKaSdGugvlVtXWgV1soeXSUPyPwpyAXQg7h\nY4CkTSkJAplrs77RLdj8u6jbHKR3F7QkwiU1JocjhM1GP/suKiqXRu8omLFnu45C\ns09SNSRsOpNY5csrKA4PZ2LCks9VHH7HafFvB+BbRw4+Ssr6myOysAztqi3bZMRW\nLTakWpBbAgMBAAECggEAF5zi0IzaghHxhtkyYfrSRgSynX9+WYBRNu2ch8/SZqAj\neghOXMkZgAPEjtiSMDGqRsr4ReMoYtB2Qea8sOX8kwC1gj4Po1Mhtez0cwexclUf\nebLH3X/y9/1YiZJk5YImOMIuaoC/ELDvFOhIEhJcMbKREbIc+oiMcH6HgN0vViVh\nJptgHTnqnGHNARkEpf+xnxqJJxEgrEMz50b4fApKpoZsWXNnZ3Atc/i2ziGew5z4\npnGJxs9TWSukBZaQvl9iluBBvqm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0TgeJaa8PaF2jiL\nfnMB3t1MQTqIlolF3KRbl8G/pAVp/y8o3giDl7XnzsBNEtdCRKHSvun6Hmqhh2p6\nvOqgJppG+GvLI4+SwMV5By9+bCaPB2mHMeTZCUC8UEkR6U33X8bCrCsMWuEeLqq7\n06KnaOrZf1TLBgz0vC+ys2oimknRroL5VbV1oFdbKHl0lD8j8KcgF0IO4WOApE0p\nCQKZa7O+0S3Y/Luo2xykdxe0JMIlNSaHI4TNRj/7Lioql0bvKJixZ7uOQrNPUjUk\nbDqTWOXLKygOD2diwpLPVRx+x2nxbwfgW0c+Ssr6myOysAztqi3bZMRWLTakWpBb\nwIDAQAB\n-----END PUBLIC KEY-----"

# Database (shared Postgres for local Docker)
POSTGRES_USER=manacore
POSTGRES_PASSWORD=devpassword

# Redis
REDIS_HOST=localhost
REDIS_PORT=6379
REDIS_PASSWORD=devpassword

# MinIO Object Storage (local S3-compatible storage)
MINIO_ROOT_USER=minioadmin
MINIO_ROOT_PASSWORD=minioadmin
S3_ENDPOINT=http://localhost:9000
S3_REGION=us-east-1
S3_ACCESS_KEY=minioadmin
S3_SECRET_KEY=minioadmin

# ============================================
# MANA-CORE-AUTH SERVICE
# ============================================

MANA_CORE_AUTH_PORT=3001
MANA_CORE_AUTH_DATABASE_URL=postgresql://manacore:devpassword@localhost:5432/manacore
JWT_ACCESS_TOKEN_EXPIRY=15m
JWT_REFRESH_TOKEN_EXPIRY=7d
JWT_ISSUER=manacore
JWT_AUDIENCE=manacore
CORS_ORIGINS=http://localhost:3000,http://localhost:3002,http://localhost:5173,http://localhost:5174,http://localhost:5175,http://localhost:5176,http://localhost:5177,http://localhost:5178,http://localhost:5179,http://localhost:5180,http://localhost:5181,http://localhost:5182,http://localhost:5183,http://localhost:5184,http://localhost:5185,http://localhost:5186,http://localhost:5187,http://localhost:5188,http://localhost:5189,http://localhost:5190,http://localhost:5191,http://localhost:5195,http://localhost:8081
CREDITS_SIGNUP_BONUS=150
CREDITS_DAILY_FREE=5
RATE_LIMIT_TTL=60
RATE_LIMIT_MAX=100

# Stripe Configuration
# Get your keys from https://dashboard.stripe.com/apikeys
STRIPE_SECRET_KEY=sk_test_YOUR_KEY
STRIPE_PUBLISHABLE_KEY=pk_test_YOUR_KEY
STRIPE_WEBHOOK_SECRET=whsec_103705b73101b783a91305a9ec272834df6a096ffb2c2566b1c899318a156b03

# Stripe Product & Price IDs (ManaCore Unified Plans - Live)
# Plus: 4.99€/month, 49.99€/year - 100 credits
STRIPE_PLUS_PRODUCT_ID=prod_TzNUGcq9qx9rRT
STRIPE_PLUS_PRICE_MONTHLY=price_1T1OkKAZjQCYS0ZJ88m0shoN
STRIPE_PLUS_PRICE_YEARLY=price_1T1OkLAZjQCYS0ZJ4IdMzVyJ

# Pro: 11.99€/month, 119.99€/year - 500 credits
STRIPE_PRO_PRODUCT_ID=prod_TzNUgWeBjT35qn
STRIPE_PRO_PRICE_MONTHLY=price_1T1OkLAZjQCYS0ZJvyPM7Wop
STRIPE_PRO_PRICE_YEARLY=price_1T1OkLAZjQCYS0ZJDbZeuOOu

# Ultra: 24.99€/month, 249.99€/year - 2000 credits
STRIPE_ULTRA_PRODUCT_ID=prod_TzNUE5pTbTDdbp
STRIPE_ULTRA_PRICE_MONTHLY=price_1T1OkMAZjQCYS0ZJYCJNZtg8
STRIPE_ULTRA_PRICE_YEARLY=price_1T1OkMAZjQCYS0ZJvCvR6Ve6

# Credit Packs (One-time purchases)
STRIPE_CREDITS_100_PRODUCT_ID=prod_TzNUvyjD4hrcUR
STRIPE_CREDITS_100_PRICE=price_1T1OkNAZjQCYS0ZJP6XQ33F7
STRIPE_CREDITS_500_PRODUCT_ID=prod_TzNUzzub5HM70Q
STRIPE_CREDITS_500_PRICE=price_1T1OkNAZjQCYS0ZJGH9TKmqa
STRIPE_CREDITS_1000_PRODUCT_ID=prod_TzNUvB4LT4PCCe
STRIPE_CREDITS_1000_PRICE=price_1T1OkNAZjQCYS0ZJvc6HTfB5

# Customer Portal Configuration
STRIPE_PORTAL_CONFIG_ID=bpc_1T1PFdAZjQCYS0ZJEhF9ob7q

# ============================================
# CHAT PROJECT
# ============================================

# Chat Backend
CHAT_BACKEND_PORT=3002
CHAT_DATABASE_URL=postgresql://manacore:devpassword@localhost:5432/chat
DEV_BYPASS_AUTH=true
DEV_USER_ID=00000000-0000-0000-0000-000000000000

# OpenRouter API (all AI models via OpenRouter)
# Get your API key at https://openrouter.ai/keys
OPENROUTER_API_KEY=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

# Ollama (local LLM server - runs on Mac Mini)
# Use SSH tunnel: ssh -L 11434:localhost:11434 mana-server
# Or set to direct URL if Ollama is exposed (e.g., https://ollama.mana.how)
OLLAMA_URL=http://localhost:11434

# ============================================
# MAERCHENZAUBER PROJECT
# ============================================

MAERCHENZAUBER_BACKEND_PORT=3013
MAERCHENZAUBER_APP_ID=8d2f5ddb-e251-4b3b-8802-84022a7ac77f

# Supabase
MAERCHENZAUBER_SUPABASE_URL=https://your-storyteller-project.supabase.co
MAERCHENZAUBER_SUPABASE_ANON_KEY=your-supabase-anon-key
MAERCHENZAUBER_JWT_SECRET=your-jwt-secret

# Azure OpenAI for story generation
MAERCHENZAUBER_AZURE_OPENAI_KEY=YOUR_KEY
MAERCHENZAUBER_AZURE_OPENAI_ENDPOINT=https://your-endpoint.openai.azure.com/openai/deployments/gpt-4o/chat/completions?api-version=2024-08-01-preview

# Replicate for image generation
MAERCHENZAUBER_REPLICATE_API_KEY=YOUR_KEY

# ============================================
# MEMORO PROJECT
# ============================================

MEMORO_SUPABASE_URL=https://your-memoro-project.supabase.co
MEMORO_SUPABASE_ANON_KEY=your-supabase-anon-key
MEMORO_MIDDLEWARE_API_URL=https://mana-core-middleware-111768794939.europe-west3.run.app
MEMORO_APPID=your-app-id

# ============================================
# MANACORE PROJECT
# ============================================

MANACORE_SUPABASE_URL=https://your-manacore-project.supabase.co
MANACORE_SUPABASE_ANON_KEY=your-supabase-anon-key

# ============================================
# MANADECK PROJECT
# ============================================

MANADECK_BACKEND_PORT=3009
MANADECK_DATABASE_URL=postgresql://manacore:devpassword@localhost:5432/manadeck
MANADECK_APP_ID=cea4bfc6-a4de-4e17-91e2-54275940156e
MANADECK_SUPABASE_URL=https://your-manadeck-project.supabase.co
MANADECK_SUPABASE_ANON_KEY=your-supabase-anon-key

# ============================================
# PICTURE PROJECT
# ============================================

PICTURE_BACKEND_PORT=3006
PICTURE_BACKEND_URL=http://localhost:3006
PICTURE_DATABASE_URL=postgresql://manacore:devpassword@localhost:5432/picture

# Replicate API Token for AI image generation
PICTURE_REPLICATE_API_TOKEN=r8_QlvkstNhIc6NBX1ktpQ6ibvzOE2d2UQ1Emamd

# Storage Configuration (uses MinIO locally, Hetzner in production)
# Uses shared S3_* variables from above - no project-specific override needed for local dev
PICTURE_STORAGE_PUBLIC_URL=http://localhost:9000/picture-storage

# Credit System (staging only - freemium: 3 free images, then credits)
PICTURE_APP_ID=picture-app
PICTURE_MANA_CORE_SERVICE_KEY=

# OAuth (optional - leave empty to disable)
PICTURE_GOOGLE_CLIENT_ID=
PICTURE_APPLE_CLIENT_ID=

# ============================================
# NUTRIPHI PROJECT
# ============================================

NUTRIPHI_BACKEND_PORT=3023
NUTRIPHI_DATABASE_URL=postgresql://manacore:devpassword@localhost:5432/nutriphi
NUTRIPHI_APP_ID=nutriphi

# Google Gemini API for food image analysis
GEMINI_API_KEY=AIzaSyBR9iP74hlo-mhI-Cl4QEvKprRzPPMb-GA

# S3 Storage (uses MinIO locally via shared S3_* variables, Hetzner in production)
NUTRIPHI_S3_PUBLIC_URL=http://localhost:9000/nutriphi-storage

# ============================================
# ZITARE PROJECT
# ============================================

ZITARE_BACKEND_PORT=3007
ZITARE_DATABASE_URL=postgresql://manacore:devpassword@localhost:5432/zitare

# ============================================
# ZITARE TELEGRAM BOT
# ============================================

ZITARE_BOT_PORT=3303
ZITARE_BOT_DATABASE_URL=postgresql://manacore:devpassword@localhost:5432/zitare_bot
ZITARE_BOT_TELEGRAM_TOKEN=8489424174:AAHHG_mlLVeu6xAWY6U2ZGXO0D8JKWnqBvg

# ============================================
# TODO TELEGRAM BOT
# ============================================

TODO_BOT_PORT=3304
TODO_BOT_DATABASE_URL=postgresql://manacore:devpassword@localhost:5432/todo_bot
TODO_BOT_TELEGRAM_TOKEN=8363906368:AAHzNC1DPSb0TUb2a3UGWWH1_rrAQFdBv2w
TODO_BOT_API_URL=http://localhost:3018

# ============================================
# PRESI PROJECT
# ============================================

PRESI_BACKEND_PORT=3008
PRESI_DATABASE_URL=postgresql://manacore:devpassword@localhost:5432/presi

# ============================================
# VOXEL-LAVA PROJECT
# ============================================

VOXEL_LAVA_BACKEND_PORT=3010
VOXEL_LAVA_DATABASE_URL=postgresql://manacore:devpassword@localhost:5432/voxel_lava
VOXEL_LAVA_API_URL=http://localhost:3010

# ============================================
# CONTACTS PROJECT
# ============================================

CONTACTS_BACKEND_PORT=3015
CONTACTS_DATABASE_URL=postgresql://manacore:devpassword@localhost:5432/contacts

# S3 Storage for contact photos
CONTACTS_S3_BUCKET=contacts-photos
CONTACTS_S3_PUBLIC_URL=http://localhost:9000/contacts-photos

# Google OAuth for contacts import
# Get credentials from https://console.cloud.google.com/apis/credentials
# Required scopes: https://www.googleapis.com/auth/contacts.readonly
CONTACTS_GOOGLE_CLIENT_ID=your-google-client-id.apps.googleusercontent.com
CONTACTS_GOOGLE_CLIENT_SECRET=your-google-client-secret
CONTACTS_GOOGLE_REDIRECT_URI=http://localhost:5184/import?tab=google

# ============================================
# CALENDAR PROJECT
# ============================================

CALENDAR_BACKEND_PORT=3014
CALENDAR_BACKEND_URL=http://localhost:3014
CALENDAR_DATABASE_URL=postgresql://manacore:devpassword@localhost:5432/calendar

# Speech-to-Text Service (mana-stt)
# Production: https://stt-api.mana.how
# Local dev: http://localhost:3020
STT_URL=https://stt-api.mana.how

# ============================================
# CONTEXT PROJECT
# ============================================

CONTEXT_BACKEND_PORT=3020
CONTEXT_DATABASE_URL=postgresql://manacore:devpassword@localhost:5432/context

# AI API Keys (server-side only)
CONTEXT_AZURE_OPENAI_API_KEY=YOUR_KEY
CONTEXT_AZURE_OPENAI_ENDPOINT=https://memoroseopenai.openai.azure.com/
CONTEXT_GOOGLE_API_KEY=YOUR_KEY

# ============================================
# STORAGE PROJECT (Cloud Drive)
# ============================================

STORAGE_BACKEND_PORT=3016
STORAGE_DATABASE_URL=postgresql://manacore:devpassword@localhost:5432/storage
STORAGE_S3_PUBLIC_URL=http://localhost:9000/storage-storage
STORAGE_MAX_FILE_SIZE=104857600
STORAGE_MAX_FILES_PER_UPLOAD=10

# ============================================
# CLOCK PROJECT
# ============================================

CLOCK_BACKEND_PORT=3017
CLOCK_DATABASE_URL=postgresql://manacore:devpassword@localhost:5432/clock

# ============================================
# TODO PROJECT
# ============================================

TODO_BACKEND_PORT=3018
TODO_BACKEND_URL=http://localhost:3018
TODO_DATABASE_URL=postgresql://manacore:devpassword@localhost:5432/todo

# ============================================
# MOODLIT PROJECT
# ============================================

MOODLIT_BACKEND_PORT=3012
MOODLIT_DATABASE_URL=postgresql://manacore:devpassword@localhost:5432/moods

# ============================================
# MANA-GAMES PROJECT
# ============================================

MANA_GAMES_BACKEND_PORT=3011

# Google Gemini API (primary, fast)
MANA_GAMES_GOOGLE_GENAI_API_KEY=your_google_genai_key_here

# Anthropic Claude API (best code quality)
MANA_GAMES_ANTHROPIC_API_KEY=your_anthropic_key_here

# Azure OpenAI API (alternative)
MANA_GAMES_AZURE_OPENAI_ENDPOINT=https://your-endpoint.openai.azure.com
MANA_GAMES_AZURE_OPENAI_API_KEY=your_azure_openai_key_here
MANA_GAMES_AZURE_OPENAI_DEPLOYMENT=gpt-4o

# GitHub (for community submissions)
MANA_GAMES_GITHUB_TOKEN=your_github_token_here
MANA_GAMES_GITHUB_OWNER=tillschneider
MANA_GAMES_GITHUB_REPO=mana-games

# ============================================
# FINANCE PROJECT
# ============================================

FINANCE_BACKEND_PORT=3019
FINANCE_DATABASE_URL=postgresql://manacore:devpassword@localhost:5432/finance

# ============================================
# INVENTORY PROJECT
# ============================================

INVENTORY_BACKEND_PORT=3020
INVENTORY_DATABASE_URL=postgresql://manacore:devpassword@localhost:5432/inventory
INVENTORY_S3_PUBLIC_URL=http://localhost:9000/inventory-storage

# ============================================
# TECHBASE PROJECT
# ============================================

TECHBASE_BACKEND_PORT=3021
TECHBASE_DATABASE_URL=postgresql://manacore:devpassword@localhost:5432/techbase

# ============================================
# PLANTA PROJECT
# ============================================

PLANTA_BACKEND_PORT=3022
PLANTA_DATABASE_URL=postgresql://manacore:devpassword@localhost:5432/planta
PLANTA_S3_PUBLIC_URL=http://localhost:9000/planta-storage

# Google Gemini API for plant vision analysis
PLANTA_GEMINI_API_KEY=AIzaSyC_-hPWpVttTlqJdU4jbXR5H0OAnRi2LgI

# ============================================
# TRACES PROJECT
# ============================================

TRACES_BACKEND_PORT=3026
TRACES_DATABASE_URL=postgresql://manacore:devpassword@localhost:5432/traces

# ============================================
# SKILLTREE PROJECT
# ============================================

SKILLTREE_BACKEND_PORT=3024
SKILLTREE_DATABASE_URL=postgresql://manacore:devpassword@localhost:5432/skilltree

# ============================================
# MUKKE PROJECT
# ============================================

MUKKE_BACKEND_PORT=3010
MUKKE_DATABASE_URL=postgresql://manacore:devpassword@localhost:5432/mukke

# ============================================
# WORLDREAM GAME
# ============================================

WORLDREAM_SUPABASE_URL=https://gbsrekoykkesullxdvbd.supabase.co
WORLDREAM_SUPABASE_ANON_KEY=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6Imdic3Jla295a2tlc3VsbHhkdmJkIiwicm9sZSI6ImFub24iLCJpYXQiOjE3NTY1MTU3NzksImV4cCI6MjA3MjA5MTc3OX0.qQlZvHiB56oKTRD90fd8IasZeZELjXOA46f-hnOQA1g
WORLDREAM_OPENAI_API_KEY=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
WORLDREAM_GEMINI_API_KEY=AIzaSyB74aUj1KmJlcjNyT5uUiyDODQ6iYoAOjQ
WORLDREAM_REPLICATE_API_TOKEN=r8_QlvkstNhIc6NBX1ktpQ6ibvzOE2d2UQ1Emamd
