Admin Settings Feature
Comprehensive platform settings management for administrators to configure and customize the Momentum platform.
Table of Contents
- Overview
- Accessing Settings
- Settings Sections
- Saving Changes
- Export Settings
- Import Settings
- Best Practices
- Troubleshooting
- API Access
- Related Documentation
- Support
Overview
The Admin Settings feature provides a centralized interface for platform administrators to configure all aspects of the Momentum learning platform. Settings are organized into logical sections, persisted to the database, and include features like export/import for backup and migration.
Key Features
- 7 Settings Sections: General, Branding, Courses, AI Generation, User Management, Payment, Analytics
- Real-time Persistence: All changes saved immediately to Aurora PostgreSQL database
- Audit Trail: Complete change history with timestamps and user tracking
- Export/Import: Backup and restore settings via JSON files
- Validation & Sanitization: Input validation and XSS protection
- Redis Caching: 5-minute cache for optimal performance
- Role-Based Access: Admin-only access with Cognito authentication
Accessing Settings
Navigation
- Log in with an admin account
- Navigate to Admin Dashboard from the header menu
- Click Settings in the admin navigation sidebar
- Or directly visit:
https://momentum.cloudnnj.com/admin/settings
Required Permissions
- Role:
admingroup in AWS Cognito - Authentication: Valid JWT token with admin claim
Settings Sections
1. General Settings
Configure platform-wide general settings.
| Setting | Type | Description | Default |
|---|---|---|---|
| Platform Name | String | Display name shown throughout the platform | “Momentum” |
| Platform Tagline | String | Short description/slogan | “Learn anything, achieve everything” |
| Support Email | Contact email for user support | “support@momentum.com” | |
| Default Timezone | String | System timezone (IANA format) | “America/New_York” |
| Default Language | String | UI language code (ISO 639-1) | “en” |
| Maintenance Mode | Boolean | Block non-admin access to platform | false |
| Maintenance Message | Text | Message displayed during maintenance | Custom message |
Example Use Cases:
- Update platform name for rebranding
- Enable maintenance mode during system upgrades
- Change support email when support team changes
Warning: Enabling maintenance mode will block all non-admin users from accessing the platform. Only enable during scheduled maintenance windows.
2. Branding Settings
Customize the visual appearance and branding of the platform.
| Setting | Type | Description | Default |
|---|---|---|---|
| Primary Color | Hex Color | Main brand color | “#3b82f6” (blue) |
| Secondary Color | Hex Color | Secondary accent color | “#8b5cf6” (purple) |
| Accent Color | Hex Color | Highlight/CTA color | “#f59e0b” (amber) |
| Logo URL | URL | Main logo (light theme) | ”” |
| Dark Logo URL | URL | Logo for dark mode | ”” |
| Favicon URL | URL | Browser favicon (16x16 or 32x32) | ”” |
| Custom CSS | Text | Custom CSS overrides (max 10,000 chars) | ”” |
| Custom Footer HTML | HTML | Custom footer content (max 5,000 chars) | ”” |
Color Guidelines:
- Use hex format:
#RRGGBB - Ensure sufficient contrast for accessibility (WCAG AA: 4.5:1 minimum)
- Test colors in both light and dark modes
Custom CSS Best Practices:
- Use specific class selectors to avoid conflicts
- Test thoroughly before deploying
- Keep under 10,000 characters for performance
- Avoid
!importantwhen possible
3. Course Settings
Configure course creation and enrollment behavior.
| Setting | Type | Description | Default |
|---|---|---|---|
| Default Duration | Number | Default course duration in days | 14 |
| Min Duration | Number | Minimum allowed duration | 7 |
| Max Duration | Number | Maximum allowed duration | 21 |
| Auto-enroll New Users | Boolean | Automatically enroll new users in featured courses | false |
| Allow Self-enrollment | Boolean | Users can enroll themselves in courses | true |
Duration Guidelines:
- Momentum is designed for bite-sized learning (7-21 days)
- 7 days: Quick skill acquisition
- 14 days: Standard comprehensive courses
- 21 days: Deep dive/advanced topics
4. AI Generation Settings
Configure AI-powered content generation via Amazon Bedrock.
| Setting | Type | Description | Default |
|---|---|---|---|
| Default Model | String | Bedrock model ID | “anthropic.claude-3-5-sonnet-20241022-v2:0” |
| Max Tokens | Number | Maximum tokens per generation | 8000 |
| Temperature | Number | Creativity level (0-1) | 0.7 |
| Enable Video Generation | Boolean | Enable AI video creation | true |
| Video Provider | String | Video generation service | “heygen” |
Model Options:
anthropic.claude-3-5-sonnet-20241022-v2:0- Recommended (balanced quality/cost)anthropic.claude-3-opus-20240229- Highest quality (higher cost)anthropic.claude-3-haiku-20240307- Fastest/cheapest
Temperature Guidelines:
0.0-0.3: Deterministic, focused, factual content0.4-0.7: Balanced creativity and accuracy (recommended)0.8-1.0: More creative, varied output
Video Providers:
heygen: High-quality, natural avatars (recommended)synthesia: Professional, multilingual supportd-id: Cost-effective, good quality
Cost Considerations: Higher quality models and longer token limits increase AWS costs. Monitor usage in CloudWatch.
5. User Management Settings
Configure user registration and authentication behavior.
| Setting | Type | Description | Default |
|---|---|---|---|
| Allow Registration | Boolean | Enable new user sign-up | true |
| Require Email Verification | Boolean | Verify email before access | true |
| Default Role | String | Role assigned to new users | “free” |
| Session Timeout | Number | Session duration in seconds | 86400 (24 hours) |
| Max Login Attempts | Number | Failed logins before lockout | 5 |
Role Options:
free: Basic access to free coursespremium: Access to all coursesadmin: Full administrative access
Security Best Practices:
- Always require email verification in production
- Keep session timeout to 24 hours or less
- Set max login attempts to 3-5 to prevent brute force
6. Payment Settings
Configure Stripe payment integration.
| Setting | Type | Description | Default |
|---|---|---|---|
| Stripe Enabled | Boolean | Enable Stripe payments | true |
| Currency | String | Default payment currency (ISO 4217) | “USD” |
| Trial Period Days | Number | Free trial duration | 7 |
| Allow Refunds | Boolean | Enable payment refunds | true |
Supported Currencies:
- USD, EUR, GBP, CAD, AUD, JPY, and more
- Check Stripe documentation for complete list
Stripe Integration: Ensure Stripe API keys are configured in AWS Secrets Manager before enabling.
7. Analytics Settings
Configure user activity tracking and data retention.
| Setting | Type | Description | Default |
|---|---|---|---|
| Enable Tracking | Boolean | Track user activity | true |
| Retention Days | Number | Days to retain analytics data | 90 |
| Track Page Views | Boolean | Record page view events | true |
| Track User Actions | Boolean | Record user interaction events | true |
Privacy Compliance:
- Disable tracking to comply with strict privacy requirements
- Set retention days according to your privacy policy
- Consider GDPR/CCPA requirements for your region
Data Volume: Longer retention periods increase database storage costs.
Saving Changes
Auto-save Behavior
Settings are NOT automatically saved. You must explicitly save changes:
- Make changes to any setting
- Click Save Changes button at the top or bottom of the page
- Wait for the success confirmation message
- Changes are immediately persisted to the database
Validation
The system validates all inputs before saving:
- Type Checking: Ensures correct data types (string, number, boolean)
- Range Validation: Checks numeric ranges (e.g., temperature 0-1)
- Format Validation: Validates URLs, emails, hex colors
- Length Limits: Enforces maximum string lengths
- XSS Protection: Sanitizes HTML input to prevent attacks
Error Handling: If validation fails, you’ll see specific error messages indicating which fields need correction.
Export Settings
When to Export
- Backup: Regular backups before major changes
- Migration: Moving settings between environments
- Disaster Recovery: Quick restoration capability
- Documentation: Record current configuration
How to Export
- Click Export button (download icon) in the settings header
- Browser downloads
momentum-settings-[timestamp].json - File contains complete settings snapshot with metadata
Export Format
{
"version": "1.0.0",
"exported_at": "2025-12-23T10:30:00.000Z",
"exported_by": "admin@momentum.com",
"settings": {
"general": {
"platform_name": "Momentum",
"platform_tagline": "Learn anything, achieve everything",
"support_email": "support@momentum.com",
"default_timezone": "America/New_York",
"maintenance_mode": false,
"maintenance_message": "",
"default_language": "en"
},
"branding": {
"primary_color": "#3b82f6",
"secondary_color": "#8b5cf6",
"accent_color": "#f59e0b",
"logo_url": "",
"logo_dark_url": "",
"favicon_url": "",
"custom_css": "",
"custom_footer_html": ""
}
// ... other sections
}
}
Security: Export files may contain sensitive configuration. Store securely.
Import Settings
When to Import
- Restore Backup: Recover from accidental changes
- Environment Migration: Copy settings from staging to production
- Bulk Updates: Update multiple settings at once
- Initial Setup: Configure new environment quickly
How to Import
- Click Import button (upload icon) in the settings header
- Select a previously exported JSON file
- Choose import mode:
- Replace Mode: Overwrites ALL existing settings (default)
- Merge Mode: Updates only settings present in the file
- Review the confirmation dialog
- Click Import to confirm
Import Modes
Replace Mode (Default)
Before: { general: { platform_name: "Momentum", support_email: "old@example.com" } }
Import: { general: { platform_name: "New Platform" } }
After: { general: { platform_name: "New Platform" } }
- Replaces ALL settings with imported values
- Settings not in import file are reset to defaults
- Use for complete environment restoration
Merge Mode
Before: { general: { platform_name: "Momentum", support_email: "old@example.com" } }
Import: { general: { platform_name: "New Platform" } }
After: { general: { platform_name: "New Platform", support_email: "old@example.com" } }
- Updates only settings present in import file
- Preserves existing settings not in import
- Use for partial updates or migrations
Import Validation
The system validates import files before applying:
- Structure Validation: Checks JSON format and schema
- Version Compatibility: Ensures compatible version
- Data Validation: Validates all setting values
- Sanitization: Cleans input to prevent XSS
Common Import Errors:
- Invalid JSON format
- Missing required fields
- Invalid setting values
- Version mismatch
Warning: Importing settings cannot be undone. Export current settings before importing to enable rollback.
Best Practices
Regular Backups
- Schedule: Export settings monthly or before major changes
- Naming Convention:
momentum-settings-[environment]-[YYYY-MM-DD].json - Storage: Store in secure, version-controlled location (Git, AWS S3)
- Testing: Periodically test imports in staging environment
Change Management
- Test First: Make changes in staging/test environment
- Export Before: Always export before making major changes
- Small Batches: Update one section at a time
- Verify: Check frontend to confirm changes applied correctly
- Document: Keep a change log for compliance/auditing
Security
- Admin Only: Never share admin credentials
- Secure Exports: Encrypt export files if storing externally
- Audit Trail: Review audit logs regularly (available via database)
- Production Changes: Require peer review for production setting changes
Performance
- Cache Aware: Settings are cached for 5 minutes (updates may take up to 5 min to propagate)
- Custom CSS: Keep custom CSS minimal for performance
- Image URLs: Use CDN URLs for logos and favicons
- Testing: Test performance impact of custom CSS/HTML
Troubleshooting
Settings Not Saving
Symptoms: Click save, but changes don’t persist
Solutions:
- Check browser console for JavaScript errors
- Verify you have admin role (
cognito:groupsclaim) - Check that API Gateway endpoints are healthy
- Verify Lambda functions are not timing out
- Check Aurora database connectivity
Changes Not Appearing
Symptoms: Settings saved but not visible on frontend
Solutions:
- Cache Delay: Wait up to 5 minutes for cache to expire
- Hard Refresh: Clear browser cache (Cmd+Shift+R / Ctrl+Shift+R)
- Redis Cache: Check Redis ElastiCache cluster health
- CDN: CloudFront cache may delay updates (30-60 seconds)
Import Failing
Symptoms: Import button shows error
Solutions:
- Validate JSON: Use a JSON validator (jsonlint.com)
- Check Version: Ensure export version matches (currently 1.0.0)
- Check Size: Files over 1MB may fail
- Encoding: Ensure UTF-8 encoding
- Review Logs: Check CloudWatch logs for specific validation errors
Maintenance Mode Stuck
Symptoms: Cannot disable maintenance mode
Solutions:
- Direct Database: Update via database query if needed:
UPDATE platform_settings SET value = 'false' WHERE section = 'general' AND key = 'maintenance_mode'; - Cache Clear: Manually flush Redis cache
- API Direct: Use curl to update via API (bypass frontend)
Validation Errors
Symptoms: “Validation failed” error on save
Solutions:
- Read Error Message: Details which field failed and why
- Check Formats:
- Colors: Must be hex format
#RRGGBB - URLs: Must be valid HTTP/HTTPS
- Numbers: Must be within allowed ranges
- Emails: Must be valid email format
- Colors: Must be hex format
- Field Limits: Check character limits (see sections above)
API Access
For programmatic access to settings, see the Settings API Reference.
Quick Example
# Get all settings
curl -X GET "https://iu7ewpcwvc.execute-api.us-east-1.amazonaws.com/dev/admin/settings" \
-H "Authorization: Bearer YOUR_JWT_TOKEN"
# Update general settings
curl -X PATCH "https://iu7ewpcwvc.execute-api.us-east-1.amazonaws.com/dev/admin/settings/general" \
-H "Authorization: Bearer YOUR_JWT_TOKEN" \
-H "Content-Type: application/json" \
-d '{"platform_name": "My Platform"}'
Related Documentation
- Settings API Reference - Complete API documentation
- Settings Architecture - Technical implementation details
- User Management - Admin user management features
- Technical Architecture - Platform architecture overview
Support
Issues or Questions?
- Check Troubleshooting section above
- Review Settings Architecture for technical details
- Open an issue on GitHub
- Contact platform support: support@momentum.com