Admin Settings Feature

Comprehensive platform settings management for administrators to configure and customize the Momentum platform.

Table of Contents

  1. Overview
    1. Key Features
  2. Accessing Settings
    1. Navigation
    2. Required Permissions
  3. Settings Sections
    1. 1. General Settings
    2. 2. Branding Settings
    3. 3. Course Settings
    4. 4. AI Generation Settings
    5. 5. User Management Settings
    6. 6. Payment Settings
    7. 7. Analytics Settings
  4. Saving Changes
    1. Auto-save Behavior
    2. Validation
  5. Export Settings
    1. When to Export
    2. How to Export
    3. Export Format
  6. Import Settings
    1. When to Import
    2. How to Import
    3. Import Modes
      1. Replace Mode (Default)
      2. Merge Mode
    4. Import Validation
  7. Best Practices
    1. Regular Backups
    2. Change Management
    3. Security
    4. Performance
  8. Troubleshooting
    1. Settings Not Saving
    2. Changes Not Appearing
    3. Import Failing
    4. Maintenance Mode Stuck
    5. Validation Errors
  9. API Access
    1. Quick Example
  10. Related Documentation
  11. 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

  1. Log in with an admin account
  2. Navigate to Admin Dashboard from the header menu
  3. Click Settings in the admin navigation sidebar
  4. Or directly visit: https://momentum.cloudnnj.com/admin/settings

Required Permissions

  • Role: admin group 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 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 !important when 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 content
  • 0.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 support
  • d-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 courses
  • premium: Access to all courses
  • admin: 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:

  1. Make changes to any setting
  2. Click Save Changes button at the top or bottom of the page
  3. Wait for the success confirmation message
  4. 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

  1. Click Export button (download icon) in the settings header
  2. Browser downloads momentum-settings-[timestamp].json
  3. 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

  1. Click Import button (upload icon) in the settings header
  2. Select a previously exported JSON file
  3. Choose import mode:
    • Replace Mode: Overwrites ALL existing settings (default)
    • Merge Mode: Updates only settings present in the file
  4. Review the confirmation dialog
  5. 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:

  1. Structure Validation: Checks JSON format and schema
  2. Version Compatibility: Ensures compatible version
  3. Data Validation: Validates all setting values
  4. 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

  1. Schedule: Export settings monthly or before major changes
  2. Naming Convention: momentum-settings-[environment]-[YYYY-MM-DD].json
  3. Storage: Store in secure, version-controlled location (Git, AWS S3)
  4. Testing: Periodically test imports in staging environment

Change Management

  1. Test First: Make changes in staging/test environment
  2. Export Before: Always export before making major changes
  3. Small Batches: Update one section at a time
  4. Verify: Check frontend to confirm changes applied correctly
  5. Document: Keep a change log for compliance/auditing

Security

  1. Admin Only: Never share admin credentials
  2. Secure Exports: Encrypt export files if storing externally
  3. Audit Trail: Review audit logs regularly (available via database)
  4. Production Changes: Require peer review for production setting changes

Performance

  1. Cache Aware: Settings are cached for 5 minutes (updates may take up to 5 min to propagate)
  2. Custom CSS: Keep custom CSS minimal for performance
  3. Image URLs: Use CDN URLs for logos and favicons
  4. Testing: Test performance impact of custom CSS/HTML

Troubleshooting

Settings Not Saving

Symptoms: Click save, but changes don’t persist

Solutions:

  1. Check browser console for JavaScript errors
  2. Verify you have admin role (cognito:groups claim)
  3. Check that API Gateway endpoints are healthy
  4. Verify Lambda functions are not timing out
  5. Check Aurora database connectivity

Changes Not Appearing

Symptoms: Settings saved but not visible on frontend

Solutions:

  1. Cache Delay: Wait up to 5 minutes for cache to expire
  2. Hard Refresh: Clear browser cache (Cmd+Shift+R / Ctrl+Shift+R)
  3. Redis Cache: Check Redis ElastiCache cluster health
  4. CDN: CloudFront cache may delay updates (30-60 seconds)

Import Failing

Symptoms: Import button shows error

Solutions:

  1. Validate JSON: Use a JSON validator (jsonlint.com)
  2. Check Version: Ensure export version matches (currently 1.0.0)
  3. Check Size: Files over 1MB may fail
  4. Encoding: Ensure UTF-8 encoding
  5. Review Logs: Check CloudWatch logs for specific validation errors

Maintenance Mode Stuck

Symptoms: Cannot disable maintenance mode

Solutions:

  1. Direct Database: Update via database query if needed:
    UPDATE platform_settings
    SET value = 'false'
    WHERE section = 'general' AND key = 'maintenance_mode';
    
  2. Cache Clear: Manually flush Redis cache
  3. API Direct: Use curl to update via API (bypass frontend)

Validation Errors

Symptoms: “Validation failed” error on save

Solutions:

  1. Read Error Message: Details which field failed and why
  2. 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
  3. 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"}'


Support

Issues or Questions?


Back to top

Momentum LMS © 2025. Distributed under the MIT license.