No description
  • Rust 53.7%
  • HTML 38.7%
  • Shell 4.4%
  • Dockerfile 1.8%
  • JavaScript 1.4%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Stas bf7e057ca7
All checks were successful
trivy / Trivy Repository Scan (push) Successful in 7s
semgrep / semgrep (push) Successful in 1m29s
Deploy Infrastructure / deploy-services (push) Successful in 10s
feat: add powerlifting.org.il
2026-07-29 20:13:01 +03:00
.forgejo/workflows fix: load caddy env during infra deploy 2026-07-21 22:25:15 +03:00
api-gateway-service chore: consolidate rust dependency updates 2026-07-22 10:53:47 +03:00
deploy feat: add powerlifting.org.il 2026-07-29 20:13:01 +03:00
docker feat: replace dioxus WASM frontend with vanilla HTML, deprecate radio & terminal services 2026-05-19 20:04:36 +03:00
fmd chore: consolidate rust dependency updates 2026-07-22 10:53:47 +03:00
frontend chore: consolidate rust dependency updates 2026-07-22 10:53:47 +03:00
scripts mhm 2026-05-21 09:59:33 +03:00
.dockerignore first test run 2025-11-09 14:42:36 +02:00
.gitignore turnstile debugging 2025-12-14 20:59:18 +02:00
.semgrepignore semgrep scanning fixes 2025-12-10 12:15:26 +02:00
.trivyignore update trivy ignore 2025-10-19 16:35:11 +03:00
CODE_OF_CONDUCT.md Create CODE_OF_CONDUCT.md 2025-10-18 16:42:28 +03:00
CONTRIBUTING.md mhm 2026-05-21 09:59:33 +03:00
docker-compose.website.yml feat: replace dioxus WASM frontend with vanilla HTML, deprecate radio & terminal services 2026-05-19 20:04:36 +03:00
env.website.example ci: add release pipeline and immutable image tags 2026-04-05 12:49:34 +03:00
LICENSE Create LICENSE 2025-10-18 17:07:53 +03:00
README.md mhm 2026-05-21 09:59:33 +03:00
renovate.json feat: add renovate for automated dependency updates 2026-05-15 07:25:10 +03:00

FOSSA Status

My Stupid Website

A small DevOps playground for experimenting with infra, routing, and Rust services. It is now a static vanilla frontend (frontend/) served by Nginx, with Rust services behind /api.

Whats inside

  • Frontend (frontend/): static HTML/CSS/JS terminal-style site.
  • API gateway (api-gateway-service/): Rust Axum gateway handling sessions/CSRF and proxying downstream routes.
  • FMD service (fmd/): Rust fetch -> HTML -> Markdown service used by the tools page via the gateway.
  • Docker and deployment config (docker/, docker-compose.website.yml, deploy/, charts/).

Quick start

  • Copy env template and fill required values:
    • cp env.website.example .env
    • set SESSION_SECRET, FMD_TOKEN, and image tag values.
  • Start the stack:
    • docker compose -p website-dev -f docker-compose.website.yml --env-file .env up -d
  • Open frontend on http://localhost:${FRONTEND_PORT} (default 8091).
  • API flows through /api/* to the gateway. Public docs routes were removed.
  • Useful runtime checks:
    • docker compose -p website-dev -f docker-compose.website.yml ps
    • docker compose -p website-dev -f docker-compose.website.yml logs -f api-gateway

How to use web-to-markdown via CURL

The Web → Markdown tool is exposed via the gateway at POST /api/fmd/v1/fetch-md. It requires a gateway session cookie plus CSRF headers.

#!/usr/bin/env bash
set -euo pipefail

BASE="https://gitgud.zip"
COOKIE_JAR="/tmp/gw.cookies"
SESSION_JSON="/tmp/gw.session.json"

# 1) Create a session (stores cookie, returns CSRF tokens)
curl -fsS -c "$COOKIE_JAR" -X POST "$BASE/api/session" > "$SESSION_JSON"

# 2) Extract CSRF fields
CSRF_TOKEN=$(sed -n 's/.*"csrfToken":"\\([^"]*\\)".*/\\1/p' "$SESSION_JSON" | head -n1)
CSRF_PROOF=$(sed -n 's/.*"csrfProof":"\\([^"]*\\)".*/\\1/p' "$SESSION_JSON" | head -n1)

# 3) Fetch markdown
curl -fsS -b "$COOKIE_JAR" \
  -H "Content-Type: application/json" \
  -H "x-gateway-csrf: $CSRF_TOKEN" \
  -H "x-gateway-csrf-proof: $CSRF_PROOF" \
  -d '{"url":"https://example.com/"}' \
"$BASE/api/fmd/v1/fetch-md" > page.md

Frontend cache busting

Static assets under /css and /js are cached aggressively by browsers/CDN, so every frontend asset change should rotate the cache-bust token used in frontend/**/*.html query params.

Use a random token each time, then replace all existing cb-... tokens:

export TOKEN="cb-$(openssl rand -hex 6)"
python - <<'PY'
from pathlib import Path
import os, re
token = os.environ["TOKEN"]
for p in Path("frontend").rglob("*.html"):
    s = p.read_text()
    s2 = re.sub(r"cb-[0-9a-f]{12}", token, s)
    if s != s2:
        p.write_text(s2)
PY

Do this whenever you change frontend-delivered assets (for example frontend/css/style.css or frontend/js/howto.js).

Why

  • I like building my own toys when Im bored, so this is where I tinker without any production pressure.
  • It lets me try random ideas just because I can.

License

FOSSA Status