Skip to the content.

Basic Configuration

This guide covers the fundamental concepts and setup procedures for Enveil’s environment identification system, including both traditional site configurations and cloud environment highlighting.

Configuration Hierarchy

Enveil uses a flexible two-tab interface to organize your environment rules:

Dual-Tab Structure

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  [ Site Configurations ]  [ Cloud Environments ]            β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚                                                             β”‚
β”‚  Site Configurations:                                       β”‚
β”‚  β”œβ”€β”€ Group 1: "Development Environments"                    β”‚
β”‚  β”‚   β”œβ”€β”€ Site Rule: localhost β†’ DEV (Blue)                  β”‚
β”‚  β”‚   β”œβ”€β”€ Site Rule: *.dev β†’ DEV (Blue)                      β”‚
β”‚  β”‚   └── Site Rule: dev.company.com β†’ DEV (Blue)            β”‚
β”‚  β”œβ”€β”€ Group 2: "Production Environments"                     β”‚
β”‚  β”‚   β”œβ”€β”€ Site Rule: company.com β†’ PROD (Red + Background)   β”‚
β”‚  β”‚   └── Site Rule: app.company.com β†’ PROD (Red + Background)β”‚
β”‚  └── Group 3: "Testing Environments"                        β”‚
β”‚      β”œβ”€β”€ Site Rule: test.company.com β†’ TEST (Yellow)        β”‚
β”‚      └── Site Rule: uat.company.com β†’ UAT (Orange)          β”‚
β”‚                                                             β”‚
β”‚  Cloud Environments:                                        β”‚
β”‚  β”œβ”€β”€ Environment 1: "Production AWS" (AWS China)            β”‚
β”‚  β”‚   β”œβ”€β”€ Account: prod-main (123456789012) - Red background β”‚
β”‚  β”‚   β”‚   └── Roles: Admin, ReadOnly                        β”‚
β”‚  β”‚   └── Account: prod-security (123456789013) - Orange     β”‚
β”‚  β”‚       └── Roles: SecurityAdmin, Auditor                 β”‚
β”‚  └── Environment 2: "Development AWS" (AWS China)           β”‚
β”‚      β”œβ”€β”€ Account: dev-sandbox (987654321098) - Blue         β”‚
β”‚      β”‚   └── Roles: Developer, Tester                      β”‚
β”‚      └── Account: dev-shared (987654321099) - Green         β”‚
β”‚          └── Roles: DevOps, ReadOnly                       β”‚
β”‚                                                             β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Site Configuration

Configuration Groups

Configuration groups help you organize related site rules together.

Creating Groups

  1. Click β€œAdd Group” in the Site Configurations tab
  2. Configure Group Settings:
    • Name: Descriptive identifier (e.g., β€œProduction Sites”)
    • Enable: Toggle to activate/deactivate entire group
    • Default Settings: Applied to new sites in this group

Site Portal Group Site configuration groups with multiple environment rules

Group Default Settings

Group defaults streamline adding multiple similar sites:

{
  envName: "PROD",           // Default environment name
  backgroundEnable: true,    // Enable background overlay
  flagEnable: true,          // Enable corner banner
  color: "#f44336"          // Default red for production
}

Benefits:

Group Management

Action Description Use Case
Enable/Disable Toggle entire group Temporarily disable project environments
Edit Modify group name and defaults Update team standards
Delete Remove group and all sites Clean up obsolete projects
Export Save group as JSON file Share project configurations

Site Rules

Basic Site Configuration

Each site rule defines how to identify and display an environment:

Field Description Example
Enable Toggle this specific rule βœ“
Match Pattern How to match URLs domain
Match Value What to match against localhost
Environment Name Display text DEV
Color Visual theme color #4a9eff
Position Banner corner rightTop
Banner Enable Show corner ribbon βœ“
Background Enable Show page overlay βœ—

Site Group Item Site group item showing multiple environment rules

Match Patterns Explained

1. Domain Matching (domain)

Best for: Entire websites and their subdomains

Pattern: domain
Value: example.com

Matches:
βœ“ example.com
βœ“ www.example.com
βœ“ app.example.com
βœ“ api.example.com
βœ— example.org
βœ— notexample.com

Use Cases:

2. URL Prefix Matching (urlPrefix)

Best for: Specific paths or API endpoints

Pattern: urlPrefix
Value: https://api.example.com/v1

Matches:
βœ“ https://api.example.com/v1
βœ“ https://api.example.com/v1/users
βœ“ https://api.example.com/v1/data/reports
βœ— https://api.example.com/v2
βœ— http://api.example.com/v1 (different protocol)

Use Cases:

3. Exact URL Matching (url)

Best for: Single specific pages

Pattern: url
Value: http://localhost:8080/admin

Matches:
βœ“ http://localhost:8080/admin
βœ— http://localhost:8080/admin/users
βœ— https://localhost:8080/admin
βœ— http://localhost:3000/admin

Use Cases:

4. Regular Expression (regex)

Best for: Complex pattern matching

Pattern: regex
Value: ^https?:\/\/.*\.test\.com

Matches:
βœ“ https://app.test.com
βœ“ http://api.test.com
βœ“ https://staging.test.com
βœ— https://test.com (no subdomain)
βœ— https://app.test.org (different TLD)

Common Regex Patterns:

5. Everything (Auto-Detection) (everything)

Best for: Intelligent pattern recognition

The system automatically detects the best matching approach:

Value: *                    β†’ Matches all URLs
Value: localhost            β†’ Domain matching
Value: https://api.com      β†’ URL prefix matching
Value: /^https?:\/\/.*\.dev$/ β†’ Regex matching

Cloud Environment Configuration

Overview

Cloud Environment configuration allows you to visually distinguish between different cloud provider accounts and roles on account selection pages and console interfaces.

Cloud Portal Cloud environments portal showing configured providers

Creating a Cloud Environment

  1. Switch to β€œCloud Environments” tab
  2. Click β€œAdd Provider”
  3. Select Provider Template:
    • AWS China: For *.amazonaws.cn domains
    • AWS Global: For *.aws.amazon.com domains
    • Custom: For other cloud providers
  4. Enter Environment Name: e.g., β€œProduction AWS”
  5. Click Save

Cloud Environment Configuration Cloud environment configuration with provider selection

Cloud Account Configuration

Each cloud account defines visual highlighting for specific accounts:

Field Description Example
Name Account identifier prod-main
Enable Toggle account highlighting βœ“
Background Enable Show background overlay βœ“
Background Color Account highlight color #f44336
Account Patterns URL patterns to match account domain: 123456789012
Roles Role keyword highlighting rules Admin, ReadOnly

Account Patterns

Account patterns use the same matching strategies as site configurations:

Match by Account ID (AWS):

Pattern: domain
Value: 123456789012

Match by Account Name:

Pattern: contains
Value: production-main

Match Multiple Accounts:

Pattern: regex
Value: (123456789012|987654321098)

Role Highlighting

Roles define keywords to highlight within cloud pages:

Field Description Example
Enable Toggle role highlighting βœ“
Match Pattern Matching strategy contains or regex
Match Value Keyword to highlight Administrator

Role Configuration Examples:

# Highlight Administrator roles
Match Pattern: contains
Match Value: Administrator

# Highlight multiple role patterns
Match Pattern: regex
Match Value: (Admin|PowerUser|FullAccess)

# Highlight specific role names
Match Pattern: contains
Match Value: ReadOnlyAccess

Visual Effects

Account Background Highlighting

Role Text Highlighting

AWS Account Selection Page AWS account selection page with account highlighting and role keyword emphasis

Visual Indicators

Corner Banners

Corner banners are rotated ribbons that appear in page corners:

Positions

Styling

Site Example Example of environment banner displayed on a webpage

Background Overlays

Background overlays provide subtle full-page color tinting:

Color Management

Default Color Palette

Enveil includes 10 predefined colors optimized for different environments:

Color Hex Code Typical Use
Blue #4a9eff Development
Green #4CAF50 Staging
Orange #ff9800 Testing
Red #f44336 Production
Purple #9c27b0 Special environments
Cyan #00bcd4 Integration
Yellow #ffeb3b Warning environments
Brown #795548 Legacy systems
Blue Grey #607d8b Neutral environments
Pink #e91e63 Experimental

Custom Colors

  1. Click any color circle in the left sidebar
  2. Use color picker to select custom color
  3. Enter hex codes directly
  4. Add new colors with the + button

Color Best Practices

  1. Consistent Meaning: Use same colors for similar environments across projects
  2. High Contrast: Ensure banners are visible on all backgrounds
  3. Team Standards: Establish color conventions with your team
  4. Accessibility: Consider color-blind users when choosing colors
  5. Cloud Safety: Use red/orange for production cloud accounts as warning

Configuration Examples

Simple Development Setup

{
  "name": "Local Development",
  "sites": [
    {
      "matchPattern": "domain",
      "matchValue": "localhost",
      "envName": "DEV",
      "color": "#4a9eff",
      "Position": "rightTop",
      "flagEnable": true,
      "backgroudEnable": false
    }
  ]
}

Multi-Environment Project

{
  "name": "Company Project",
  "sites": [
    {
      "matchPattern": "domain",
      "matchValue": "dev.company.com",
      "envName": "DEV",
      "color": "#4a9eff"
    },
    {
      "matchPattern": "domain", 
      "matchValue": "staging.company.com",
      "envName": "STAGING",
      "color": "#ff9800"
    },
    {
      "matchPattern": "domain",
      "matchValue": "company.com",
      "envName": "PROD",
      "color": "#f44336",
      "backgroudEnable": true
    }
  ]
}

AWS Cloud Environment Setup

{
  "name": "Production AWS",
  "provider": "aws-cn",
  "accounts": [
    {
      "name": "prod-main",
      "backgroundColor": "#f44336",
      "backgroundEnable": true,
      "accountPatterns": [
        {
          "matchPattern": "domain",
          "matchValue": "123456789012"
        }
      ],
      "roles": [
        {
          "matchPattern": "contains",
          "matchValue": "Administrator"
        },
        {
          "matchPattern": "contains",
          "matchValue": "FullAccess"
        }
      ]
    }
  ]
}

Testing Your Configuration

Verification Steps

  1. Save Configuration: Ensure all changes are saved
  2. Open Test URLs: Visit configured domains in new tabs
  3. Check Visual Indicators: Verify banners and overlays appear
  4. Test Cloud Pages: For cloud environments, test both account selection and console pages
  5. Verify Role Highlighting: Check that role keywords are highlighted in yellow
  6. Test Edge Cases: Try subdomains, different paths
  7. Verify Exclusions: Confirm non-matching URLs show no indicators

Common Issues

Problem Cause Solution
No banner appears Pattern doesn’t match URL Check match pattern and value
Wrong color shows Multiple rules match Check rule order and specificity
Banner in wrong position Incorrect position setting Verify position configuration
Cloud highlighting not working Wrong provider template Verify AWS region selection
Role keywords not highlighted Role not enabled Check role enable status
Background too strong High opacity Background uses fixed opacity levels

Next Steps

Once you’ve mastered basic configuration:


Ready for more? Continue to Configuration Guide to unlock Enveil’s full potential.