42 Commits

Author SHA1 Message Date
William Valentin
c48cd87d16 feat(frontend): add theme switcher with light dark and system modes
Some checks failed
Build Multi-Arch Container Image / test (push) Has been cancelled
Build Multi-Arch Container Image / build-and-push (push) Has been cancelled
Build Multi-Arch Container Image / security-scan (push) Has been cancelled
Build Multi-Arch Container Image / deploy-staging (push) Has been cancelled
Build Multi-Arch Container Image / deploy-production (push) Has been cancelled
Nightly Build / notify-results (push) Has been cancelled
Nightly Build / check-changes (push) Has been cancelled
Nightly Build / nightly-tests (3.10) (push) Has been cancelled
Nightly Build / nightly-tests (3.11) (push) Has been cancelled
Nightly Build / nightly-tests (3.12) (push) Has been cancelled
Nightly Build / nightly-tests (3.8) (push) Has been cancelled
Nightly Build / nightly-tests (3.9) (push) Has been cancelled
Nightly Build / build-nightly (push) Has been cancelled
Nightly Build / performance-test (push) Has been cancelled
Nightly Build / security-scan-nightly (push) Has been cancelled
Nightly Build / cleanup-old-nightlies (push) Has been cancelled
2025-09-21 20:28:33 -07:00
William Valentin
f38e0c1276 fix: Resolve lint errors in validate_config.py
- Fix E501 line too long errors by breaking long lines appropriately
- Fix F541 f-string without placeholders error
- Add proper type annotations for mypy compatibility
- Suppress false positive bandit security warning for valid host check
- Apply black and isort formatting fixes

All flake8, mypy, black, isort, and bandit checks now pass.
2025-09-15 02:35:53 -07:00
William Valentin
0f891aab2d chore: Remove temporary .env.example.new file 2025-09-15 02:26:34 -07:00
William Valentin
e44234805c docs: Update documentation index with CI/CD references
- Add CI/CD Secrets Setup guide to docs index
- Add CI/CD Workflows documentation reference
- Add quick start section for CI/CD setup
- Clean up temporary files
2025-09-15 02:26:23 -07:00
William Valentin
03fa856199 feat: Add CI/CD secrets configuration and documentation
- Add comprehensive CI/CD secrets section to .env.example
- Create detailed CI-CD-SECRETS.md guide with:
  - Step-by-step secret setup instructions
  - Container registry authentication examples
  - PyPI token configuration
  - GitHub integration setup
  - Security best practices
  - Troubleshooting guide
  - Workflow-specific requirements

Includes support for:
- Docker Hub, GitLab, GitHub container registries
- Automated PyPI publishing
- Slack/Discord notifications
- Kubernetes deployment secrets
- Security scanning integration

Updated .env template with placeholder values and detailed comments.
2025-09-15 02:26:02 -07:00
William Valentin
25666a76cf feat: Add comprehensive Gitea CI/CD workflows for multi-arch container builds
- Add build-container.yml: Main build pipeline with multi-arch support
- Add pr-check.yml: Pull request validation with comprehensive testing
- Add release.yml: Automated release pipeline with security scanning
- Add nightly.yml: Daily builds with performance testing
- Add health_check.sh: Container health validation script
- Add setup-ci.sh: Local CI/CD environment setup script
- Add comprehensive CI/CD documentation

Features:
- Multi-architecture builds (linux/amd64, linux/arm64)
- Security scanning with Trivy
- Automated PyPI publishing for releases
- Container registry integration
- Performance testing and validation
- Artifact management and cleanup
- Build caching and optimization

Supports full development workflow from PR to production deployment.
2025-09-15 02:04:07 -07:00
William Valentin
1f0604cba6 make: add docker buildx multi-arch targets (linux/amd64, linux/arm64) with setup, push, and local build 2025-09-15 01:31:53 -07:00
William Valentin
b544399f9c backend: remove __main__ runner; typing: fix mypy across core and routes; tooling: use uv for pytest in pre-commit; security: narrow broad except in config; mypy: relax untyped decorator check for backend.app.main 2025-09-15 01:25:25 -07:00
William Valentin
be520c14e9 feat(k8s): Update ingress host and service port, set VPA
controlledValues to RequestsOnly
2025-09-15 01:00:03 -07:00
William Valentin
ec68e52e28 fix: Use uv to run pytest in pre-commit hook 2025-09-15 00:59:44 -07:00
William Valentin
a0ae5f869e feat(frontend): add dedicated /cli page, nav links, and CTA buttons; remove CLI modals for leaner UX
- New CLI page at /cli with detailed usage and improved Quick Start card header
- Add CLI link to navbars and small ‘Try the CLI’ CTAs on Home & Templates
- Remove CLI modals and unused showCliModal() handler (keep_small_simple)
- Self-host Bootstrap and Font Awesome; add OSI logo and GPL notice in footers
- Dockerfile: verify vendor assets exist at build time
- Minor a11y/contrast and heading-order cleanups (100 a11y)
2025-09-15 00:47:31 -07:00
William Valentin
9caf95bb7a refactor: simplify k8s deployment to pure kubectl
- Remove kustomization.yaml and all kustomize references
- Remove deploy-pi.sh and vpa-pi-helper.sh helper scripts
- Remove redundant ConfigMap from vpa.yaml
- Update README.md to focus on standard kubectl commands
- Keep deployment simple with just YAML files and kubectl
- Maintain Pi 5 optimizations and VPA functionality
- No complex tooling required for deployment
2025-09-14 23:18:04 -07:00
William Valentin
e2788cb634 fix: add standard mobile-web-app-capable meta tag
- Add mobile-web-app-capable meta tag to all HTML templates
- Fixes deprecation warning for apple-mobile-web-app-capable
- Maintains backwards compatibility with Apple devices
- Updates index.html, templates.html, and editor.html
2025-09-14 22:50:17 -07:00
William Valentin
62a189ef98 fix: resolve .env file parsing issues in Makefile
- Replace shell sourcing with grep/cut parsing to avoid JSON array interpretation
- Strip http:// prefix from registry URLs for Docker commands
- Fix docker-tag to use correct image name (unitforge-unitforge-prod)
- All make commands now work without shell parsing errors
2025-09-14 19:43:00 -07:00
William Valentin
4132399533 fix: resolve uv installation in Docker container
- Fix uv installation path from /root/.cargo/bin to /root/.local/bin
- Move uv and uvx binaries to /usr/local/bin for all users
- Fix build order to copy source before installing package
- Container now starts successfully with uv available
2025-09-14 19:36:31 -07:00
William Valentin
3fd7b1ca53 docs: consolidate and clean up documentation
- Remove redundant files: AGENTS.md, INSTRUCTIONS.yaml, instructions.mdc
- Create comprehensive CONTRIBUTING.md with all development guidelines
- Add simple documentation index at docs/README.md
- Update main README to reference consolidated docs
- Remove implementation notes and release summaries
- Keep only essential, current documentation
2025-09-14 19:29:21 -07:00
William Valentin
302a3d545c docs: remove legacy Docker networking workarounds from README files
Main README.md changes:
- Update Python requirement from 3.8+ to 3.11+ (matching Dockerfile)
- Remove docker-dev-host and legacy networking workarounds
- Add container registry workflow documentation
- Simplify installation instructions (remove duplicate manual setup)
- Update Docker section to focus on modern container workflows
- Add registry-push and registry commands to examples
- Streamline project evolution section

Docker README.md changes:
- Remove all legacy networking workaround documentation
- Remove docker-dev-host, docker-prod-host, docker-reset targets
- Remove docker-build-legacy references
- Add modern container registry workflow section
- Update troubleshooting to focus on common Docker issues
- Add uv-optimized build information
- Update status from 'networking issues' to 'modern Docker support'
- Add container registry authentication and workflow docs

Both files now reflect the modern, clean Docker setup without legacy workarounds.
2025-09-14 17:35:36 -07:00
William Valentin
1fb8168b6a refactor: remove legacy support from Docker and Makefile
Dockerfile changes:
- Replace pip with uv package manager for faster builds
- Remove build-essential and git dependencies
- Use pyproject.toml instead of requirements.txt
- Add uv installation and virtual environment setup
- Modernize environment variables and caching
- Fix hadolint warnings (add --no-install-recommends and pipefail)

Makefile changes:
- Remove docker-build-legacy target (legacy builder)
- Remove docker-dev-host and docker-prod-host targets (networking workarounds)
- Remove docker-reset target (networking fixes)
- Remove docker-clean-legacy target (duplicate functionality)
- Clean up help output and reduce maintenance overhead

This modernizes the build system and removes workarounds for older Docker versions and networking issues.
2025-09-14 17:29:21 -07:00
William Valentin
00a71165ac feat: add container registry targets to Makefile
- Add docker-tag, docker-push, docker-pull, docker-login targets
- Add registry-build and registry-push convenience targets
- Add docker-clean-registry for cleanup
- Integrate with CONTAINER_REGISTRY_URL and CONTAINER_TAG environment variables
- Support fallback to default Gitea registry URL when .env is missing
- Update status target to show registry configuration
- Add dual tagging (specific tag + latest)
2025-09-14 17:25:31 -07:00
William Valentin
2d7bd53767 feat: add container registry configuration support
- Add CONTAINER_REGISTRY_URL and CONTAINER_TAG environment variables
- Configure for Gitea registry at http://gitea-http.taildb3494.ts.net/will/unitforge
- Add proper documentation and section formatting in .env.example
- Set default tag to 'latest'
2025-09-14 17:25:20 -07:00
William Valentin
3002003b6f fix(lint): resolve line length violations in main.py
- Split long error message strings to meet 88 character limit
- Maintain readability while conforming to flake8 standards
- Fix file upload validation error messages
2025-09-14 17:03:51 -07:00
William Valentin
e313de31e3 docs(readme): update Docker section with current status and workarounds
- Document Docker networking issues in main README
- Add host networking workaround instructions
- Update Docker command examples with current status
- Recommend native development as primary option
- Reference docker/README.md for detailed troubleshooting
- Update quick start section with networking alternatives
2025-09-14 17:00:03 -07:00
William Valentin
348a9817a3 docs(docker): add comprehensive Docker documentation and troubleshooting
- Create docker/README.md with complete setup guide
- Document known networking issues and workarounds
- Provide alternative deployment strategies
- Include troubleshooting steps for common problems
- Explain host networking workaround usage
- Recommend native development as primary option
2025-09-14 16:59:55 -07:00
William Valentin
7131b2ed17 enhance(make): improve Docker commands and add networking workarounds
- Add docker-build-legacy for legacy builder support
- Add docker-dev-host and docker-prod-host for host networking
- Remove complex commands for unused services
- Add docker-reset for networking troubleshooting
- Simplify Docker workflow for core functionality
- Better error handling and documentation
2025-09-14 16:59:48 -07:00
William Valentin
82455db3c7 feat(docker): add host networking workaround for bridge network issues
- Add docker-compose.host-network.yml for networking problems
- Provides workaround for 'operation not supported' veth pair errors
- Enables Docker usage when bridge networking fails
- Documents alternative deployment method
2025-09-14 16:59:40 -07:00
William Valentin
4883981246 refactor(docker): simplify docker-compose.yml configuration
- Remove deprecated version field
- Keep only essential services: dev, prod, cli
- Remove complex services: test, docs, nginx, monitoring
- Remove custom networks for simplicity
- Focus on core application containers
- Update service configurations for simplified Dockerfile
2025-09-14 16:59:30 -07:00
William Valentin
74cee9e4cb fix(docker): simplify Dockerfile and fix build issues
- Convert to single-stage build for simplicity
- Fix AS to as casing warnings
- Remove uv dependency, use pip for compatibility
- Streamline Python package installation
- Remove complex multi-stage targets
- Focus on core application functionality
2025-09-14 16:59:22 -07:00
William Valentin
d15dffd120 fix: address linting and security warnings in configuration system
- Add type annotations for mypy compliance
- Add nosec comment for intentional bind-all-interfaces configuration
- Add explanatory comment for exception handling
- Minor formatting improvements
2025-09-14 15:58:35 -07:00
William Valentin
1c1f5c1f39 feat: add python-dotenv dependency for .env file support
- Add python-dotenv>=0.19.0 to project dependencies
- Enable automatic loading of environment variables from .env files
- Support development and production environment configuration
2025-09-14 15:58:24 -07:00
William Valentin
769175e32a docs: add implementation summary for environment variable system
- Document complete implementation overview and file changes
- List key features including configuration management and template integration
- Provide usage examples and testing validation results
- Include migration path and future enhancement suggestions
- Summarize benefits: deployment flexibility, customization, security, container readiness
2025-09-14 15:58:15 -07:00
William Valentin
6841bce2e7 docs: add comprehensive environment variable documentation
- Document all 70+ configuration options with descriptions and defaults
- Provide examples for development, production, Docker, and Kubernetes
- Include best practices for security, deployment, and troubleshooting
- Add migration guide for existing deployments
- Document validation system and debugging techniques
- Cover template integration and Python code usage patterns
2025-09-14 15:58:07 -07:00
William Valentin
ebc5d42645 feat: add comprehensive environment configuration validation system
- Create validate_config.py script with 100+ validation checks
- Validate basic settings (URLs, emails, integers, booleans)
- Check security settings and production readiness
- Validate feature flags, performance settings, and file upload limits
- Support both .env files and direct environment variables
- Provide detailed error messages and configuration suggestions
- Include environment consistency checks and best practice warnings
2025-09-14 15:57:59 -07:00
William Valentin
69f6fd1827 feat: integrate environment configuration into development workflow
- Auto-create .env file from template during setup-dev
- Add validate-config target to Makefile for configuration validation
- Update check-uv.sh to use environment variable for GitHub URL
- Provide helpful setup messages and next steps for developers
2025-09-14 15:57:50 -07:00
William Valentin
b32cfcab2d feat: add environment file support to Docker Compose
- Add env_file configuration to all services for automatic .env loading
- Enable consistent environment variable management across containers
- Support development, production, CLI, and test service configurations
- Maintain backward compatibility with existing environment overrides
2025-09-14 15:57:42 -07:00
William Valentin
d6851ad58e feat: create comprehensive .env.example configuration template
- Add 70+ environment variables organized in logical sections
- Include app metadata, server settings, security, and performance options
- Add feature flags, monitoring, and asset optimization settings
- Provide production-safe defaults with development overrides
- Document all configuration options with clear section headers
- Support file upload limits, CORS configuration, and template settings
2025-09-14 15:57:34 -07:00
William Valentin
f3b3562e6a feat: add environment variable support to CLI and backend metadata
- Update CLI to use configurable app name and version from settings
- Make backend package metadata configurable via environment variables
- Add CONTACT_EMAIL environment variable support
- Ensure consistent branding across CLI, API, and web interface
2025-09-14 15:57:25 -07:00
William Valentin
5eee1beb8d feat: replace hardcoded values with environment variables in templates
- Replace hardcoded GitHub URLs with {{ github_url }} template variable
- Use {{ app_name }} for application title and branding
- Add {{ app_description }} for dynamic descriptions
- Support {{ api_docs_url }} for API documentation links
- Improve HTML formatting and structure
- Enable full customization through environment variables
2025-09-14 15:57:16 -07:00
William Valentin
c4fd9427ed feat: integrate configuration system into FastAPI application
- Use configurable app title, description, and API settings
- Add template context injection for all HTML routes
- Implement file upload validation with size/extension limits
- Add enhanced health check and info endpoints with feature flags
- Support conditional API documentation based on settings
2025-09-14 15:57:08 -07:00
William Valentin
4f94583b54 feat: add comprehensive environment variable configuration system
- Create Settings class with support for 70+ configuration variables
- Add python-dotenv integration for .env file loading
- Support app metadata, server settings, security, performance tuning
- Add feature flags, monitoring, and asset optimization settings
- Include validation helpers for booleans, lists, and CORS origins
- Provide template context injection for HTML templates
2025-09-14 15:56:59 -07:00
William Valentin
c7a601a1cf Fix Font Awesome glyph bbox warnings by updating to version 6.5.1
- Updated Font Awesome from 6.4.0 to 6.5.1 across all HTML templates
- Resolves console warnings about incorrect glyph bounding boxes
- Version 6.5.1 includes fixes for font metrics issues present in 6.4.0
- Maintains all existing icon functionality while eliminating console noise

This addresses the browser console errors:
'downloadable font: Glyph bbox was incorrect (glyph ids...)
source: https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/webfonts/...'
2025-09-14 15:11:12 -07:00
William Valentin
115e344157 Add comprehensive favicon and PWA support
- Created SVG favicons in multiple sizes (16x16, 32x32, 192x192, 512x512)
- Added web app manifest for PWA functionality
- Implemented Apple Touch Icon support for iOS devices
- Added theme color and mobile web app meta tags
- Used gear/cogs design matching UnitForge branding with blue gradient
- Supports modern browsers with SVG and fallback compatibility
- Enables 'Add to Home Screen' functionality on mobile devices

All favicon files use the same blue gradient (#0d6efd to #0b5ed7)
as the main UI theme for consistent branding.
2025-09-14 15:08:50 -07:00
William Valentin
860f60591c Fix contrast issues with text-muted and bg-dark classes
- Fixed Bootstrap bg-dark class to use better contrasting color
- Added comprehensive text-muted contrast fixes for various contexts
- Improved dark theme colors for better accessibility
- Fixed CSS inheritance issues for code elements in dark contexts
- All color choices meet WCAG AA contrast requirements
2025-09-14 14:58:35 -07:00