[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-9024":3},{"id":4,"name":5,"fullName":6,"owner":5,"repo":5,"description":7,"homepage":8,"htmlUrl":8,"language":9,"languages":8,"totalLinesOfCode":8,"stars":10,"forks":11,"watchers":12,"openIssues":13,"contributorsCount":14,"subscribersCount":14,"size":14,"stars1d":15,"stars7d":16,"stars30d":17,"stars90d":14,"forks30d":14,"starsTrendScore":18,"compositeScore":19,"rankGlobal":8,"rankLanguage":8,"license":20,"archived":21,"fork":21,"defaultBranch":22,"hasWiki":23,"hasPages":21,"topics":24,"createdAt":8,"pushedAt":8,"updatedAt":25,"readmeContent":26,"aiSummary":27,"trendingCount":14,"starSnapshotCount":14,"syncStatus":28,"lastSyncTime":29,"discoverSource":30},9024,"caddymanager","caddymanager\u002Fcaddymanager","Easily manage your Caddy2 servers using a modern web-UI, built on the MEVN stack.",null,"Vue",1070,44,13,22,0,1,7,36,5,17.96,"Other",false,"main",true,[],"2026-06-12 02:02:01","# CaddyManager\n\nEasily manage your Caddy2 servers using a modern web UI, built on the MEVN stack with support for both SQLite and MongoDB databases.\n\n> **Caution:** CaddyManager is in early development. Please _backup your Caddy configurations_ and data before testing. Use at your own risk.\n\n\n---\n\n![CaddyManager Demo](https:\u002F\u002Fcaddymanager.online\u002Fscreenshots\u002Fscreenshots.gif)\n\n## 🚀 Features\n\n- **Dual Database Support:**\n  - Choose between SQLite (default, zero-setup) or MongoDB for data storage.\n- **Multi-Server Management:**\n  - Add, remove, and monitor multiple Caddy2 servers from a single dashboard.\n- **Configuration Editor:**\n  - Create, edit, and validate Caddyfiles with syntax highlighting and templates.\n- **User Authentication:**\n  - Secure login, JWT-based sessions, and role-based access control.\n- **API Key Management:**\n  - Generate and revoke API keys for programmatic access.\n- **Audit Logging:**\n  - Track all user and system actions for security and compliance.\n- **Real-Time Status:**\n  - Live server health checks and status updates.\n- **Integrated Swagger API Docs:**\n  - Explore and test backend APIs directly from the UI.\n- **Responsive Design:**\n  - Works great on desktop and mobile devices.\n\n---\n\n## 📢 Status\nThis project is in active development, gearing up for a v0.1 release. Feedback and testing are appreciated!\n\n---\n\n## 🐳 Docker Compose Example\n\nBelow is the updated `docker-compose.yml` for running both backend and frontend. CaddyManager uses SQLite by default for zero-configuration setup, but you can optionally use MongoDB:\n\n```yaml\nservices:\n  # MongoDB database for persistent storage (optional - SQLite is used by default)\n  mongodb:\n    image: mongo:8.0\n    container_name: caddymanager-mongodb\n    restart: unless-stopped\n    environment:\n      - MONGO_INITDB_ROOT_USERNAME=mongoadmin\n      - MONGO_INITDB_ROOT_PASSWORD=someSecretPassword  # Change for production!\n    ports:\n      - \"27017:27017\"  # Expose for local dev, remove for production\n    volumes:\n      - mongodb_data:\u002Fdata\u002Fdb\n    networks:\n      - caddymanager\n    profiles:\n      - mongodb  # Use 'docker-compose --profile mongodb up' to include MongoDB\n\n  # Backend API server\n  backend:\n    image: caddymanager\u002Fcaddymanager-backend:latest\n    container_name: caddymanager-backend\n    restart: unless-stopped\n    environment:\n      - PORT=3000\n      # Database Engine Configuration (defaults to SQLite)\n      - DB_ENGINE=sqlite  # Options: 'sqlite' or 'mongodb'\n      # SQLite Configuration (used when DB_ENGINE=sqlite)\n      - SQLITE_DB_PATH=\u002Fapp\u002Fdata\u002Fcaddymanager.sqlite\n      # MongoDB Configuration (used when DB_ENGINE=mongodb)\n      - MONGODB_URI=mongodb:\u002F\u002Fmongoadmin:someSecretPassword@mongodb:27017\u002Fcaddymanager?authSource=admin\n      - CORS_ORIGIN=http:\u002F\u002Flocalhost:80\n      - LOG_LEVEL=debug\n      - CADDY_SANDBOX_URL=http:\u002F\u002Flocalhost:2019\n      - PING_INTERVAL=30000\n      - PING_TIMEOUT=2000\n      - AUDIT_LOG_MAX_SIZE_MB=100\n      - AUDIT_LOG_RETENTION_DAYS=90\n      - METRICS_HISTORY_MAX=1000  # Optional: max number of in-memory metric history snapshots to keep\n      - JWT_SECRET=your_jwt_secret_key_here  # Change for production!\n      - JWT_EXPIRATION=24h\n    # Backend is now only accessible through frontend proxy\n    volumes:\n      - sqlite_data:\u002Fapp\u002Fdata  # SQLite database storage\n    networks:\n      - caddymanager\n\n  # Frontend web UI\n  frontend:\n    image: caddymanager\u002Fcaddymanager-frontend:latest\n    container_name: caddymanager-frontend\n    restart: unless-stopped\n    depends_on:\n      - backend\n    environment:\n      - BACKEND_HOST=backend:3000\n      - APP_NAME=Caddy Manager\n      - DARK_MODE=true\n    ports:\n      - \"80:80\"  # Expose web UI\n    networks:\n      - caddymanager\n\nnetworks:\n  caddymanager:\n    driver: bridge\n\nvolumes:\n  mongodb_data:  # Only used when MongoDB profile is active\n  sqlite_data:   # SQLite database storage\n\n# Notes:\n# - SQLite is the default database engine - no additional setup required!\n# - To use MongoDB instead, set DB_ENGINE=mongodb and start with: docker-compose --profile mongodb up\n# - For production, use strong passwords and consider secrets management.\n# - The backend uses SQLite by default, storing data in a persistent volume.\n# - The frontend proxies all \u002Fapi\u002F* requests to the backend service.\n# - Backend is not directly exposed - all API access goes through the frontend proxy.\n```\n\n---\n\n## 🧩 Environment Variables\n\n### Frontend (`frontend\u002F.env`)\nCreate a `.env` file in the `frontend\u002F` directory with the following variables:\n\n```\nAPI_BASE_URL=http:\u002F\u002Flocalhost:3000\u002Fapi\u002Fv1\nAPP_NAME=Caddy Manager\nDARK_MODE=true\n```\n- `API_BASE_URL`: The base URL for backend API requests - should be the url for your backend api\n- `APP_NAME`: The display name for the app UI.\n- `DARK_MODE`: Set to `true` to enable dark mode by default. Currently not integrated fully.\n\n### Backend (`backend\u002F.env`)\nCreate a `.env` file in the `backend\u002F` directory with the following variables:\n\n```\nPORT=3000\n# Database Engine Configuration\nDB_ENGINE=sqlite  # Options: 'sqlite' or 'mongodb'\n# SQLite Configuration (used when DB_ENGINE=sqlite)\nSQLITE_DB_PATH=.\u002Fcaddymanager.sqlite\n# MongoDB Configuration (used when DB_ENGINE=mongodb)\nMONGODB_URI=mongodb:\u002F\u002Fmongoadmin:someSecretPassword@localhost:27017\u002Fcaddymanager?authSource=admin\nCORS_ORIGIN=http:\u002F\u002Flocalhost:5173\nLOG_LEVEL=debug\nCADDY_SANDBOX_URL=http:\u002F\u002Flocalhost:2019\nPING_INTERVAL=30000\nPING_TIMEOUT=2000\nAUDIT_LOG_MAX_SIZE_MB=100\nAUDIT_LOG_RETENTION_DAYS=90\nJWT_SECRET=your_jwt_secret_key_here  # Change for production!\nJWT_EXPIRATION=24h\n```\n- `PORT`: Port for the backend server.\n- `DB_ENGINE`: Database engine to use (`sqlite` or `mongodb`). Defaults to `sqlite`.\n- `SQLITE_DB_PATH`: Path to SQLite database file (used when `DB_ENGINE=sqlite`).\n- `MONGODB_URI`: MongoDB connection string (used when `DB_ENGINE=mongodb`).\n- `CORS_ORIGIN`: Allowed origin for frontend requests - should be the url of your frontend.\n- `LOG_LEVEL`: Logging verbosity.\n- `CADDY_SANDBOX_URL`: URL for the Caddy sandbox server (for testing) and\u002For validating configs.\n- `PING_INTERVAL` \u002F `PING_TIMEOUT`: Health check intervals (ms).\n- `AUDIT_LOG_MAX_SIZE_MB` \u002F `AUDIT_LOG_RETENTION_DAYS`: Audit log settings.\n- `METRICS_HISTORY_MAX`: Optional max number of in-memory metric history snapshots to keep (default: 1000).\n- `JWT_SECRET` \u002F `JWT_EXPIRATION`: JWT credential settings\n\n> **Note:** The default CaddyManager user when first creating the app is `admin` with password `caddyrocks`. You can change this after logging in.\n\n> **Tip:** Copy `.env.example` to `.env` in each directory and adjust values as needed for your environment.\n\n---\n\n## 🗄️ Database Options\n\nCaddyManager supports two database engines:\n\n### SQLite (Default)\n- **Zero Configuration**: Works out of the box, no setup required\n- **Single File**: All data stored in a single `.sqlite` file\n- **Perfect for**: Small to medium deployments, development, testing\n- **Automatic Setup**: Creates admin user (`admin`\u002F`caddyrocks`) on first run\n\n### MongoDB\n- **Scalable**: Better for high-traffic, multi-user environments\n- **Perfect for**: Large deployments\n- **Setup Required**: Requires MongoDB server installation\n\nTo switch between databases, simply change the `DB_ENGINE` environment variable and restart the backend.\n\n---\n\n## 📚 Documentation\n- [Caddy Documentation](https:\u002F\u002Fcaddyserver.com\u002Fdocs\u002F)\n- [CaddyManager Docs](https:\u002F\u002Fcaddymanager.online\u002F#\u002Fdocs)\n- [Swagger API Docs](http:\u002F\u002Flocalhost:3000\u002Fapi-docs) (after starting backend)\n\n## 📈 Metrics & Prometheus\n\nThis project exposes runtime and application metrics that can be scraped by Prometheus or fetched as JSON for dashboards.\n\n- Prometheus exposition endpoint (text format): `\u002Fapi\u002Fv1\u002Fmetrics\u002Fprometheus`\n- JSON metrics (aggregated): `\u002Fapi\u002Fv1\u002Fmetrics`\n\nMinimal Prometheus scrape fragment (add under `scrape_configs:` in your `prometheus.yml`):\n\n```yaml\n- job_name: 'caddymanager'\n  metrics_path: \u002Fapi\u002Fv1\u002Fmetrics\u002Fprometheus\n  static_configs:\n    - targets: ['localhost:3000']\n```\n\nQuick test (returns Prometheus text format):\n\n```\ncurl http:\u002F\u002Flocalhost:3000\u002Fapi\u002Fv1\u002Fmetrics\u002Fprometheus\n```\n\nNotes:\n- The in-memory metric history size is controlled by the `METRICS_HISTORY_MAX` env var (default shown in the Docker Compose example).\n- If you run Prometheus behind a proxy or need auth headers, adjust the scrape job accordingly.\n\n\n---\n\n## 🤝 Contributing\nContributions are welcome! Please open issues and pull requests to help improve CaddyManager.\n\n---\n\n## 📦 Tech Stack\n- **Frontend:** Vue 3, Vite, Pinia, Vue Router\n- **Backend:** Node.js, Express\n- **Database:** SQLite (default) or MongoDB\n- **Caddy Integration:** RESTful API for Caddy2 server management\n\n---\n\n## 🧪 Development: Caddy Test Servers\n\nFor local testing with real Caddy servers, see [`development\u002FUSAGE.md`](development\u002FUSAGE.md) for scripts to:\n- Build and run a custom Caddy sandbox server with popular plugins\n- Spin up multiple vanilla Caddy servers for multi-server testing\n\n---\n\n## 🛠️ Getting Started using local development environment\n\n1. **Clone the repository:**\n   ```sh\n   git clone https:\u002F\u002Fgithub.com\u002FYOUR_USERNAME\u002Fcaddymanager.git\n   cd caddymanager\n   ```\n2. **Install dependencies:**\n   ```sh\n   cd backend && npm install\n   cd ..\u002Ffrontend && npm install\n   ```\n3. **Configure environment (optional):**\n   - SQLite works out of the box with no configuration needed!\n   - For custom settings, copy `.env.example` to `.env` in both `backend\u002F` and `frontend\u002F` directories\n4. **Run the app:**\n   - Start backend:\n     ```sh\n     cd backend && npm start\n     ```\n   - Start frontend:\n     ```sh\n     cd frontend && npm run dev\n     ```\n5. **Login:**\n   - Default admin credentials: `admin` \u002F `caddyrocks`\n\n---\n\n## 🖥️ How to Use CaddyManager\n\n1. **Access the Web UI:**\n   - Open your browser and go to `http:\u002F\u002Flocalhost` (or the address where your frontend is running).\n\n2. **Sign In:**\n   - Log in using the default admin credentials (`admin` \u002F `caddyrocks`).\n\n3. **Add and Manage Servers:**\n   - Navigate to the \"Servers\" section to add, edit, or remove Caddy servers.\n   - You can monitor server status and view details for each server.\n\n4. **Edit Configurations:**\n   - Use the \"Configurations\" section to create, edit, and validate Caddyfiles.\n   - Built-in syntax highlighting and templates help you avoid errors.\n\n5. **User & API Key Management:**\n   - Manage users and roles in the \"User Management\" section (admin only).\n   - Generate and revoke API keys for programmatic access in the \"API Keys\" section.\n\n6. **Audit Logs & Status:**\n   - View audit logs for all user\u002Fsystem actions in the \"Audit Logs\" section (admin only).\n\n7. **API Documentation:**\n   - Explore and test backend APIs via the integrated Swagger UI at `\u002Fapi-docs` (e.g., `http:\u002F\u002Flocalhost:3000\u002Fapi-docs`).\n\n---\n\n## 🛡️ License & Legal\nThis project is open source and available under the [MIT License](LICENSE).\n\nThis project is not endorsed by, directly affiliated with, maintained, authorized, or sponsored by Caddy, Matthew Holt, Stack Holdings GmbH, or ZeroSSL. The name \"Caddy\" is a registered trademark of Stack Holdings GmbH. All information about Caddy, its history, and trademarks is provided for reference only.\n\n---\n\n## 📬 Get in Touch\n\nHave questions, feedback, or want to contribute? Feel free to reach out:\n\n- Email: [bastian@bastianstolk.com](mailto:bastian@bastianstolk.com)\n- Open an issue or pull request on GitHub\n","CaddyManager 是一个基于 MEVN 技术栈的现代 Web 界面工具，用于轻松管理 Caddy2 服务器。它支持 SQLite 和 MongoDB 双数据库，并提供多服务器管理、配置文件编辑、用户认证、API 密钥管理和审计日志等核心功能。适用于需要集中管理和监控多个 Caddy2 服务器的场景，如企业运维或开发团队。其响应式设计确保了在桌面和移动设备上的良好使用体验。需要注意的是，该项目尚处于早期开发阶段，建议在测试前备份 Caddy 配置和数据。",2,"2026-06-11 03:20:49","top_language"]