{"id":29416312,"url":"https://github.com/burendouk/burendo-toolbox-infrastructure","last_synced_at":"2026-05-08T19:31:19.874Z","repository":{"id":303758511,"uuid":"1016053564","full_name":"BurendoUK/burendo-toolbox-infrastructure","owner":"BurendoUK","description":"Infrastructure for the Burendo Toolbox","archived":false,"fork":false,"pushed_at":"2025-07-09T08:43:57.000Z","size":49,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-07-09T09:37:13.819Z","etag":null,"topics":["aws","burendo","infrastructure","infrastructure-as-code","terraform"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/BurendoUK.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-07-08T12:23:00.000Z","updated_at":"2025-07-08T12:50:53.000Z","dependencies_parsed_at":"2025-07-09T09:39:56.688Z","dependency_job_id":"f6ce1a33-7526-461f-9f31-217d4e44d279","html_url":"https://github.com/BurendoUK/burendo-toolbox-infrastructure","commit_stats":null,"previous_names":["burendouk/burendo-toolbox-infrastructure"],"tags_count":0,"template":false,"template_full_name":"BurendoUK/burendo-repo-template-terraform","purl":"pkg:github/BurendoUK/burendo-toolbox-infrastructure","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BurendoUK%2Fburendo-toolbox-infrastructure","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BurendoUK%2Fburendo-toolbox-infrastructure/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BurendoUK%2Fburendo-toolbox-infrastructure/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BurendoUK%2Fburendo-toolbox-infrastructure/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BurendoUK","download_url":"https://codeload.github.com/BurendoUK/burendo-toolbox-infrastructure/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BurendoUK%2Fburendo-toolbox-infrastructure/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264878580,"owners_count":23677451,"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","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":["aws","burendo","infrastructure","infrastructure-as-code","terraform"],"created_at":"2025-07-11T19:02:46.594Z","updated_at":"2025-10-17T03:26:41.239Z","avatar_url":"https://github.com/BurendoUK.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Burendo Toolbox SPA\n\nThis is the central frontend shell for the **Burendo Toolbox** — a single-page application (SPA) that dynamically loads remote tools (micro frontends) at runtime via **Module Federation** using Vite.\n\nThe app supports SSO login with Azure AD, and is deployed to S3 behind CloudFront using Terraform.\n\n---\n\n## 🧱 Structure\n\nThe SPA is located in the `burendo-toolbox` directory and is built using:\n\n- **React + Vite**\n- **Module Federation** via [`vite-plugin-federation`](https://github.com/originjs/vite-plugin-federation)\n- **Tailwind CSS** for styling\n- **@azure/msal-browser / msal-react** for SSO\n\nRemote apps (tools) are mounted under `/apps/*`, and loaded dynamically at runtime.\n\n---\n\n## ⚙️ Bootstrapping the Repo\n\nTo scaffold the Terraform configuration with your desired environment settings:\n\n```bash\nmake bootstrap\n````\n\nThis will render `.j2` Jinja templates into real Terraform files using the variables you define.\n\nEnsure you have `python3` and `jinja2` installed (`pip install -r requirements.txt`).\n\n## 🚀 Running Locally\n\n```bash\ncd burendo-toolbox\nnpm install\nnpm run dev\n```\n\nThis will start the local dev server on `http://localhost:3000`.\n\nNote: When using `module federation`, local testing of remote apps like `door-access` only works if they're also running locally or are hosted and available.\n\n## 🧩 Adding a New App\n\nEach tool is a **remote app** hosted at `/apps/[tool-name]/remoteEntry.js`.\n\nTo add a new tool:\n\n1. Host the remote app at:\n   `https://toolbox.burendo.com/apps/my-new-tool/remoteEntry.js`\n\n2. In `burendo-toolbox/vite.config.js`, add the new app to the `remotes` block:\n\n   ```js\n   federation({\n     name: 'toolbox',\n     remotes: {\n       doorAccess: 'https://toolbox.burendo.com/apps/door-access/remoteEntry.js',\n       myNewTool: 'https://toolbox.burendo.com/apps/my-new-tool/remoteEntry.js',\n     },\n     shared: ['react', 'react-dom'],\n   })\n   ```\n\n3. In `src/routes/ToolsIndex.jsx`, add a new link or tile for your tool.\n\n4. Optionally, define a route in `src/routes/ToolsLayout.jsx`:\n\n   ```jsx\n   \u003cRoute path=\"my-new-tool/*\" element={\u003cMyNewTool /\u003e} /\u003e\n   ```\n\n## ❌ Removing a Tool\n\nTo remove a tool:\n\n1. Delete its entry from `vite.config.js`\n2. Remove any routes or UI references in `ToolsIndex.jsx` and `ToolsLayout.jsx`\n\n## 🔐 SSO Configuration\n\nThe Azure SSO config is managed through `.env` variables:\n\n```env\nVITE_AZURE_CLIENT_ID=xxxxx\nVITE_AZURE_TENANT_ID=xxxxx\nVITE_AZURE_REDIRECT_URI=https://toolbox.burendo.com\n```\n\nYou can confirm they're working by logging them in `main.jsx`.\n\n## 📦 Deploying\n\nAfter building:\n\n```bash\ncd burendo-toolbox\nnpm run build\naws s3 sync dist/ s3://toolbox.burendo.com/ \\\n  --exclude \"apps/*\" \\\n  --delete\n```\n\n\u003e ⚠️ Be careful not to overwrite existing `/apps/` folders. Use `--exclude` as shown above.\n\nTerraform handles the underlying infrastructure (S3, CloudFront, IAM, etc). To deploy:\n\n```bash\nterraform apply\n```\n\n## 🧠 Notes\n\n* `ToolsLayout.jsx` controls the core layout and routing for all tools.\n* Module Federation allows each remote tool to be developed and deployed independently.\n* The SPA acts as a secure, SSO-gated shell that integrates and hosts all tools in one place.\n\n## 📁 Files of Note\n\n| File / Folder       | Purpose                               |\n| ------------------- | ------------------------------------- |\n| `burendo-toolbox/`  | Main SPA shell                        |\n| `src/routes/`       | Tool routes, layout, and index UI     |\n| `vite.config.js`    | Module federation config              |\n| `cloudfront.tf`     | CloudFront distribution               |\n| `s3.tf`             | S3 bucket and permissions             |\n| `Makefile` / `*.j2` | Templates used to bootstrap Terraform |\n\n## 👥 Contributing\n\nIf you're adding a new tool, follow the structure in `door-access` as a reference. Keep remotes lightweight and focused. All remote apps must:\n\n* Export a React component as the default export\n* Be built with module federation (`exposes: './App'`)\n* Be deployed independently to `/apps/[name]/`\n\n## 📬 Questions?\n\nRaise a PR or contact the Engineering team.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fburendouk%2Fburendo-toolbox-infrastructure","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fburendouk%2Fburendo-toolbox-infrastructure","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fburendouk%2Fburendo-toolbox-infrastructure/lists"}