Admin Console


The Admin Console is a web-based administrative interface that allows you to manage and configure various aspects of your Vactory Next project without needing to modify code or redeploy. It provides a user-friendly way to control system features, security settings, and URL redirections.

Accessing the Admin Console

To access the Admin Console:

  1. Navigate to /admin in your browser
  2. Ensure your IP address is included in the ALLOWED_IPS environment variable
  3. Log in using credentials defined in the ADMIN_CONSOLE_BASICAUTH_USERS environment variable

The console consists of two main sections: Features and Redirects.

Features

The Features section allows you to enable, disable, and configure various system functionalities through feature flags. These flags are organized into logical groups:

Managing Feature Flags

  • Export Config: Click the "Export Config" button to download your current feature flag configuration
  • Sync: When you modify the packages/console/src/database/flags.ts file, click the "Sync" button to update the interface with new flags
  • Database Storage: Any changes made to flags in the Admin Console are automatically saved to apps/**/database/flags-db.json

Available Feature Groups

Shield Protection

  • Enable Shield: Activate basic HTTP authentication to protect your entire site
  • Username/Password: Credentials for shield authentication
  • Paths: Specific paths where shield protection should be applied
  • Project Menus: Define machine names of menus used in your project (comma-separated). If left empty, the menus will be loaded from the menus configuration in project.config.js. If you specify values here, they will override the project config settings.

Security & Content Security Policy (CSP)

Configure Content Security Policy directives to control which resources can be loaded:

  • script-src: Allowed script sources (CDNs, external scripts)
  • style-src: Allowed stylesheet sources
  • img-src: Allowed image sources
  • font-src: Allowed font sources
  • frame-src: Allowed iframe sources (embeds)
  • connect-src: Allowed connection sources (APIs, websockets)
  • media-src: Allowed media sources (videos, audio)

Language Settings

  • Default Language: Set the primary language for your site
  • Enable Switch Language: Allow users to change language

Captcha Protection

  • Enable Captcha: Activate reCAPTCHA on forms
  • Site Key: Your reCAPTCHA site key for verification

System Behavior

  • Maintenance Mode: Enable to show maintenance page to visitors
  • Catch Fetch Errors: Handle and log API request failures
  • Enable Screen Stats: Show a popup interface that allows activating design mode and displaying the grid system overlay on your frontend for development purposes

Offline Functionality

  • Enable Offline: Activate offline capabilities that rely on cached pages stored in Redis
  • Show Offline Message: Display custom message when offline
  • Offline Message: Customizable text shown during offline mode

Analytics & Tracking

  • Google Search Console ID: Verification ID for Google Search Console
  • Enable GTM: Activate Google Tag Manager
  • GTM ID: Your Google Tag Manager container ID

Redirects

The Redirects section allows you to manage URL redirections by uploading a CSV file. This is particularly useful for:

  • Migrating from old URLs to new ones
  • Maintaining SEO rankings during site restructuring
  • Creating friendly URLs for marketing campaigns

CSV Format

Your CSV file should follow this structure:

/en/from-this,/en/to-this
/old-page,/new-page
/blog/old-post,/blog/new-post

Each line represents a redirect rule with:

  • First column: Source URL (the old URL to redirect from)
  • Second column: Destination URL (the new URL to redirect to)

Usage

  1. Prepare your CSV file with the redirect mappings
  2. Upload the file through the Redirects interface
  3. The uploaded CSV will be saved to apps/**/public/redirects/redirects.csv
  4. The system will process and apply all redirections automatically

This feature is essential for maintaining SEO value and ensuring users don't encounter broken links during site migrations or restructuring.