From bcb87093fa2418bba4be2c729e04d699eb489966 Mon Sep 17 00:00:00 2001 From: dvirlabs Date: Mon, 19 Jan 2026 00:31:27 +0200 Subject: [PATCH] First commit --- .env.example | 7 + .gitignore | 63 ++ CHANGELOG.md | 142 +++ CONTRIBUTING.md | 338 +++++++ LICENSE | 21 + PROJECT_STRUCTURE.md | 354 +++++++ QUICKSTART.md | 135 +++ README.md | 323 +++++++ SECURITY.md | 173 ++++ backend/.dockerignore | 18 + backend/Dockerfile | 32 + backend/main.py | 1019 ++++++++++++++++++++ backend/requirements.txt | 8 + docker-compose.prod.yml | 57 ++ docker-compose.yml | 41 + frontend/.dockerignore | 12 + frontend/Dockerfile | 18 + frontend/Dockerfile.prod | 35 + frontend/index.html | 13 + frontend/nginx.conf | 48 + frontend/package.json | 27 + frontend/src/App.css | 357 +++++++ frontend/src/App.jsx | 48 + frontend/src/api.js | 60 ++ frontend/src/components/AllChangesDiff.css | 141 +++ frontend/src/components/AllChangesDiff.jsx | 112 +++ frontend/src/components/ExportModal.css | 196 ++++ frontend/src/components/ExportModal.jsx | 170 ++++ frontend/src/components/RenderSection.css | 177 ++++ frontend/src/components/RenderSection.jsx | 254 +++++ frontend/src/components/ResourceCard.css | 258 +++++ frontend/src/components/ResourceCard.jsx | 107 ++ frontend/src/components/UploadSection.css | 153 +++ frontend/src/components/UploadSection.jsx | 222 +++++ frontend/src/components/YamlEditor.css | 123 +++ frontend/src/components/YamlEditor.jsx | 280 ++++++ frontend/src/context/ThemeContext.jsx | 34 + frontend/src/index.css | 42 + frontend/src/main.jsx | 10 + frontend/src/pages/ProjectDashboard.css | 220 +++++ frontend/src/pages/ProjectDashboard.jsx | 181 ++++ frontend/src/pages/RenderView.css | 146 +++ frontend/src/pages/RenderView.jsx | 319 ++++++ frontend/vite.config.js | 13 + helm-test/Chart.yaml | 6 + helm-test/aws | 0 helm-test/templates/_helpers.tpl | 7 + helm-test/templates/configmap.yaml | 16 + helm-test/templates/deployment.yaml | 29 + helm-test/templates/ingress.yaml | 21 + helm-test/templates/service.yaml | 12 + helm-test/values.yaml | 27 + 52 files changed, 6625 insertions(+) create mode 100644 .env.example create mode 100644 .gitignore create mode 100644 CHANGELOG.md create mode 100644 CONTRIBUTING.md create mode 100644 LICENSE create mode 100644 PROJECT_STRUCTURE.md create mode 100644 QUICKSTART.md create mode 100644 README.md create mode 100644 SECURITY.md create mode 100644 backend/.dockerignore create mode 100644 backend/Dockerfile create mode 100644 backend/main.py create mode 100644 backend/requirements.txt create mode 100644 docker-compose.prod.yml create mode 100644 docker-compose.yml create mode 100644 frontend/.dockerignore create mode 100644 frontend/Dockerfile create mode 100644 frontend/Dockerfile.prod create mode 100644 frontend/index.html create mode 100644 frontend/nginx.conf create mode 100644 frontend/package.json create mode 100644 frontend/src/App.css create mode 100644 frontend/src/App.jsx create mode 100644 frontend/src/api.js create mode 100644 frontend/src/components/AllChangesDiff.css create mode 100644 frontend/src/components/AllChangesDiff.jsx create mode 100644 frontend/src/components/ExportModal.css create mode 100644 frontend/src/components/ExportModal.jsx create mode 100644 frontend/src/components/RenderSection.css create mode 100644 frontend/src/components/RenderSection.jsx create mode 100644 frontend/src/components/ResourceCard.css create mode 100644 frontend/src/components/ResourceCard.jsx create mode 100644 frontend/src/components/UploadSection.css create mode 100644 frontend/src/components/UploadSection.jsx create mode 100644 frontend/src/components/YamlEditor.css create mode 100644 frontend/src/components/YamlEditor.jsx create mode 100644 frontend/src/context/ThemeContext.jsx create mode 100644 frontend/src/index.css create mode 100644 frontend/src/main.jsx create mode 100644 frontend/src/pages/ProjectDashboard.css create mode 100644 frontend/src/pages/ProjectDashboard.jsx create mode 100644 frontend/src/pages/RenderView.css create mode 100644 frontend/src/pages/RenderView.jsx create mode 100644 frontend/vite.config.js create mode 100644 helm-test/Chart.yaml create mode 100644 helm-test/aws create mode 100644 helm-test/templates/_helpers.tpl create mode 100644 helm-test/templates/configmap.yaml create mode 100644 helm-test/templates/deployment.yaml create mode 100644 helm-test/templates/ingress.yaml create mode 100644 helm-test/templates/service.yaml create mode 100644 helm-test/values.yaml diff --git a/.env.example b/.env.example new file mode 100644 index 0000000..57e1c47 --- /dev/null +++ b/.env.example @@ -0,0 +1,7 @@ +# Backend Configuration +WORKSPACE_BASE_PATH=/tmp/helmview_workspaces +MAX_UPLOAD_SIZE=104857600 +HELM_TIMEOUT=60 + +# Frontend Configuration (for production builds) +VITE_API_URL=http://localhost:8000 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..914a756 --- /dev/null +++ b/.gitignore @@ -0,0 +1,63 @@ +# Python +__pycache__/ +*.py[cod] +*$py.class +*.so +.Python +build/ +develop-eggs/ +dist/ +downloads/ +eggs/ +.eggs/ +lib/ +lib64/ +parts/ +sdist/ +var/ +wheels/ +*.egg-info/ +.installed.cfg +*.egg +venv/ +env/ +ENV/ + +# Node +node_modules/ +npm-debug.log* +yarn-debug.log* +yarn-error.log* +.pnpm-debug.log* +dist/ +dist-ssr/ +*.local + +# IDEs +.vscode/ +.idea/ +*.swp +*.swo +*~ + +# OS +.DS_Store +Thumbs.db + +# Environment +.env +.env.local +.env.*.local + +# Logs +*.log +logs/ + +# Docker +docker-compose.override.yml + +# HelmView specific +/tmp/helmview_workspaces/ +*.tgz +*.tar.gz +*.zip diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..8d8dac2 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,142 @@ +# Changelog + +All notable changes to HelmView will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [1.0.0] - 2026-01-18 + +### ๐ŸŽ‰ Initial Release + +#### Added +- **Project Management** + - Create, list, view, and delete projects + - Project metadata with name and description + +- **Chart Upload & Extraction** + - Support for .tgz, .tar.gz, and .zip archives + - Secure extraction with zip-slip protection + - File size validation (100MB limit) + - Automatic Chart.yaml detection + +- **Helm Rendering** + - Full helm lint integration + - helm template rendering with custom options + - Configurable release name and namespace + - Values override support (YAML) + - --set and --set-string flag support + +- **Visual Resource View** + - Grid layout for all Kubernetes resources + - Resource cards with kind, name, namespace + - Expandable cards with summary and YAML tabs + - Resource modification tracking + +- **Advanced Filtering** + - Filter by resource kind + - Filter by resource name (search) + - Filter by namespace (search) + - Clear all filters button + - Real-time filter updates + +- **YAML Editor** + - Monaco Editor integration + - YAML syntax highlighting + - Kubernetes-aware autocomplete + - Real-time YAML validation + - Kubernetes schema validation + - Inline error markers + - Format YAML button + - Save functionality with validation + +- **Export & Validation** + - Generate modified Helm charts + - Automatic version bumping (semver) + - helm lint validation before export + - helm template validation before export + - Chart packaging as .tgz + - Download exported charts + - Detailed error reporting + +- **Docker Support** + - Development docker-compose.yml + - Production docker-compose.prod.yml + - Helm 3 pre-installed in backend + - Health checks for services + - Resource limits + +- **Security Features** + - Sandboxed project workspaces + - No arbitrary code execution + - Command timeouts (60s) + - Input validation + - CORS configuration + - Safe path handling + +- **Documentation** + - Comprehensive README.md + - Quick start guide (QUICKSTART.md) + - Security policy (SECURITY.md) + - Contributing guidelines (CONTRIBUTING.md) + - API documentation (FastAPI auto-docs) + +### Technical Details + +#### Backend +- FastAPI 0.109.0 +- Python 3.11+ +- Helm 3 CLI +- PyYAML for parsing +- Async request handling +- RESTful API design + +#### Frontend +- React 18.2 +- Vite 5.0 +- Monaco Editor 0.45 +- React Router 6.21 +- Axios for API calls +- Modern ES6+ JavaScript + +#### Infrastructure +- Docker containerization +- Docker Compose orchestration +- Volume persistence +- Health monitoring +- Production-ready nginx config + +### Known Limitations +- No user authentication (must be added separately) +- No database (in-memory project storage) +- No multi-user support +- No undo/redo functionality +- Limited form-based editing +- No template source tracking + +### Future Roadmap +- PostgreSQL integration for persistence +- User authentication & authorization +- Undo/redo per resource +- Template source tracking +- Form editors for common resources +- Diff viewer improvements +- Git integration +- Multi-user collaboration + +--- + +## [Unreleased] + +### Planned +- Database persistence layer +- User authentication system +- Enhanced diff viewer +- Form-based editors +- Project history and versioning + +--- + +**Note**: This is the initial release. Future versions will be documented here as they are released. + +[1.0.0]: https://github.com/yourusername/helmview/releases/tag/v1.0.0 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..757a784 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,338 @@ +# Contributing to HelmView + +Thank you for your interest in contributing to HelmView! This document provides guidelines and instructions for contributing. + +## ๐ŸŽฏ Ways to Contribute + +- ๐Ÿ› Report bugs +- ๐Ÿ’ก Suggest new features +- ๐Ÿ“ Improve documentation +- ๐Ÿ”ง Submit bug fixes +- โœจ Add new features +- ๐ŸŽจ Improve UI/UX +- ๐Ÿงช Write tests +- ๐ŸŒ Translate (future) + +## ๐Ÿš€ Getting Started + +### Prerequisites +- Git +- Docker & Docker Compose +- Node.js 18+ (for local development) +- Python 3.11+ (for local development) + +### Fork and Clone +```bash +# Fork the repository on GitHub +# Then clone your fork +git clone https://github.com/YOUR_USERNAME/helmview.git +cd helmview +``` + +### Development Setup +```bash +# Start the application +docker-compose up --build + +# Or run locally +# Backend +cd backend +python -m venv venv +source venv/bin/activate # Windows: venv\Scripts\activate +pip install -r requirements.txt +uvicorn main:app --reload + +# Frontend (separate terminal) +cd frontend +npm install +npm run dev +``` + +## ๐Ÿ“‹ Development Workflow + +### 1. Create a Branch +```bash +git checkout -b feature/my-new-feature +# or +git checkout -b fix/bug-description +``` + +### Branch Naming +- `feature/` - New features +- `fix/` - Bug fixes +- `docs/` - Documentation changes +- `refactor/` - Code refactoring +- `test/` - Test additions +- `chore/` - Maintenance tasks + +### 2. Make Changes + +#### Code Style +**Backend (Python)** +- Follow PEP 8 +- Use type hints +- Add docstrings for functions +- Keep functions focused and small + +**Frontend (JavaScript)** +- Use modern ES6+ syntax +- Follow React best practices +- Use functional components with hooks +- Keep components focused and reusable + +#### Commit Messages +Follow the conventional commits format: +``` +(): + + + +