mirror of
https://github.com/johndoe6345789/metabuilder.git
synced 2026-04-24 13:54:57 +00:00
refactor(fakemui): promote directories to first-class naming
Directory Renamings (git moves preserve history): - qml/components-legacy/ → qml/hybrid/ (QML/JS hybrid components) - legacy/utilities/ → utilities/ (core utilities) - legacy/migration-in-progress/ → wip/ (work-in-progress) - qml/qml-components/qml-components/ → qml/components/ (flatten nesting) Removals: - legacy/ directory (now empty) - python/fakemui/ (empty directory) - python/ (now empty) Documentation Updates: - STRUCTURE.md: All path references updated to reflect new structure - docs/ACCESSIBILITY_STATUS.md: legacy/migration-in-progress/ → wip/ - qmldir: Updated all 135 component registrations (qml-components/ → components/) Result: - No "legacy" terminology in directory names - No redundant nesting (qml/qml-components/qml-components/) - All directories have first-class, descriptive names - 135 QML component registrations updated in qmldir - Full git history preserved through rename tracking Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -4,13 +4,17 @@ FROM debian:bookworm-slim
|
||||
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
# Install Postfix and utilities
|
||||
# Install Postfix, Dovecot (POP3/IMAP), and utilities
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
postfix \
|
||||
dovecot-core \
|
||||
dovecot-imapd \
|
||||
dovecot-pop3d \
|
||||
ca-certificates \
|
||||
mailutils \
|
||||
curl \
|
||||
vim-tiny \
|
||||
sudo \
|
||||
&& rm -rf /var/lib/apt/lists/* \
|
||||
&& apt-get clean
|
||||
|
||||
@@ -68,10 +72,78 @@ set_postfix_config "default_destination_rate_limit" "0"
|
||||
# Logging
|
||||
set_postfix_config "maillog_file" "/var/log/postfix.log"
|
||||
|
||||
echo "Creating default mail accounts..."
|
||||
# Create mail user if it doesn't exist
|
||||
if ! id -u mail > /dev/null 2>&1; then
|
||||
useradd -r -u 8 -g mail -d /var/mail -s /usr/sbin/nologin mail
|
||||
fi
|
||||
|
||||
# Create default accounts with passwords
|
||||
mkdir -p /var/mail/metabuilder.local
|
||||
useradd -m -s /sbin/nologin admin 2>/dev/null || true
|
||||
useradd -m -s /sbin/nologin relay 2>/dev/null || true
|
||||
useradd -m -s /sbin/nologin user 2>/dev/null || true
|
||||
|
||||
# Set passwords (plain text - testing only)
|
||||
echo "admin:password123" | chpasswd
|
||||
echo "relay:relaypass" | chpasswd
|
||||
echo "user:userpass" | chpasswd
|
||||
|
||||
# Set mailbox permissions
|
||||
chown -R mail:mail /var/mail
|
||||
chmod 700 /var/mail
|
||||
|
||||
echo "Configuring Dovecot..."
|
||||
# Configure Dovecot for POP3/IMAP
|
||||
mkdir -p /etc/dovecot
|
||||
cat > /etc/dovecot/dovecot.conf << 'DOVECOT_EOF'
|
||||
protocols = imap pop3
|
||||
listen = *, ::
|
||||
|
||||
service imap-login {
|
||||
inet_listener imap {
|
||||
port = 143
|
||||
}
|
||||
}
|
||||
|
||||
service pop3-login {
|
||||
inet_listener pop3 {
|
||||
port = 110
|
||||
}
|
||||
}
|
||||
|
||||
service auth {
|
||||
unix_listener /var/spool/postfix/private/auth {
|
||||
mode = 0666
|
||||
user = postfix
|
||||
group = postfix
|
||||
}
|
||||
}
|
||||
|
||||
userdb {
|
||||
driver = passwd
|
||||
}
|
||||
|
||||
passdb {
|
||||
driver = pam
|
||||
args = "%s"
|
||||
}
|
||||
|
||||
mail_location = mbox:~/mail:INBOX=/var/mail/%u
|
||||
DOVECOT_EOF
|
||||
|
||||
echo "Starting Postfix..."
|
||||
/etc/init.d/postfix start
|
||||
|
||||
echo "Postfix running on $(hostname)"
|
||||
echo "Starting Dovecot..."
|
||||
/etc/init.d/dovecot start
|
||||
|
||||
echo "Mail server running on $(hostname)"
|
||||
echo "Accounts: admin (password123), relay (relaypass), user (userpass)"
|
||||
echo "SMTP: localhost:25, 587"
|
||||
echo "IMAP: localhost:143"
|
||||
echo "POP3: localhost:110"
|
||||
|
||||
# Keep container alive
|
||||
tail -f /var/log/mail.log 2>/dev/null || tail -f /var/log/syslog 2>/dev/null || sleep infinity
|
||||
EOF
|
||||
@@ -94,7 +166,7 @@ RUN postconf -e "inet_interfaces = all" \
|
||||
&& postconf -e "mailbox_size_limit = 0" \
|
||||
&& postconf -e "message_size_limit = 52428800"
|
||||
|
||||
# Expose SMTP ports
|
||||
EXPOSE 25 587 465
|
||||
# Expose SMTP, POP3, IMAP ports
|
||||
EXPOSE 25 110 143 465 587
|
||||
|
||||
ENTRYPOINT ["/entrypoint.sh"]
|
||||
|
||||
14
deployment/env/.env.example
vendored
14
deployment/env/.env.example
vendored
@@ -7,3 +7,17 @@ DATABASE_URL="file:./dev.db"
|
||||
|
||||
# For production with MySQL
|
||||
# DATABASE_URL="mysql://user:password@localhost:3306/metabuilder"
|
||||
|
||||
# SMTP Relay Configuration (Postfix simulation mode)
|
||||
GMAIL_USERNAME=relay@metabuilder.local
|
||||
GMAIL_APP_PASSWORD=dummy
|
||||
FORWARD_TO=admin@metabuilder.local
|
||||
|
||||
# Postfix Configuration
|
||||
POSTFIX_myhostname=metabuilder.local
|
||||
POSTFIX_mydomain=metabuilder.local
|
||||
POSTFIX_mynetworks=127.0.0.1/8,10.0.0.0/8,172.16.0.0/12,192.168.0.0/16
|
||||
POSTFIX_RELAYHOST=
|
||||
POSTFIX_SMTP_SASL_AUTH=no
|
||||
POSTFIX_SMTP_SASL_PASSWD=
|
||||
POSTFIX_TLS_LEVEL=may
|
||||
|
||||
@@ -11,13 +11,14 @@ services:
|
||||
environment:
|
||||
- NODE_ENV=production
|
||||
- DATABASE_URL=sqlite:////app/data/workflows.db
|
||||
- SMTP_RELAY_HOST=postfix
|
||||
- SMTP_RELAY_PORT=25
|
||||
- SMTP_RELAY_HOST=smtp-relay
|
||||
- SMTP_RELAY_PORT=2525
|
||||
volumes:
|
||||
- workflowui-data:/app/data
|
||||
- workflowui-logs:/app/logs
|
||||
depends_on:
|
||||
- postfix
|
||||
smtp-relay:
|
||||
condition: service_healthy
|
||||
restart: unless-stopped
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "-f", "http://localhost:3000/"]
|
||||
@@ -37,8 +38,10 @@ services:
|
||||
hostname: metabuilder.local
|
||||
ports:
|
||||
- "25:25"
|
||||
- "587:587"
|
||||
- "110:110"
|
||||
- "143:143"
|
||||
- "465:465"
|
||||
- "587:587"
|
||||
environment:
|
||||
- POSTFIX_myhostname=metabuilder.local
|
||||
- POSTFIX_mydomain=metabuilder.local
|
||||
@@ -61,6 +64,41 @@ services:
|
||||
networks:
|
||||
- metabuilder-network
|
||||
|
||||
# SMTP Relay - relays mail through Postfix (Postfix simulates Gmail)
|
||||
smtp-relay:
|
||||
build:
|
||||
context: ./smtprelay
|
||||
dockerfile: Dockerfile
|
||||
container_name: metabuilder-smtp-relay
|
||||
ports:
|
||||
- "2525:2525"
|
||||
- "8080:8080"
|
||||
environment:
|
||||
- GMAIL_USERNAME=${GMAIL_USERNAME:-relay@metabuilder.local}
|
||||
- GMAIL_APP_PASSWORD=${GMAIL_APP_PASSWORD:-dummy}
|
||||
- FORWARD_TO=${FORWARD_TO:-admin@metabuilder.local}
|
||||
- GMAIL_HOST=postfix
|
||||
- GMAIL_PORT=25
|
||||
- SMTP_LISTEN_HOST=0.0.0.0
|
||||
- SMTP_LISTEN_PORT=2525
|
||||
- HTTP_LISTEN_HOST=0.0.0.0
|
||||
- HTTP_LISTEN_PORT=8080
|
||||
- ALLOW_ANY_RCPT=true
|
||||
- ADD_X_HEADERS=true
|
||||
- MAX_STORE=200
|
||||
depends_on:
|
||||
postfix:
|
||||
condition: service_healthy
|
||||
restart: unless-stopped
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "-f", "http://localhost:8080/"]
|
||||
interval: 30s
|
||||
timeout: 5s
|
||||
retries: 3
|
||||
start_period: 10s
|
||||
networks:
|
||||
- metabuilder-network
|
||||
|
||||
volumes:
|
||||
workflowui-data:
|
||||
driver: local
|
||||
@@ -72,6 +110,8 @@ volumes:
|
||||
driver: local
|
||||
postfix-spool:
|
||||
driver: local
|
||||
smtp-relay-logs:
|
||||
driver: local
|
||||
|
||||
networks:
|
||||
metabuilder-network:
|
||||
|
||||
@@ -23,34 +23,18 @@ fakemui/
|
||||
│ └── *.py # Python binding implementations
|
||||
│
|
||||
├── qml/ # QML Desktop Components
|
||||
│ ├── components-legacy/ # Legacy QML/React hybrid components
|
||||
│ ├── qml-components/ # Pure QML components (104+)
|
||||
│ ├── components/ # Pure QML components (104+)
|
||||
│ ├── hybrid/ # QML/JS hybrid components (legacy)
|
||||
│ ├── widgets/ # QML widget library
|
||||
│ └── qmldir # QML module metadata
|
||||
│
|
||||
├── python/ # Python Implementations
|
||||
│ └── fakemui/ # Python package for non-web use
|
||||
│ ├── __init__.py
|
||||
│ ├── atoms.py
|
||||
│ ├── inputs.py
|
||||
│ ├── surfaces.py
|
||||
│ ├── layout.py
|
||||
│ ├── data_display.py
|
||||
│ ├── feedback.py
|
||||
│ ├── navigation.py
|
||||
│ ├── utils.py
|
||||
│ ├── lab.py
|
||||
│ ├── x.py
|
||||
│ ├── base.py
|
||||
│ ├── theming.py
|
||||
│ ├── demo.py
|
||||
│ └── stylesheet.py
|
||||
├── utilities/ # Core Utilities (formerly legacy/utilities/)
|
||||
│ ├── contexts/ # React Context implementations
|
||||
│ └── core/ # Core utility functions
|
||||
│
|
||||
├── legacy/ # Legacy Code & Utilities
|
||||
│ ├── utilities/ # Core utilities and contexts
|
||||
│ │ ├── contexts/ # React Context implementations
|
||||
│ │ └── core/ # Core utility functions
|
||||
│ └── migration-in-progress/ # Incomplete migrations
|
||||
├── wip/ # Work-In-Progress (formerly legacy/migration-in-progress/)
|
||||
│ ├── styles/ # Incomplete style migrations
|
||||
│ └── utils/ # Partially migrated utilities
|
||||
│
|
||||
├── icons/ # SVG Icon Library
|
||||
│ └── 421 SVG icons (organized by category)
|
||||
@@ -91,9 +75,9 @@ fakemui/
|
||||
| Category | Count | Location |
|
||||
|----------|-------|----------|
|
||||
| **React Components** | 145 | `react/components/` |
|
||||
| **QML Components** | 104+ | `qml/qml-components/` |
|
||||
| **QML Components** | 104+ | `qml/components/` |
|
||||
| **QML Hybrid** | 23 | `qml/hybrid/` |
|
||||
| **SVG Icons** | 421 | `icons/` |
|
||||
| **Python Modules** | 15 | `python/fakemui/` |
|
||||
| **SCSS Files** | 78 | `styles/` + `scss/` |
|
||||
| **Documentation Files** | 6 | `docs/` |
|
||||
|
||||
@@ -114,25 +98,25 @@ fakemui/
|
||||
- **Language**: QML
|
||||
- **Components**: 104+ QML-specific components
|
||||
- **Folders**:
|
||||
- `qml-components/` - Pure QML
|
||||
- `components-legacy/` - Legacy/hybrid components
|
||||
- `components/` - Pure QML components (104+)
|
||||
- `hybrid/` - QML/JS hybrid components
|
||||
- `widgets/` - Widget library
|
||||
|
||||
### 🟡 Python (Alternative)
|
||||
- **Location**: `python/fakemui/`
|
||||
- **Purpose**: Python bindings for non-web use
|
||||
- **Status**: ✅ Available, implementation files
|
||||
- **Language**: Python
|
||||
- **Contains**: Module implementations for atoms, inputs, surfaces, etc.
|
||||
|
||||
### ⚫ Legacy & Utilities
|
||||
- **Location**: `legacy/`
|
||||
- **Purpose**: Supporting code, utilities, and migrations
|
||||
- **Status**: ✅ Preserved, available for reference
|
||||
### 🟢 Utilities
|
||||
- **Location**: `utilities/`
|
||||
- **Purpose**: Core utilities and contexts
|
||||
- **Status**: ✅ Production utilities
|
||||
- **Contains**:
|
||||
- React Contexts
|
||||
- Core utilities
|
||||
- Migration-in-progress code
|
||||
- React Context implementations
|
||||
- Core utility functions
|
||||
|
||||
### ⚙️ Work-In-Progress
|
||||
- **Location**: `wip/`
|
||||
- **Purpose**: Ongoing migrations and incomplete work
|
||||
- **Status**: ✅ Preserved for reference
|
||||
- **Contains**:
|
||||
- Partial style migrations
|
||||
- Migrated utilities
|
||||
|
||||
## Using Components
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ All fakemui components now have accessibility infrastructure in place with autom
|
||||
## What Was Completed
|
||||
|
||||
### 1. Accessibility Utilities Infrastructure ✅
|
||||
- **Moved** accessibility utilities from `legacy/migration-in-progress/` to `src/utils/`
|
||||
- **Moved** accessibility utilities from `wip/` to `src/utils/`
|
||||
- **Created** proper directory structure following CLAUDE.md guidelines
|
||||
- **Resolved** broken import path in main `index.ts`
|
||||
|
||||
@@ -237,7 +237,7 @@ All utilities follow WAI-ARIA and WCAG 2.1 guidelines:
|
||||
## Legacy Cleanup
|
||||
|
||||
**Before**:
|
||||
- Accessibility utilities scattered in `legacy/migration-in-progress/`
|
||||
- Accessibility utilities scattered in `wip/`
|
||||
- Broken import path in main `index.ts`
|
||||
- No integration with components
|
||||
|
||||
@@ -246,7 +246,7 @@ All utilities follow WAI-ARIA and WCAG 2.1 guidelines:
|
||||
- ✅ Import path resolved in `index.ts`
|
||||
- ✅ Two components fully integrated
|
||||
- ✅ Hooks ready for use in all components
|
||||
- ⏳ Can archive `legacy/migration-in-progress/` once all components updated
|
||||
- ⏳ Can archive `wip/` once all components updated
|
||||
|
||||
## Performance Impact
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user