|
| 1 | +# ADR_0016: Web apps hosting |
| 2 | + |
| 3 | +## Date |
| 4 | + |
| 5 | +Decision date: 2025-08-20 |
| 6 | +Last status update: 2025-08-22 |
| 7 | + |
| 8 | +## Status |
| 9 | + |
| 10 | +- [ ] Proposed |
| 11 | +- [x] Accepted |
| 12 | +- [ ] Deprecated |
| 13 | +- [ ] Superseded |
| 14 | + |
| 15 | +### Implementation Status |
| 16 | + |
| 17 | +- [x] Planned |
| 18 | +- [ ] In Development |
| 19 | +- [ ] Implemented |
| 20 | +- [ ] Verified |
| 21 | +- [ ] Discontinued |
| 22 | + |
| 23 | +## People |
| 24 | + |
| 25 | +### Author/Decision Owner (Single Point of Accountability) |
| 26 | +Vsevolod Rusinskiy |
| 27 | + |
| 28 | +## Decision |
| 29 | + |
| 30 | +We will migrate the Polkadot/Substrate portal hosting from the current manual setup to a modern hosting platform that provides built-in CI/CD. |
| 31 | + |
| 32 | +## Context |
| 33 | + |
| 34 | +Currently, the Polkadot/Substrate portal is deployed manually without automated processes. |
| 35 | +The current approach has several limitations: |
| 36 | + |
| 37 | +- No CI/CD — there is no automated pipeline for build, tests, and deployment. |
| 38 | +- No preview environments — it is not possible to quickly showcase changes before merging into the main branch. |
| 39 | +- High dependence on individuals — releases and testing require specific team members, which slows down the workflow and reduces process resilience. |
| 40 | +- Limited scalability — as the team and project grow, the process becomes a bottleneck. |
| 41 | + |
| 42 | +## Options |
| 43 | + |
| 44 | +[Briefly list the considered options. Each option is numbered for easy reference, with the selected option marked clearly as `(SELECTED)`. Aim for 3-5 options minimum. Always include at least "do nothing" option. A detailed description of each option can be written in the Consequences section below.] |
| 45 | + |
| 46 | +1. **(SELECTED) [Cloudflare Workers](https://workers.cloudflare.com/)** |
| 47 | +2. [Vercel](https://vercel.com/) |
| 48 | +3. [Netlify](https://www.netlify.com/) |
| 49 | +4. [GitHub Pages](https://pages.github.com/) |
| 50 | +5. Do nothing / Status quo (VPS) |
| 51 | + |
| 52 | +### Hosting Platform Comparison |
| 53 | + |
| 54 | +| **Criterion** | Cloudflare Workers ✅ | Vercel ⚠️ | Netlify ⚠️ | GitHub Pages ⚠️ | |
| 55 | +| ------------------------------ | --------------------------------------------------------------------- | ---------------------------- | -------------------------------------- | ----------------------- | |
| 56 | +| **CI/CD from Git** | Auto-deploy + preview | Auto-deploy + preview | Auto-deploy + preview | Only Actions | |
| 57 | +| **Builds per month** | no limits (deploy via Wrangler/GitHub Actions) | 125 (Hobby), 1 000 (Pro) | 300 build-minutes (Free), 25 000 (Pro) | Free | |
| 58 | +| **Asset size limit** | 25 MB per file | 100 MB per file | 25 MB per file | 100 MB per file | |
| 59 | +| **Custom domains per project** | Unlimited (via routes/zones) | 50 (Hobby), Unlimited* (Pro) | ~100 per site | 1 per site | |
| 60 | +| **Bandwidth / Requests** | Free: 100k req/day, Paid: 10M req/mo incl. ($0.30 per 1M extra) | Unlimited static traffic | 100 GB/mo (Free) | ~100 GB/mo (soft limit) | |
| 61 | +| **Paid plans** | Free, or $5/month incl. 10M req + 30M CPU-ms ($0.30 per 1M req after) | $20/user/mo | $19/user/mo | Free (no Pro plan) | |
| 62 | +| **DX (convenience)** | Convenient | Best for Next.js | Average | Minimal features | |
| 63 | +| **Already in use** | Yes | Yes | No | No | |
| 64 | +| **Team experience** | Yes | Yes | No | No | |
| 65 | + |
| 66 | +## Consequences (Optional) |
| 67 | + |
| 68 | +### Option 1: Cloudflare Workers (SELECTED) |
| 69 | + |
| 70 | +Cloudflare Workers is a serverless edge platform that can also host static assets via its integration with Pages. It provides a global CDN, built-in preview deployments, support for custom Workers/Functions and WebSockets, as well as unlimited static traffic. The platform also includes strong security features (WAF, DDoS protection, HTTPS/HTTP/3), which is especially important for public projects. |
| 71 | + |
| 72 | +**Selected because:** |
| 73 | +- Predictable entry-level plan at $5/month (includes 10M requests and 30M CPU-ms). |
| 74 | +- Unlike Vercel and Netlify, the cost does not grow with the number of team members. |
| 75 | +- Rich functionality: global CDN, preview deployments, Workers runtime, WebSockets, edge APIs. |
| 76 | +- Strong built-in security (WAF, DDoS protection, HTTPS/HTTP/3) even on free tier. |
| 77 | + |
| 78 | +## Advice |
| 79 | + |
| 80 | +General adviсe: |
| 81 | +- Define `build` and `deploy` in comparison table (Alisher Khassanov, 2025-08-20) |
| 82 | +- Check platform limits such as requests, number of custom domains, etc. (Alisher Khassanov, 2025-08-20) |
| 83 | +- Write down what stages the source code goes through before it becomes a page for the user (Alisher Khassanov, 2025-08-27) |
| 84 | +- Create a table that defines these code change steps and think about the methods and artefacts (Alex Vyatkin, 2025-08-27) |
| 85 | +- Сonsider using Vercel, as it is planned to be used for the W3zard and the team has experience working with it (Andreea Eftene, 2025-08-29) |
| 86 | + |
| 87 | +Cloudflare Workers option: |
| 88 | +- How is the build configured in Cloudflare Workers? For example, for GitHub Actions we write a YAML file in the Actions Workflow format |
0 commit comments