Mail Server Factory Website - Development Guide

Build & Development Commands

Local Development

# Primary method: Start Jekyll website with Docker Compose
./start-website.sh

# Manual Docker method
docker-compose up --build -d

# View logs
docker-compose logs -f

# Stop website
./stop-website.sh

# Direct Jekyll (if running locally without Docker)
bundle exec jekyll serve --host 0.0.0.0 --port 4000 --livereload --drafts --future

# Build static site
bundle exec jekyll build

Testing

# Run all translation tests (comprehensive)
./tests/run-all-translation-tests.sh

# Individual test suites
node tests/translation-validator.js                    # Brand names & completeness
node tests/unit/translation-unit-tests.js               # Unit tests
node tests/integration/language-selector-integration-tests.js  # Integration (requires jsdom)
node tests/e2e/translation-e2e-tests.js                # End-to-end workflow

# Browser testing (run after starting website)
# Open http://localhost:4000 and run in console:
window.websiteTester.runAllTests()
window.websiteTester.testLanguageSelector()

Dependencies

# Required for tests
npm install js-yaml

# Optional for integration tests
npm install jsdom

Project Architecture

Technology Stack

Key Jekyll Features Used

File Organization & Structure

Core Jekyll Files

Frontend Assets

Development Infrastructure

Testing Suite

Code Style & Conventions

SCSS/CSS Architecture

JavaScript Patterns

Liquid/Jekyll Templates

Naming Conventions

Internationalization (i18n) System

Supported Languages (28 total)

Translation Architecture

Translation Files

Translation Policy (CRITICAL)

NEVER translate these brand names (must stay English across ALL languages):

NEVER translate technical content:

  1. File paths: Examples/Ubuntu_22.json (must stay exactly as is)
  2. Code samples and commands
  3. Version numbers: 2.0.21, 8.14.3, 17
  4. Architecture badges and technical terms
  5. Statistics numbers: 12 Distributions, 100%, 47 Tests

Implementation Details

Development Workflow & Gotchas

Docker Development Best Practices

Common Gotchas

  1. Port Conflicts: The start script handles this automatically by finding free ports
  2. Translation Inconsistencies: Always run tests after modifying translations.yml
  3. Brand Name Violations: Use the automated fix scripts to prevent accidental translations
  4. JavaScript Modules: Files load in specific order - translations.js must load before language-selector.js
  5. RTL Languages: Language selector automatically sets dir="rtl" for ar, fa, he
  6. Caching: Browser cache can prevent seeing translation changes - use hard refresh

Adding New Languages

  1. Add to _config.yml languages array
  2. Add metadata to _data/languages.yml
  3. Add complete translations to _data/translations.yml (259+ keys)
  4. Run ./tests/run-all-translation-tests.sh
  5. Fix any brand name issues with python3 fix-brand-names.py

Content Updates

After changing _data/translations.yml:

# Validate and fix common issues
python3 fix-brand-names.py
python3 fix-technical-content.py
./tests/run-all-translation-tests.sh

Performance Considerations

Accessibility Requirements

Deployment Notes