{"id":46661128,"url":"https://github.com/mrgeoffrich/mini-infra","last_synced_at":"2026-04-01T18:27:18.032Z","repository":{"id":342260845,"uuid":"1046111763","full_name":"mrgeoffrich/mini-infra","owner":"mrgeoffrich","description":"Self-hosted web app for managing a single Docker host — container management, PostgreSQL backups, zero-downtime deployments via HAProxy, and Cloudflare tunnel monitoring.","archived":false,"fork":false,"pushed_at":"2026-03-27T12:19:26.000Z","size":4094,"stargazers_count":2,"open_issues_count":6,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-03-27T19:22:33.324Z","etag":null,"topics":["cloudflare","devops","docker","expressjs","haproxy","infrastructure","postgresql","react","self-hosted","typescript"],"latest_commit_sha":null,"homepage":null,"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/mrgeoffrich.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":"SECURITY.md","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":"2025-08-28T07:50:06.000Z","updated_at":"2026-03-27T08:22:02.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/mrgeoffrich/mini-infra","commit_stats":null,"previous_names":["mrgeoffrich/mini-infra"],"tags_count":30,"template":false,"template_full_name":null,"purl":"pkg:github/mrgeoffrich/mini-infra","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrgeoffrich%2Fmini-infra","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrgeoffrich%2Fmini-infra/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrgeoffrich%2Fmini-infra/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrgeoffrich%2Fmini-infra/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mrgeoffrich","download_url":"https://codeload.github.com/mrgeoffrich/mini-infra/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrgeoffrich%2Fmini-infra/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31290858,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-01T13:12:26.723Z","status":"ssl_error","status_checked_at":"2026-04-01T13:12:25.102Z","response_time":53,"last_error":"SSL_read: 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":["cloudflare","devops","docker","expressjs","haproxy","infrastructure","postgresql","react","self-hosted","typescript"],"created_at":"2026-03-08T11:07:13.636Z","updated_at":"2026-04-01T18:27:18.023Z","avatar_url":"https://github.com/mrgeoffrich.png","language":"TypeScript","readme":"# Mini Infra\n\nA web application for managing a single Docker host and its associated infrastructure. Provides centralized management for Docker containers, PostgreSQL database backups, zero-downtime deployments using HAProxy, and Cloudflare tunnel monitoring.\n\n## Screenshots\n\n_Coming soon._\n\n## Prerequisites\n\n- [Node.js](https://nodejs.org/) 24+ (npm is included)\n- [Docker](https://www.docker.com/) (for container management features)\n- [Google OAuth credentials](https://console.cloud.google.com/apis/credentials) (for authentication)\n\n## Getting Started\n\n### 1. Clone the repository\n\n```bash\ngit clone https://github.com/mrgeoffrich/mini-infra.git\ncd mini-infra\n```\n\n### 2. Install dependencies\n\n```bash\nnpm install\n```\n\n### 3. Configure environment variables\n\nCopy the example environment file:\n\n**macOS / Linux:**\n```bash\ncp server/.env.example server/.env\n```\n\n**Windows (PowerShell):**\n```powershell\nCopy-Item server\\.env.example server\\.env\n```\n\n### 4. Generate secrets\n\nYou need to provide values for `SESSION_SECRET`, `API_KEY_SECRET`, and `ENCRYPTION_SECRET` in `server/.env`.\n\n**macOS / Linux:**\n```bash\nopenssl rand -base64 32\n```\n\n**Windows (PowerShell):**\n```powershell\n[Convert]::ToBase64String((1..32 | ForEach-Object { Get-Random -Max 256 }) -as [byte[]])\n```\n\nRun the command three times and paste each value into the corresponding variable in `server/.env`.\n\n### 5. Set required variables\n\nOpen `server/.env` and fill in the following:\n\n| Variable | Description |\n|---|---|\n| `GOOGLE_CLIENT_ID` | Your Google OAuth client ID |\n| `GOOGLE_CLIENT_SECRET` | Your Google OAuth client secret |\n| `SESSION_SECRET` | Random secret for session signing |\n| `API_KEY_SECRET` | Random secret for API key hashing |\n| `ENCRYPTION_SECRET` | Random secret for credential encryption |\n| `ALLOWED_ADMIN_EMAILS` | Comma-separated list of email addresses allowed to log in |\n\n### 6. Start the development server\n\n```bash\nnpm run dev\n```\n\nThis starts three services concurrently: the shared types library (watch mode), the Express backend, and the Vite frontend. The app will be available at [http://localhost:3000](http://localhost:3000) with the API on port 5005.\n\n## Environment Variables\n\nSee [`server/.env.example`](server/.env.example) for the full list of environment variables. Key optional variables include:\n\n| Variable | Default | Description |\n|---|---|---|\n| `PORT` | `5005` | Backend server port |\n| `PUBLIC_URL` | `http://localhost:3000` | Public-facing URL (used for CORS and OAuth callbacks) |\n| `LOG_LEVEL` | `debug` | Logging level (`debug`, `info`, `warn`, `error`) |\n| `ANTHROPIC_API_KEY` | _(none)_ | Enables the AI assistant chat feature |\n| `ALLOW_INSECURE` | `false` | Disable HTTPS-enforcing headers (auto-set when `PUBLIC_URL` uses `http://`) |\n\n## Running with Docker\n\nPre-built Docker images and deployment configurations are available in the [`deployment/`](deployment/) directory. See:\n\n- [`deployment/README.md`](deployment/README.md) for an overview\n- [`deployment/development/README.md`](deployment/development/README.md) for local Docker development\n- [`deployment/production/DEPLOYMENT.md`](deployment/production/DEPLOYMENT.md) for production deployment\n\n## Agent Tracing\n\nIf the AI assistant is enabled (`ANTHROPIC_API_KEY`), you can trace agent interactions using the Claude Agent SDK's built-in beta tracing. Set these environment variables on the Mini Infra server — they are automatically forwarded to the agent sidecar container:\n\n| Variable | Description |\n|---|---|\n| `ENABLE_BETA_TRACING_DETAILED` | Set to `1` to enable detailed beta tracing |\n| `BETA_TRACING_ENDPOINT` | URL of the tracing backend to receive trace data |\n\nFor the dev Docker deployment, add these to your `deployment/development/.env` file and restart (or run `./start.sh --just-copy-env` to refresh env vars without rebuilding).\n\n## Running Tests\n\n```bash\nnpm test -w server\n```\n\nTo run a single test file:\n\n```bash\nnpx -w server vitest run src/__tests__/your-test-file.test.ts\n```\n\n## Tech Stack\n\n- **Frontend:** React 19, Vite, Tailwind CSS, shadcn/ui, TanStack Query\n- **Backend:** Express.js 5, Prisma ORM, SQLite\n- **Auth:** Google OAuth 2.0 via Passport\n- **Infrastructure:** Docker API (dockerode), HAProxy, Cloudflare API, Azure Blob Storage\n- **Language:** TypeScript throughout (shared types via npm workspaces)\n\n## License\n\nThis project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrgeoffrich%2Fmini-infra","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmrgeoffrich%2Fmini-infra","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrgeoffrich%2Fmini-infra/lists"}