Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 57 additions & 0 deletions backend/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# ══════════════════════════════════════════════════════════════════════════════
# CCE Backend — Environment Variables Template
# Copy this file to .env (local dev) or .env.production and fill in real values.
# ASP.NET Core reads these via double-underscore convention:
# Infrastructure__SqlConnectionString → Infrastructure.SqlConnectionString
# ══════════════════════════════════════════════════════════════════════════════

# ── Database (SQL Server) ─────────────────────────────────────────────────────
Infrastructure__SqlConnectionString=Server=<host>;Database=<db>;User Id=<user>;Password=<password>;Encrypt=True;TrustServerCertificate=True;MultipleActiveResultSets=True;

# ── Redis ─────────────────────────────────────────────────────────────────────
# External API + Worker (dev: localhost, prod: managed Redis URL with password)
Infrastructure__RedisConnectionString=localhost:6379
# Internal API uses a separate Redis instance in some envs — override per process if needed

# ── Supabase S3 ───────────────────────────────────────────────────────────────
Infrastructure__S3AccessKey=<supabase-s3-access-key>
Infrastructure__S3SecretKey=<supabase-s3-secret-key>

# ── Meilisearch ───────────────────────────────────────────────────────────────
Infrastructure__MeilisearchMasterKey=<meilisearch-master-key>

# ── Email (SMTP) ──────────────────────────────────────────────────────────────
Email__Username=<smtp-username>
Email__Password=<smtp-password-or-app-password>

# ── OTP HMAC ──────────────────────────────────────────────────────────────────
Otp__HmacSecret=<base64-encoded-hmac-secret>

# ── LocalAuth JWT Signing Keys ────────────────────────────────────────────────
LocalAuth__External__SigningKey=<32-char-minimum-random-string>
LocalAuth__Internal__SigningKey=<32-char-minimum-random-string>

# ── Firebase Admin SDK ────────────────────────────────────────────────────────
Firebase__ProjectId=<firebase-project-id>
# Compact single-line JSON from the downloaded service account key file
Firebase__ServiceAccountJson={"type":"service_account","project_id":"...","private_key_id":"...","private_key":"-----BEGIN PRIVATE KEY-----\n...\n-----END PRIVATE KEY-----\n","client_email":"...","client_id":"...","auth_uri":"https://accounts.google.com/o/oauth2/auth","token_uri":"https://oauth2.googleapis.com/token","auth_provider_x509_cert_url":"https://www.googleapis.com/oauth2/v1/certs","client_x509_cert_url":"...","universe_domain":"googleapis.com"}

# ── Microsoft Entra ID ────────────────────────────────────────────────────────
EntraId__TenantId=<tenant-id>
EntraId__ClientId=<client-id>
EntraId__ClientSecret=<client-secret>
EntraId__GraphTenantId=<graph-tenant-id>
EntraId__GraphTenantDomain=<tenant-domain>

# ── Keycloak (BFF — External API only) ───────────────────────────────────────
Bff__KeycloakClientSecret=<keycloak-client-secret>

# ── Seq Logging ───────────────────────────────────────────────────────────────
Seq__ApiKey=<seq-api-key>

# ── Anthropic / AI Assistant (if provider = anthropic) ───────────────────────
Assistant__Anthropic__ApiKey=<anthropic-api-key>

# ── RabbitMQ (production only, if Transport = RabbitMQ) ──────────────────────
Messaging__RabbitMqUsername=<rabbitmq-username>
Messaging__RabbitMqPassword=<rabbitmq-password>
41 changes: 23 additions & 18 deletions backend/src/CCE.Api.External/appsettings.Development.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@
}
},
"Infrastructure": {
"SqlConnectionString": "Server=db52197.public.databaseasp.net; Database=db52197; User Id=db52197; Password=CHANGE-ME; Encrypt=True; TrustServerCertificate=True; MultipleActiveResultSets=True;",
"SqlConnectionString": "",
"RedisConnectionString": "localhost:6379",
"S3EndpointUrl": "https://pocikalapsyczhfbuhzf.storage.supabase.co/storage/v1/s3",
"S3PublicBaseUrl": "https://pocikalapsyczhfbuhzf.supabase.co/storage/v1/object/public",
"S3AccessKey": "CHANGE-ME-S3-ACCESS-KEY",
"S3SecretKey": "CHANGE-ME-S3-SECRET-KEY",
"S3AccessKey": "",
"S3SecretKey": "",
"S3BucketName": "uploads",
"MeilisearchUrl": "http://localhost:7700",
"MeilisearchMasterKey": "dev-meili-master-key-change-me",
"MeilisearchUrl": "https://ms-9c99ed0d8a5b-50601.lon.meilisearch.io",
"MeilisearchMasterKey": "",
"OutputCacheTtlSeconds": 60,
"CelebrityFollowerThreshold": 10000
},
Expand All @@ -26,7 +26,7 @@
"Bff": {
"KeycloakRealm": "cce-public",
"KeycloakClientId": "cce-public-portal",
"KeycloakClientSecret": "dev-public-secret-change-me",
"KeycloakClientSecret": "",
"CookieDomain": "localhost",
"SessionLifetimeMinutes": 30,
"KeycloakBaseUrl": "http://localhost:8080"
Expand All @@ -45,12 +45,12 @@
},
"EntraId": {
"Instance": "https://login.microsoftonline.com/",
"TenantId": "common",
"ClientId": "00000000-0000-0000-0000-000000000000",
"ClientSecret": "dev-entra-secret-change-me",
"Audience": "api://00000000-0000-0000-0000-000000000000",
"GraphTenantId": "00000000-0000-0000-0000-000000000000",
"GraphTenantDomain": "cce.local",
"TenantId": "",
"ClientId": "",
"ClientSecret": "",
"Audience": "",
"GraphTenantId": "",
"GraphTenantDomain": "",
"CallbackPath": "/signin-oidc"
},
"Messaging": {
Expand All @@ -62,12 +62,12 @@
"External": {
"Issuer": "cce-api-external-dev",
"Audience": "cce-public-dev",
"SigningKey": "dev-external-local-auth-signing-key-change-me-12345"
"SigningKey": ""
},
"Internal": {
"Issuer": "cce-api-internal-dev",
"Audience": "cce-admin-dev",
"SigningKey": "dev-internal-local-auth-signing-key-change-me-12345"
"SigningKey": ""
},
"AccessTokenMinutes": 10,
"RefreshTokenDays": 30,
Expand All @@ -80,8 +80,8 @@
"Port": 587,
"FromAddress": "ccetest15@gmail.com",
"FromName": "CCE Knowledge Center",
"Username": "ccetest15@gmail.com",
"Password": "CHANGE-ME-SMTP-APP-PASSWORD",
"Username": "",
"Password": "",
"EnableSsl": true
},
"ExternalApis": {
Expand All @@ -102,12 +102,17 @@
"BaseUrl": "https://cce-external-api.runasp.net/media/"
},
"Seq": {
"ServerUrl": "http://localhost:5341"
"ServerUrl": "http://localhost:5341",
"ApiKey": ""
},
"Otp": {
"HmacSecret": "CHANGE-ME-OTP-HMAC-SECRET"
"HmacSecret": ""
},
"Frontend": {
"PasswordResetUrl": "http://localhost:4200"
},
"Firebase": {
"ProjectId": "",
"ServiceAccountJson": ""
}
}
42 changes: 23 additions & 19 deletions backend/src/CCE.Api.External/appsettings.Production.json
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
{
"Logging": {
"LogLevel": {
"Default": "Debug",
"Microsoft.AspNetCore": "Information"
"Default": "Information",
"Microsoft.AspNetCore": "Warning"
}
},
"Infrastructure": {
"SqlConnectionString": "Server=db52197.public.databaseasp.net; Database=db52197; User Id=db52197; Password=CHANGE-ME; Encrypt=True; TrustServerCertificate=True; MultipleActiveResultSets=True;",
"RedisConnectionString": "spot-activity-quarter-93466.db.redis.io:18280,password=CHANGE-ME-REDIS-PASSWORD,user=default",
"SqlConnectionString": "",
"RedisConnectionString": "",
"S3EndpointUrl": "https://pocikalapsyczhfbuhzf.storage.supabase.co/storage/v1/s3",
"S3PublicBaseUrl": "https://pocikalapsyczhfbuhzf.supabase.co/storage/v1/object/public",
"S3AccessKey": "CHANGE-ME-S3-ACCESS-KEY",
"S3SecretKey": "CHANGE-ME-S3-SECRET-KEY",
"S3AccessKey": "",
"S3SecretKey": "",
"S3BucketName": "uploads",
"MediaUploadsRoot": "./wwwroot/media/",
"MeilisearchUrl": "http://localhost:7700",
"MeilisearchMasterKey": "dev-meili-master-key-change-me",
"MeilisearchUrl": "https://ms-9c99ed0d8a5b-50601.lon.meilisearch.io",
"MeilisearchMasterKey": "",
"OutputCacheTtlSeconds": 60,
"CelebrityFollowerThreshold": 10000
},
Expand All @@ -27,7 +27,7 @@
"Bff": {
"KeycloakRealm": "cce-public",
"KeycloakClientId": "cce-public-portal",
"KeycloakClientSecret": "dev-public-secret-change-me",
"KeycloakClientSecret": "",
"CookieDomain": "localhost",
"SessionLifetimeMinutes": 30,
"KeycloakBaseUrl": "http://localhost:8080"
Expand All @@ -46,12 +46,12 @@
},
"EntraId": {
"Instance": "https://login.microsoftonline.com/",
"TenantId": "common",
"ClientId": "00000000-0000-0000-0000-000000000000",
"ClientSecret": "dev-entra-secret-change-me",
"Audience": "api://00000000-0000-0000-0000-000000000000",
"GraphTenantId": "00000000-0000-0000-0000-000000000000",
"GraphTenantDomain": "cce.local",
"TenantId": "",
"ClientId": "",
"ClientSecret": "",
"Audience": "",
"GraphTenantId": "",
"GraphTenantDomain": "",
"CallbackPath": "/signin-oidc"
},
"Messaging": {
Expand All @@ -65,12 +65,12 @@
"External": {
"Issuer": "cce-api-external-dev",
"Audience": "cce-public-dev",
"SigningKey": "dev-external-local-auth-signing-key-change-me-12345"
"SigningKey": ""
},
"Internal": {
"Issuer": "cce-api-internal-dev",
"Audience": "cce-admin-dev",
"SigningKey": "dev-internal-local-auth-signing-key-change-me-12345"
"SigningKey": ""
},
"AccessTokenMinutes": 10,
"RefreshTokenDays": 30,
Expand All @@ -83,8 +83,8 @@
"Port": 587,
"FromAddress": "ccetest15@gmail.com",
"FromName": "CCE Knowledge Center",
"Username": "ccetest15@gmail.com",
"Password": "CHANGE-ME-SMTP-APP-PASSWORD",
"Username": "",
"Password": "",
"EnableSsl": true
},
"ExternalApis": {
Expand All @@ -103,5 +103,9 @@
},
"Frontend": {
"PasswordResetUrl": "http://localhost:4200"
},
"Firebase": {
"ProjectId": "",
"ServiceAccountJson": ""
}
}
48 changes: 31 additions & 17 deletions backend/src/CCE.Api.Internal/appsettings.Development.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,19 @@
}
},
"Infrastructure": {
"SqlConnectionString": "Server=db52197.public.databaseasp.net; Database=db52197; User Id=db52197; Password=3Mm!x5#Y?rR9; Encrypt=True; TrustServerCertificate=True; MultipleActiveResultSets=True;",
"RedisConnectionString": "rediss://default:gQAAAAAAAYY8AAIgcDIwYmNkMjFmM2Q0NDk0MGRiOWZhZjczNDE1NmMwZjFlMw@game-elk-99900.upstash.io:6379",
"SqlConnectionString": "",
"RedisConnectionString": "localhost:6379",
"S3EndpointUrl": "https://pocikalapsyczhfbuhzf.storage.supabase.co/storage/v1/s3",
"S3PublicBaseUrl": "https://pocikalapsyczhfbuhzf.supabase.co/storage/v1/object/public",
"S3AccessKey": "",
"S3SecretKey": "",
"S3BucketName": "uploads",
"LocalUploadsRoot": "./backend/",
"ClamAvHost": "localhost",
"ClamAvPort": 3310
"ClamAvPort": 3310,
"CelebrityFollowerThreshold": 10000,
"MeilisearchUrl": "https://ms-9c99ed0d8a5b-50601.lon.meilisearch.io",
"MeilisearchMasterKey": ""
},
"Keycloak": {
"Authority": "http://localhost:8080/realms/cce-internal",
Expand All @@ -26,12 +34,12 @@
},
"EntraId": {
"Instance": "https://login.microsoftonline.com/",
"TenantId": "common",
"ClientId": "00000000-0000-0000-0000-000000000000",
"ClientSecret": "dev-entra-secret-change-me",
"Audience": "api://00000000-0000-0000-0000-000000000000",
"GraphTenantId": "00000000-0000-0000-0000-000000000000",
"GraphTenantDomain": "cce.local",
"TenantId": "",
"ClientId": "",
"ClientSecret": "",
"Audience": "",
"GraphTenantId": "",
"GraphTenantDomain": "",
"CallbackPath": "/signin-oidc"
},
"Messaging": {
Expand All @@ -43,12 +51,12 @@
"External": {
"Issuer": "cce-api-external-dev",
"Audience": "cce-public-dev",
"SigningKey": "dev-external-local-auth-signing-key-change-me-12345"
"SigningKey": ""
},
"Internal": {
"Issuer": "cce-api-internal-dev",
"Audience": "cce-admin-dev",
"SigningKey": "dev-internal-local-auth-signing-key-change-me-12345"
"SigningKey": ""
},
"AccessTokenMinutes": 10,
"RefreshTokenDays": 30,
Expand All @@ -57,13 +65,13 @@
},
"Email": {
"Provider": "smtp",
"Host": "localhost",
"Port": 1025,
"FromAddress": "no-reply@cce.local",
"Host": "smtp.gmail.com",
"Port": 587,
"FromAddress": "ccetest15@gmail.com",
"FromName": "CCE Knowledge Center",
"Username": "",
"Password": "",
"EnableSsl": false
"EnableSsl": true
},
"ExternalApis": {
"CommunicationGateway": {
Expand All @@ -83,12 +91,18 @@
"BaseUrl": "https://cce-internal-api.runasp.net/media/"
},
"Seq": {
"ServerUrl": "http://localhost:5341"
"ServerUrl": "http://localhost:5341",
"ApiKey": ""
},
"Otp": {
"HmacSecret": "3ahs3DvW/rdx+InzjOCpqSUDSFuvyF59sPjziVdeIhE="
"HmacSecret": ""
},
"Frontend": {
"BaseUrl": "http://localhost:4201",
"PasswordResetUrl": "http://localhost:4201"
},
"Firebase": {
"ProjectId": "",
"ServiceAccountJson": ""
}
}
Loading
Loading