{"id":28509284,"url":"https://github.com/dokploy/templates","last_synced_at":"2025-10-04T11:52:29.000Z","repository":{"id":280093282,"uuid":"894821955","full_name":"Dokploy/templates","owner":"Dokploy","description":"All the open source templates integrated to dokploy 🚀","archived":false,"fork":false,"pushed_at":"2025-09-26T02:54:43.000Z","size":10328,"stargazers_count":104,"open_issues_count":102,"forks_count":156,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-09-26T04:26:18.281Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://templates.dokploy.com","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Dokploy.png","metadata":{"files":{"readme":"README-meta-processing.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-11-27T03:53:24.000Z","updated_at":"2025-09-26T02:54:47.000Z","dependencies_parsed_at":"2025-05-05T09:48:30.161Z","dependency_job_id":"6dbbdd61-cbd4-4c65-8e5e-141f6ba20547","html_url":"https://github.com/Dokploy/templates","commit_stats":null,"previous_names":["dokploy/templates"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Dokploy/templates","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dokploy%2Ftemplates","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dokploy%2Ftemplates/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dokploy%2Ftemplates/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dokploy%2Ftemplates/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Dokploy","download_url":"https://codeload.github.com/Dokploy/templates/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dokploy%2Ftemplates/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278308627,"owners_count":25965654,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-04T02:00:05.491Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":"2025-06-08T22:08:06.316Z","updated_at":"2025-10-04T11:52:28.993Z","avatar_url":"https://github.com/Dokploy.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Meta.json Processing Tools\n\nThis directory contains production-ready tools for processing `meta.json` files, specifically designed to:\n\n- ✅ Remove duplicate entries based on `id` field\n- 🔤 Sort entries alphabetically by `id`\n- 🛡️ Validate JSON structure and required fields\n- 💾 Create automatic backups before processing\n- 🚀 Integrate with CI/CD pipelines\n\n## Quick Start\n\n### Simple Processing\n\n```bash\n# Process meta.json (removes duplicates, sorts alphabetically)\nnode dedupe-and-sort-meta.js\n\n# Or using npm\nnpm run process-meta\n```\n\n### Advanced Processing\n\n```bash\n# Verbose output with validation\nnode build-scripts/process-meta.js --verbose\n\n# Process different file\nnode build-scripts/process-meta.js --input data/meta.json --output dist/meta.json\n\n# No backup creation\nnode build-scripts/process-meta.js --no-backup\n```\n\n### Using Make\n\n```bash\n# Process meta.json\nmake process-meta\n\n# Validate without changes\nmake validate\n\n# Quick check for issues\nmake check\n\n# Full build process\nmake build\n```\n\n## Available Scripts\n\n### Core Scripts\n\n1. **`dedupe-and-sort-meta.js`** - Simple, standalone script\n\n   - Removes duplicates (keeps first occurrence)\n   - Sorts alphabetically by ID\n   - Creates automatic backup\n   - Provides processing statistics\n\n2. **`build-scripts/process-meta.js`** - Production-ready script\n   - All features of the simple script\n   - Schema validation\n   - Configurable options\n   - CLI argument parsing\n   - Detailed logging\n\n### NPM Scripts\n\n```json\n{\n  \"process-meta\": \"Remove duplicates and sort meta.json\",\n  \"process-meta-verbose\": \"Process with detailed output\",\n  \"validate-meta\": \"Validate structure without changes\",\n  \"build\": \"Full production build process\"\n}\n```\n\n### Make Targets\n\n- `make process-meta` - Process the meta.json file\n- `make validate` - Validate without modifying\n- `make check` - Quick duplicate/sort check\n- `make build` - Full build process\n- `make clean` - Remove backup files\n\n## CLI Options\n\n```bash\nUsage: node build-scripts/process-meta.js [options]\n\nOptions:\n  -i, --input \u003cfile\u003e         Input file path (default: meta.json)\n  -o, --output \u003cfile\u003e        Output file path (default: same as input)\n  --no-backup               Don't create backup file\n  -v, --verbose             Verbose output\n  --no-schema-validation    Skip schema validation\n  -h, --help                Show help message\n```\n\n## Examples\n\n### Basic Usage\n\n```bash\n# Process current meta.json\nnode dedupe-and-sort-meta.js\n\n# Output:\n# 🔧 Processing meta.json...\n# 📊 Found 241 total entries\n# 💾 Backup created: meta.json.backup.1755066142618\n# ✅ Processing completed successfully!\n# 📈 Statistics:\n#    • Original entries: 241\n#    • Duplicates removed: 0\n#    • Final entries: 241\n#    • Entries sorted alphabetically by ID\n# 🔤 ID range: ackee ... zitadel\n```\n\n### Production Build Integration\n\n```bash\n# In your CI/CD pipeline\nnpm run build\n\n# Or with Make\nmake build\n```\n\n### Validation Only\n\n```bash\n# Check for issues without modifying\nmake validate\n\n# Or with node directly\nnode build-scripts/process-meta.js --no-backup --verbose --output /tmp/test.json\n```\n\n## CI/CD Integration\n\n### GitHub Actions\n\nThe included `.github/workflows/validate-meta.yml` workflow automatically:\n\n- ✅ Validates JSON structure\n- 🔍 Checks for duplicates\n- 📋 Verifies required fields\n- 🔤 Ensures alphabetical sorting\n- ❌ Fails build if issues found\n\n### Integration Examples\n\n**Docker Build:**\n\n```dockerfile\nCOPY package.json ./\nCOPY dedupe-and-sort-meta.js ./\nCOPY meta.json ./\nRUN npm run process-meta\n```\n\n**Shell Script:**\n\n```bash\n#!/bin/bash\necho \"Processing meta.json for production...\"\nnode dedupe-and-sort-meta.js\nif [ $? -eq 0 ]; then\n    echo \"✅ Meta.json processed successfully\"\nelse\n    echo \"❌ Meta.json processing failed\"\n    exit 1\nfi\n```\n\n## Schema Validation\n\nThe tools validate these required fields:\n\n- `id` (string, unique)\n- `name` (string)\n- `version` (string)\n- `description` (string)\n- `links` (object with github property)\n- `logo` (string)\n- `tags` (array)\n\n## Backup Strategy\n\n- Automatic backups created with timestamp: `meta.json.backup.{timestamp}`\n- Backups can be disabled with `--no-backup` flag\n- Use `make clean` to remove old backup files\n\n## Performance\n\n- Processes 240+ entries in ~50ms\n- Memory efficient (streams JSON)\n- No external dependencies required\n- Node.js 14+ compatible\n\n## Troubleshooting\n\n### Common Issues\n\n1. **File not found**: Ensure `meta.json` exists in current directory\n2. **Invalid JSON**: Check JSON syntax with `node -c meta.json`\n3. **Permission denied**: Check file write permissions\n4. **Duplicates found**: Review duplicate entries in output logs\n\n### Debug Mode\n\n```bash\n# Enable verbose logging\nnode build-scripts/process-meta.js --verbose\n\n# Check file quickly\nmake check\n```\n\n## License\n\nMIT License - See project root for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdokploy%2Ftemplates","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdokploy%2Ftemplates","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdokploy%2Ftemplates/lists"}