{"id":41404320,"url":"https://github.com/mbpcoder/devlet","last_synced_at":"2026-01-23T13:19:03.888Z","repository":{"id":306731494,"uuid":"1026831550","full_name":"mbpcoder/devlet","owner":"mbpcoder","description":"DevLet is a local Apache vhost manager for PHP projects. It auto-detects domain and PHP version (from .devlet or composer.json), creates SSL configs using mkcert, updates /etc/hosts, and enables required Apache modules — perfect for WSL and Linux dev environments.","archived":false,"fork":false,"pushed_at":"2025-07-27T09:21:44.000Z","size":17,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-07-27T09:31:07.030Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mbpcoder.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-07-26T17:49:44.000Z","updated_at":"2025-07-27T09:21:48.000Z","dependencies_parsed_at":"2025-07-27T09:31:08.479Z","dependency_job_id":"23d3e4ff-f6c8-4062-a61d-700ea7b19470","html_url":"https://github.com/mbpcoder/devlet","commit_stats":null,"previous_names":["mbpcoder/devlet"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/mbpcoder/devlet","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mbpcoder%2Fdevlet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mbpcoder%2Fdevlet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mbpcoder%2Fdevlet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mbpcoder%2Fdevlet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mbpcoder","download_url":"https://codeload.github.com/mbpcoder/devlet/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mbpcoder%2Fdevlet/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28693320,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-23T11:01:27.039Z","status":"ssl_error","status_checked_at":"2026-01-23T11:00:26.909Z","response_time":59,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-01-23T13:19:00.485Z","updated_at":"2026-01-23T13:19:03.878Z","avatar_url":"https://github.com/mbpcoder.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# DevLet — Local Development Environment Auto-Configurator\n\n**DevLet** is a PHP-based CLI tool built for Laravel Artisan that automates the configuration of local development environments using Apache, SSL (via mkcert), and PHP-FPM.\n\nIt streamlines developer onboarding by managing domain setup, certificate generation, and system-level configuration based on a per-project `.devlet` file or `composer.json` fallback.\n\n---\n\n## 🚀 Features\n\n- 🔍 **Project Auto-Discovery** — Scans source directories to detect Laravel or PHP projects\n- 🧾 **`.devlet` Support** — Define project-specific domain and PHP version\n- 📦 **Composer Integration** — Parses `composer.json` to extract PHP version if `.devlet` is missing\n- 🔐 **SSL Certificates with mkcert** — Automatically generates trusted certificates for each domain (supports WSL)\n- 🌐 **Apache VirtualHost Generator** — Generates VHost files with full PHP-FPM, SSL, redirect support\n- 📓 **/etc/hosts Sync** — Adds domain entries to the local `/etc/hosts` file\n- ↪️ **www to non-www Redirects** — Auto-redirect `www.domain` to `domain` securely over HTTPS\n- 🧩 **Laravel 12 Artisan Commands** — Modular Laravel Artisan command structure\n\n---\n\n## 📁 Example `.devlet` File\n\nDefine custom domain and PHP version per project:\n\n```ini\ndomain=api.local\nphp=8.2\n```\n\nIf this file is missing, DevLet will fallback to `composer.json` and extract `\"php\": \"^8.2\"` from `require`.\n\n---\n\n## 🧪 Example Apache VHost (Generated)\n\n```apache\n\u003cVirtualHost *:80\u003e\n    ServerName api.local\n    ServerAlias www.api.local\n    Redirect permanent / https://api.local/\n\u003c/VirtualHost\u003e\n\n\u003cVirtualHost *:443\u003e\n    ServerName api.local\n    ServerAlias www.api.local\n\n    DocumentRoot \"/home/user/Projects/api/public\"\n\n    SSLEngine on\n    SSLCertificateFile /etc/ssl/certs/api.local.pem\n    SSLCertificateKeyFile /etc/ssl/private/api.local-key.pem\n\n    RewriteEngine On\n    RewriteCond %{HTTP_HOST} ^www\\.(.+)$ [NC]\n    RewriteRule ^ https://%1%{REQUEST_URI} [L,R=301]\n\n    \u003cFilesMatch \\.php$\u003e\n        SetHandler \"proxy:unix:/run/php/php8.2-fpm.sock|fcgi://localhost/\"\n    \u003c/FilesMatch\u003e\n\n    \u003cDirectory \"/home/user/Projects/api/public\"\u003e\n        AllowOverride All\n        Require all granted\n    \u003c/Directory\u003e\n\n    ErrorLog ${APACHE_LOG_DIR}/api.local-error.log\n    CustomLog ${APACHE_LOG_DIR}/api.local-access.log combined\n\u003c/VirtualHost\u003e\n```\n\n---\n\n## 🧰 Available Artisan Commands\n\n### 🛠️ `devlet:os-install`\nInstalls necessary packages based on `config/devlet.php`.\nHandles PHP, Apache, SSL tools, and more.\n\n### ✅ `devlet:os-verify`\nVerifies required software and system configuration.\n\n### ⚙️ `devlet:configure`\nAuto-configures VHosts, SSL, hosts file, and PHP-FPM mappings.\n\n---\n\n## 🧠 How It Works\n\n1. Scan all project directories (from config)\n2. Parse `.devlet` or fallback to `composer.json`\n3. Normalize and generate domain names\n4. Create and trust SSL certificates (even under WSL)\n5. Write Apache config files using Laravel stubs\n6. Enable site, reload Apache\n7. Update `/etc/hosts` file\n\n---\n\n## 📂 Configurable via `config/devlet.php`\n\n- Project source directories\n- Default PHP fallback version\n- Apache vhost path\n- SSL cert locations\n- Auto-reload flags\n\n---\n\n## 🪪 Notes\n\n- DevLet is strictly for **local development**\n- Certificates are stored in `/etc/ssl/certs/` and `/etc/ssl/private/`\n- Apache configs are prefixed with `devlet-`\n- Auto-cleanup stale configs when projects are removed\n\n---\n\n## 🤝 Contributing\n\nPull requests, ideas, and improvements are welcome!\n\n---\n\n## 📜 License\n\nMIT License © Your Name\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmbpcoder%2Fdevlet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmbpcoder%2Fdevlet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmbpcoder%2Fdevlet/lists"}