You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This happens when trying to manually add routes that Swagger UI already provides. The `/documentation/json` and `/documentation/yaml` endpoints are automatically created.
976
976
977
-
### "Failed to fetch API spec" Error
977
+
####"Failed to fetch API spec" Error
978
978
979
979
Ensure the server is fully started before trying to fetch the specification. The generation script includes a 2-second delay to allow for complete initialization.
980
980
981
-
### Missing Route Documentation
981
+
####Missing Route Documentation
982
982
983
983
Routes without schema definitions will appear in the specification but with minimal documentation. Add schema objects to routes for complete documentation.
Email server configuration for sending notifications and system emails. Includes SMTP host, port, authentication credentials (encrypted password), SSL/TLS settings, and default sender information.
Controls UI element visibility for users across the application. Manages header buttons like Discord community link and feedback form.
756
+
757
+
**Special behavior**: These settings are automatically included in the `/api/users/me` endpoint response, making them immediately available to the frontend without additional API calls.
When designing setting groups for your application, follow these guidelines:
880
913
881
-
-Use dot notation for hierarchy: `category.subcategory.setting`
882
-
- Use lowercase with underscores for readability: `smtp.max_retry_count`
883
-
-Be descriptive but concise: `api.openai.key` not `api.openai.api_key`
884
-
-Group related settings: `database.host`, `database.port`, `database.name`
914
+
-**Logical grouping**: Group related settings together (e.g., all SMTP settings in one group)
915
+
-**Clear names**: Use descriptive group names that are clear for frontend display
916
+
-**Consistent icons**: Use consistent iconography across groups for better UX
917
+
-**Proper ordering**: Set `sort_order` values to control tab display sequence in the frontend
885
918
886
-
### Group Design
919
+
##Performance Considerations
887
920
888
-
-**Logical Grouping**: Group related settings together (e.g., all SMTP settings)
889
-
-**Clear Names**: Use descriptive group names for frontend display
890
-
-**Consistent Icons**: Use consistent iconography across groups
891
-
-**Proper Ordering**: Set sort_order to control tab display sequence
892
-
893
-
### Setting Organization
894
-
895
-
-**Hierarchical Keys**: Use dot notation within groups: `group.subcategory.setting`
896
-
-**Group Consistency**: Keep all related settings in the same group
897
-
-**Clear Descriptions**: Provide helpful descriptions for administrators
898
-
899
-
### Security Guidelines
900
-
901
-
-**Always encrypt sensitive data**: Passwords, API keys, tokens, secrets
902
-
-**Use descriptive descriptions**: Help other administrators understand the purpose
903
-
-**Group sensitive settings**: Keep all sensitive settings for a service in one group
904
-
-**Regular audits**: Review settings periodically for unused or outdated values
905
-
-**Environment separation**: Use different encryption secrets for different environments
906
-
907
-
### Performance: In-Memory Cache
921
+
### In-Memory Cache
908
922
909
923
The global settings system uses an **in-memory cache** to eliminate database queries for read operations. This is critical for high-frequency endpoints like health checks (`/`) and Swagger documentation (`/documentation`).
910
924
@@ -969,21 +983,6 @@ if (GlobalSettingsCache.isInitialized()) {
969
983
-**Batch operations**: Use bulk endpoints when creating multiple related settings
970
984
-**Group retrieval**: Use `getGroupValues()` to fetch all settings in a group at once
0 commit comments