{"id":30546382,"url":"https://github.com/electerm/repos","last_synced_at":"2026-02-13T17:03:35.003Z","repository":{"id":310034783,"uuid":"1038424597","full_name":"electerm/repos","owner":"electerm","description":"deb and other repos","archived":false,"fork":false,"pushed_at":"2025-08-16T08:36:02.000Z","size":58,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-10-23T03:43:49.624Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"HTML","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/electerm.png","metadata":{"files":{"readme":"README.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}},"created_at":"2025-08-15T07:08:18.000Z","updated_at":"2025-08-16T08:36:06.000Z","dependencies_parsed_at":"2025-08-15T10:25:34.743Z","dependency_job_id":null,"html_url":"https://github.com/electerm/repos","commit_stats":null,"previous_names":["electerm/repos"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/electerm/repos","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/electerm%2Frepos","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/electerm%2Frepos/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/electerm%2Frepos/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/electerm%2Frepos/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/electerm","download_url":"https://codeload.github.com/electerm/repos/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/electerm%2Frepos/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29412670,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-13T06:24:03.484Z","status":"ssl_error","status_checked_at":"2026-02-13T06:23:12.830Z","response_time":78,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5: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":"2025-08-28T01:22:36.433Z","updated_at":"2026-02-13T17:03:34.996Z","avatar_url":"https://github.com/electerm.png","language":"HTML","readme":"# Electerm Repository Server\n\nA Node.js Express server for hosting and managing Electerm package repositories, specifically designed to serve Debian packages and repository metadata.\n\n## Overview\n\nThis server provides:\n- Static file serving for repository files\n- REST API endpoint for creating/updating Debian repositories\n- Automated build process for repository generation\n- GitHub Actions integration for CI/CD\n\n## Features\n\n- **Static File Hosting**: Serves repository files from the `repos` folder\n- **Debian Repository Management**: Automated creation and management of `.deb` package repositories\n- **GitHub Actions Integration**: Accepts repository updates via POST requests from GitHub Actions\n- **ESM Module Support**: Built with modern ES modules\n- **Express.js Framework**: Fast and minimal web framework\n\n## Installation\n\n1. Clone the repository:\n```bash\ngit clone https://github.com/electerm/repos.git\ncd repos\n```\n\n2. Install dependencies:\n```bash\nnpm install\n```\n\n3. Start the server:\n```bash\nnpm start\n```\n\nThe server will start on port 3000 by default (or the port specified in the `PORT` environment variable).\n\n## API Endpoints\n\n### GET /\nRoot endpoint that provides basic server information and available endpoints.\n\n### GET /health\nHealth check endpoint that returns server status and timestamp.\n\n### POST /deb\nCreates or updates a Debian repository with the provided parameters.\n\n**Request Body:**\n```json\n{\n  \"releaseInfo\": \"Release information or metadata\",\n  \"gpgKeyId\": \"GPG key identifier\",\n  \"gpgPrivateKey\": \"GPG private key for signing\"\n}\n```\n\n**Response:**\n```json\n{\n  \"success\": true,\n  \"message\": \"Debian repository created successfully\",\n  \"output\": \"Build script output\",\n  \"timestamp\": \"2025-08-15T10:30:00.000Z\"\n}\n```\n\n### Static Files\nAll files in the `repos` folder are served statically. For example:\n- `https://your-domain.com/deb/` - Debian repository files\n- `https://your-domain.com/deb/public.key` - GPG public key\n\n## Repository Structure\n\n```\n├── build/\n│   └── build-deb.sh          # Debian repository build script\n├── repos/                    # Static files served by the server\n│   └── deb/                  # Debian repository (created automatically)\n├── src/\n│   ├── deb-build/           # Template files for Debian repository\n│   │   ├── index.html       # Repository information page\n│   │   └── public.key       # GPG public key\n│   └── server/\n│       └── app.js           # Main Express server\n├── package.json\n└── README.md\n```\n\n## Build Process\n\nWhen the `/deb` endpoint is called:\n\n1. The server validates the required parameters (`releaseInfo`, `gpgKeyId`, `gpgPrivateKey`)\n2. Creates the `repos/deb` directory if it doesn't exist\n3. Sets environment variables for the build script\n4. Executes `build/build-deb.sh` which copies files from `src/deb-build` to `repos/deb`\n5. Returns the build results\n\n## GitHub Actions Integration\n\nThis server is designed to work with GitHub Actions for automated repository updates. Example workflow:\n\n```yaml\n- name: Update Repository\n  run: |\n    curl -X POST https://your-server.com/deb \\\n      -H \"Content-Type: application/json\" \\\n      -d '{\n        \"releaseInfo\": \"${{ github.event.release.body }}\",\n        \"gpgKeyId\": \"${{ secrets.GPG_KEY_ID }}\",\n        \"gpgPrivateKey\": \"${{ secrets.GPG_PRIVATE_KEY }}\"\n      }'\n```\n\n## Deployment\n\n### Environment Variables\n\n- `PORT` - Server port (default: 3000)\n- `NODE_ENV` - Environment (production/development)\n\n### Production Deployment\n\n1. **VPS Deployment**:\n```bash\n# Clone and setup\ngit clone https://github.com/electerm/repos.git\ncd repos\nnpm install\n\n# Start with PM2 (recommended)\nnpm install -g pm2\npm2 start src/server/app.js --name \"electerm-repos\"\npm2 startup\npm2 save\n```\n\n2. **Docker Deployment**:\n```dockerfile\nFROM node:18-alpine\nWORKDIR /app\nCOPY package*.json ./\nRUN npm ci --only=production\nCOPY . .\nEXPOSE 3000\nCMD [\"npm\", \"start\"]\n```\n\n3. **Nginx Reverse Proxy** (recommended):\n```nginx\nserver {\n    listen 80;\n    server_name electerm-repos.html5beta.com;\n    \n    location / {\n        proxy_pass http://localhost:3000;\n        proxy_http_version 1.1;\n        proxy_set_header Upgrade $http_upgrade;\n        proxy_set_header Connection 'upgrade';\n        proxy_set_header Host $host;\n        proxy_set_header X-Real-IP $remote_addr;\n        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;\n        proxy_set_header X-Forwarded-Proto $scheme;\n        proxy_cache_bypass $http_upgrade;\n    }\n}\n```\n\n## Repository URLs\n\n- **Production**: `https://electerm-repos.html5beta.com/deb`\n- **Local Development**: `http://localhost:3000/deb`\n\n## Adding to APT Sources\n\nUsers can add the repository to their system with:\n\n```bash\n# Add the GPG key\ncurl -fsSL https://electerm-repos.html5beta.com/deb/public.key | sudo gpg --dearmor -o /usr/share/keyrings/electerm.gpg\n\n# Add the repository\necho \"deb [signed-by=/usr/share/keyrings/electerm.gpg] https://electerm-repos.html5beta.com/deb stable main\" | sudo tee /etc/apt/sources.list.d/electerm.list\n\n# Update package list\nsudo apt update\n\n# Install Electerm\nsudo apt install electerm\n```\n\n## Development\n\n### Running in Development\n\n```bash\nnpm start\n```\n\n### Testing the API\n\n```bash\n# Health check\ncurl http://localhost:3000/health\n\n# Test repository creation\ncurl -X POST http://localhost:3000/deb \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"releaseInfo\": \"Test release\",\n    \"gpgKeyId\": \"test-key-id\",\n    \"gpgPrivateKey\": \"test-private-key\"\n  }'\n```\n\n## Security Considerations\n\n- **GPG Keys**: Private keys are passed via request body and should be handled securely\n- **HTTPS**: Always use HTTPS in production\n- **Input Validation**: Server validates required parameters\n- **Environment**: Keep sensitive data in environment variables or secrets management\n\n## Contributing\n\n1. Fork the repository\n2. Create a feature branch\n3. Make your changes\n4. Test thoroughly\n5. Submit a pull request\n\n## License\n\nMIT License - see [LICENSE](LICENSE) file for details.\n\n## Related Projects\n\n- [Electerm](https://github.com/electerm/electerm) - Modern terminal/ssh/sftp client\n- [Electerm Website](https://electerm.html5beta.com) - Official website\n\n## Support\n\nFor issues and questions:\n- GitHub Issues: [https://github.com/electerm/repos/issues](https://github.com/electerm/repos/issues)\n- Main Project: [https://github.com/electerm/electerm](https://github.com/electerm/electerm)","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felecterm%2Frepos","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Felecterm%2Frepos","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felecterm%2Frepos/lists"}