mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-14 19:41:09 +02:00
🔧 chore(skilltree): add environment configuration
- Add SKILLTREE_BACKEND_PORT and DATABASE_URL to .env.development - Add port 5195 to CORS_ORIGINS - Add skilltree backend/web entries to generate-env.mjs - Fix nested button error in SkillTemplates.svelte
This commit is contained in:
parent
29c5d2b29a
commit
1fcd5de8f3
3 changed files with 45 additions and 14 deletions
|
|
@ -46,7 +46,7 @@ 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:8081
|
||||
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
|
||||
|
|
@ -314,6 +314,13 @@ PLANTA_S3_PUBLIC_URL=http://localhost:9000/planta-storage
|
|||
# Google Gemini API for plant vision analysis
|
||||
PLANTA_GEMINI_API_KEY=AIzaSyC_-hPWpVttTlqJdU4jbXR5H0OAnRi2LgI
|
||||
|
||||
# ============================================
|
||||
# SKILLTREE PROJECT
|
||||
# ============================================
|
||||
|
||||
SKILLTREE_BACKEND_PORT=3024
|
||||
SKILLTREE_DATABASE_URL=postgresql://manacore:devpassword@localhost:5432/skilltree
|
||||
|
||||
# ============================================
|
||||
# WORLDREAM GAME
|
||||
# ============================================
|
||||
|
|
|
|||
|
|
@ -134,30 +134,30 @@
|
|||
{#each Object.entries(templates) as [name, skills]}
|
||||
<div class="rounded-xl border border-gray-700 bg-gray-900/50 overflow-hidden">
|
||||
<!-- Template Header -->
|
||||
<button
|
||||
onclick={() => (selectedTemplate = selectedTemplate === name ? null : name)}
|
||||
class="w-full flex items-center justify-between p-4 text-left hover:bg-gray-800/50 transition-colors"
|
||||
>
|
||||
<div>
|
||||
<div class="flex items-center justify-between p-4 hover:bg-gray-800/50 transition-colors">
|
||||
<button
|
||||
onclick={() => (selectedTemplate = selectedTemplate === name ? null : name)}
|
||||
class="flex-1 text-left"
|
||||
>
|
||||
<h3 class="font-semibold text-white">{name}</h3>
|
||||
<p class="text-sm text-gray-400">{skills.length} Skills</p>
|
||||
</div>
|
||||
</button>
|
||||
<div class="flex items-center gap-2">
|
||||
<button
|
||||
onclick={(e) => {
|
||||
e.stopPropagation();
|
||||
addAllFromTemplate(name);
|
||||
}}
|
||||
onclick={() => addAllFromTemplate(name)}
|
||||
disabled={adding}
|
||||
class="rounded-lg bg-emerald-600/20 px-3 py-1.5 text-sm font-medium text-emerald-400 transition-colors hover:bg-emerald-600/30 disabled:opacity-50"
|
||||
>
|
||||
Alle hinzufügen
|
||||
</button>
|
||||
<span class="text-gray-500 text-xl">
|
||||
<button
|
||||
onclick={() => (selectedTemplate = selectedTemplate === name ? null : name)}
|
||||
class="text-gray-500 text-xl px-2"
|
||||
>
|
||||
{selectedTemplate === name ? '−' : '+'}
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<!-- Expanded Skills -->
|
||||
{#if selectedTemplate === name}
|
||||
|
|
|
|||
|
|
@ -327,6 +327,30 @@ const APP_CONFIGS = [
|
|||
},
|
||||
},
|
||||
|
||||
// SkillTree Backend (NestJS)
|
||||
{
|
||||
path: 'apps/skilltree/apps/backend/.env',
|
||||
vars: {
|
||||
NODE_ENV: () => 'development',
|
||||
PORT: (env) => env.SKILLTREE_BACKEND_PORT || '3024',
|
||||
DATABASE_URL: (env) => env.SKILLTREE_DATABASE_URL,
|
||||
MANA_CORE_AUTH_URL: (env) => env.MANA_CORE_AUTH_URL,
|
||||
DEV_BYPASS_AUTH: () => 'true',
|
||||
DEV_USER_ID: (env) => env.DEV_USER_ID || '00000000-0000-0000-0000-000000000000',
|
||||
JWT_PUBLIC_KEY: (env) => env.JWT_PUBLIC_KEY,
|
||||
CORS_ORIGINS: (env) => env.CORS_ORIGINS,
|
||||
},
|
||||
},
|
||||
|
||||
// SkillTree Web (SvelteKit)
|
||||
{
|
||||
path: 'apps/skilltree/apps/web/.env',
|
||||
vars: {
|
||||
PUBLIC_BACKEND_URL: (env) => `http://localhost:${env.SKILLTREE_BACKEND_PORT || '3024'}`,
|
||||
PUBLIC_MANA_CORE_AUTH_URL: (env) => env.MANA_CORE_AUTH_URL,
|
||||
},
|
||||
},
|
||||
|
||||
// Mana Games Backend (NestJS)
|
||||
{
|
||||
path: 'games/mana-games/apps/backend/.env',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue