Repository navigation
Configuration Reference
FriendAssKicker edited this page Jun 26, 2026
·
1 revision
All non-sensitive, runtime configurations are managed via a YAML-based config loader. The primary config file is apps/backend/config.default.yaml.
To override these defaults for specific environments, you can create:
-
apps/backend/config.dev.yaml(automatically loaded in development) -
apps/backend/config.prod.yaml(automatically loaded in production)
Important
Secrets and Keys: Sensitive credentials (database URIs, API keys, passwords, webhook tokens) must never be committed to YAML files. Keep them in your .env or inject them at runtime using environment variables.
Below is a detailed breakdown of the main config sections:
-
port: Port the Express server listens on (defaults to6767). -
trustProxyHops: Number of reverse proxy hops to trust (critical for tracking correct user IPs via Nginx). -
bodyLimit: Maximum size of incoming HTTP bodies (e.g.10mb). -
shutdownTimeoutMs: Graceful shutdown timeout (defaults to15000ms).
-
allowedOrigins: List of origins allowed to perform cross-origin requests. -
allowVercelPreviews: Boolean toggle to trust dynamic preview domains. -
allowLocalhostInDev: Automatically permits localhost origins when running in development mode.
-
jwt.expiresIn: Duration before the authentication token expires (default7d). -
jwt.issuer: The token issuer string (defaultcsfaq). -
jwt.audience: The target API audience (defaultcsfaq-api). -
password.bcryptRounds: BCrypt work factor (default10rounds).
Governs IP-based request throttles using express-rate-limit:
-
global: Global traffic limits. -
auth: Stricter thresholds for login (max 5 in 15m) and registration (max 3 in 60m). -
search: Limits search requests (max 30 per minute). -
askAi: Daily AI quotas (max 5 for anonymous searches, 50 for logged-in students).
-
hybrid.vectorWeight: Relative weight of vector rankings in RRF merging (default0.6). -
hybrid.keywordWeight: Relative weight of keyword text rankings in RRF merging (default0.4). -
hybrid.rrfK: The constant$k$ used to damp Reciprocal Rank Fusion ranks (default60). -
hybrid.minScore: Minimum score similarity threshold below which results are discarded (default0.3). -
embedding.model: Hugging Face model key used for local embedding generation (defaultmixedbread-ai/mxbai-embed-large-v1). -
embedding.dimensions: The number of vector dimensions (default1024).
-
freshness.tiers: Review intervals before content is flagged for verification:- Evergreen: 90 days.
- Seasonal: 15 days.
- Volatile: 4 days.
-
freshness.peerVoteThreshold: Number of helpful votes needed from experts to auto-verify freshness. -
duplicateDetection.similarityThreshold: Math threshold above which a submission is auto-flagged as a duplicate (default0.85).
-
goldenTicket.spCostPerEscalation: Points deducted to make a support request high-priority (default10). -
goldenTicket.defaultCooldownHours: Delay before a student can request another Golden Ticket (default48h). -
troubleshoot.maxSteps: Steps defined for the student troubleshooting guides (default4).
-
providers.priority: Order of provider lookup when resolving fallback services (default:anthropic,openai,xai,minimax,gemini). -
pipelines.autoAnswer.approveThreshold: Confidence score above which the AI will automatically answer a community question without human moderation (default0.85). -
pipelines.autoAnswer.queueThreshold: Score above which the AI answer is queued for review (default0.60).
-
points: Points awarded to students:- Creating a community post:
+5points. - Creating a comment:
+2points. - Having their answer accepted:
+15points. - Receiving an upvote:
+1point. - Contributing a verified FAQ:
+10points.
- Creating a community post:
-
tiers: Reputation milestones:- Newcomer: 0 points.
- Contributor: 50 points.
- Expert: 200 points.
- Mentor: 500 points.
- Knowledge Master: 1000 points.
Governs clean-up intervals for logs and records:
-
searchLogs.ttlDays: 90 days. -
notifications.ttlDays: 90 days. -
freshReviewLogs.ttlDays: 180 days. -
moderationLogs.ttlDays: 365 days.