Skip to main content

Tech Stack

The v2 platform is designed for performance and privacy, leveraging edge computing.

Runtime

Cloudflare Workers (Edge Serverless)

Language

TypeScript (Worker entry point) & Vanilla JS ES6+ (Frontend)

Deployment

Wrangler 4 (Cloudflare CLI)

Assets

Workers Assets (Static Hosting)

Package Manager

pnpm v9+

Formatter

Prettier

Fonts

Poppins via @fontsource/poppins (self-hosted)

Frontend

HTML5, CSS3, Vanilla JavaScript (ES6+)

Routing

Routes are handled in src/worker.ts. The Worker serves both static assets (via Workers Assets binding) and dynamic routes.

Primary Pages

RouteDescription
/Homepage
/aboutAbout page
/contributeContribute / donate page
/termsTerms of Service
/privacyPrivacy Policy
/licenseLicense information
/blogBlog index
/blog/[slug]Individual blog posts
/services/dnsDNS service page & tool
/tool/gfuGoogle Form Unlocker

Blog Posts

Blog slugs are dynamically resolved: /blog/[slug] maps to the static file blog-[slug].html. Slugs are validated against [a-z0-9-] and capped at 200 characters.
RouteTitle
/blog/dnsDNS
/blog/adguard-homeAdGuard Home
/blog/age-verificationAge Verification
/blog/chromeos-wifi-password-extractorChromeOS Wi-Fi Password Extractor
/blog/death-of-learningDeath of Learning
/blog/google-form-unlockerGoogle Form Unlocker
/blog/google-form-unlocker-percautionsGoogle Form Unlocker Precautions

Shortcuts & Redirects

All redirects are permanent (HTTP 301).
RouteDestination
/bypass/services/dns
/dns/services/dns
/forms/tool/gfu
/discordDiscord Invite
/githubGitHub Profile

Security

The Worker enforces strict security response headers on every request:
HeaderValue / Purpose
Content-Security-PolicyRestricts asset origins; allows connections to DNS monitor subdomains for status checks
Strict-Transport-SecurityHSTS with includeSubDomains; preload (1 year)
X-Content-Type-Optionsnosniff
X-Frame-OptionsSAMEORIGIN
Referrer-Policystrict-origin-when-cross-origin
Permissions-PolicyDisables camera, microphone, geolocation, and payment APIs
Only GET and HEAD HTTP methods are accepted; all others return 405 Method Not Allowed.

Development

Prerequisites

  • Node.js v18 or higher
  • pnpm v9 or higher
  • A Cloudflare account with Wrangler authenticated (wrangler login)

Local Setup

1

Clone

Clone the repository to your local machine:
git clone https://github.com/hapara-fail/website.git
cd website
2

Install

Install dependencies:
pnpm install
3

Configure (optional)

Create or edit .dev.vars for any local environment variables needed during development.
4

Run

Start the local development server:
pnpm run dev
This runs generate-version then wrangler dev, serving the site at http://127.0.0.1:8787.

Available Scripts

ScriptDescription
pnpm run devGenerate version data + start local Wrangler dev server
pnpm run previewGenerate version data + run Wrangler dev in --remote mode
pnpm run deployGenerate version data + deploy to Cloudflare Workers
pnpm run buildRun generate-version only (stamps version-data.js)
pnpm run formatFormat all files with Prettier

Deployment

Ensure Wrangler is installed and authenticated (wrangler login), then run:
pnpm run deploy
This generates the version stamp, then builds and deploys the project to the hapara-fail Worker specified in wrangler.jsonc.