SAKSelector.Org
-
I am done playing with it for tonight- I think I am coming down with something and it's 4am. Good time to stop if ever there was one.

SAKSelector: System Status & Handover Briefing
- System Architecture & Environment
-Domain & DNS: https://sakselector.org (SSL terminated via reverse proxy / Caddy / Traefik / Nginx on host).
-Server Root: /opt/SAKSelector on host SAKSelector-Server.
-Backend Framework: Python FastAPI serving static assets, UI templates, and catalog endpoints (/api/models, etc.).
-Deployment Pipeline: /usr/local/bin/sakselector-deploy synchronizes local edits into the live runtime container and tests endpoint health.
-Core Data Store: /opt/SAKSelector/app/models.json (contains all 436 Victorinox and Wenger models, tools mapping, layer counts, dimensions, photo hero links, and SAKWiki article URLs).
-Frontend Stack: Vanilla JS (/opt/SAKSelector/static/app.js), CSS3 (/opt/SAKSelector/static/style.css), and Jinja2 templates (/opt/SAKSelector/app/templates/index.html and /opt/SAKSelector/templates/index.html).- Work Completed (Prior & Current Sessions)
Database & Image Integrity
-Catalog Normalization: Cleaned up catalog entries across 436 active models spanning both Victorinox and Wenger lines.
-Hero Image Curation: Replaced non-knife images (blister packs, packaging backs, generic logo cards, and standalone accessories/sheaths) with verified knife hero images.
-Offline SAKWiki Link Resolution:
Replaced live HTTP crawlers with an offline dictionary patch (/opt/SAKSelector/apply_offline_wiki_links.py) to prevent server rate limiting/TCP disconnects.
Resolved major discrepancies with TikiWiki page naming conventions:Classic SD $\rightarrow$ ClassicFarmer / Farmer X $\rightarrow$ Victorinox+Farmer / Victorinox+Farmer+XWalker / Lumberjack $\rightarrow$ LumberjackMountaineer * and Mountaineer Lite $\rightarrow$ Victorinox+Mountaineer+and+Mountaineer+LiteHandled 84mm variations (Tinker 84mm, Camper 84mm, Climber 84mm) and consolidated Wenger Ranger series URLs.Performance & Initial Load Optimization
-6-Card Random Showcase:Updated app.js (lines ~245–255) so the default landing state (when no search query or filter is active) extracts and renders a random sample of 6 knives ([...models].sort(() => 0.5 - Math.random()).slice(0, 6)).
Reduced initial DOM payload and image downloads by ~98%, improving mobile load performance.
Preserved full dataset filtering: typing in the search bar or toggling tools/brands immediately expands the grid to show all matching results.Quick Info Modal
Spec Header & Pill Categorization: Verified spec block (Length, Weight, Width, Layers) displaying fallback -- when data points are absent.
Color Schemes: Standardized badge colors across cards and modal (Blue = Main Layer, Gold = Back Tools, Green = Scale Tools).
CTA Styling: Confirmed hover interaction for the "Explore Full History & Variations on SAKWiki.com
" link (idle dark navy $\rightarrow$ hover crimson red).ResponsiveMobile Overhaul
-Document Flow & Viewport Fixes:Cleaned up fixed desktop flex dimensions (height: calc(100vh - 64px) and overflow-y: auto) that previously isolated the sidebar.
Eliminated nested inner scrollbars, horizontal drift, and dead outer scrollbars on mobile viewports.
Configured @media (max-width: 880px) stacking rules in style.css so the results grid flows naturally underneath the filter controls.- Outstanding Issues & Active To-Do List
-Phase 1: Mobile Usability & Ergonomics (Immediate Next Steps)
Collapsible Filter Drawer on Mobile:Current behavior: On screens under 880px, users must scroll through the entire filter panel before seeing the knife cards or search results.
Target solution: Keep the Search Bar pinned at the top on mobile. Wrap the remaining filters (Brand, Size, Required Tools, Layer slider) in an expandable <details> element or an accordion drawer labeled-Filters & Options (Tap to Expand).
Auto-Scroll on Search/Filter Selection:On mobile, automatically scroll past the filter bar to the top of the #models-grid when a search is executed or a filter chip is toggled.
Phase 2: Catalog & Image Audits
Clipper Image Replacement:The 91mm Clipper currently shows image packaging for a 700th anniversary edition; update to a clean hero photo of the scissors-and-blade model.
Wenger Junior Series Wiki Links:Map Wenger Junior EvoGrip 574 and related sub-codes to Junior+Series or Junior+03 on SAKWiki.
Deep Link Verification:Run an offline regex check on models.json to verify that no remaining entries contain trailing underscores or unencoded special characters ({, }, *).Phase 3: UI & Feature Enhancements
Showcase Shuffle Button:Add a small
Shuffle button next to the Featured 6 random models of 436 header to let visitors re-roll the 6 featured knives without refreshing the page.
Free-Text Tool Search Refinement:Ensure the text input searches both the knife name and individual tool names (e.g., searching "scissors" or "saw" returns all models containing those tools in their layer lists).
Modal Scroll Boundary Check:Add max-height: 85vh and overflow-y: auto to .modal-content to ensure ultra-thick knives (e.g., SwissChamp XLT / XXL) do not push the wiki CTA button below small mobile screens. -
================================================================================
SAKSELECTOR.ORG — DEPLOYMENT, REPAIR & INFRASTRUCTURE CHANGELOG
Date: October 20, 2026
Environment: Ubuntu Server / Docker Containerized FastAPI
Target Paths:- App Directory: /opt/SAKSelector
- Source Code: /opt/SAKSelector/app
- Frontend Assets: /opt/SAKSelector/static
- Templates: /opt/SAKSelector/templates
- Deploy Utility: /usr/local/bin/sakselector-deploy
- Python Environment: /opt/SAKSelector/venv
================================================================================
[1] EXECUTIVE OVERVIEW
Tonight's work addressed critical data ingestion, scraping, asset loading, and
UI presentation bugs on sakselector.org. The primary issues resolved:- Quick Info modal hero images failing to pass or display.
- SAKWiki cross-origin hotlinking/403 blocks causing broken images.
- Scraper failures and 404/502 errors on Wenger models with non-standard
or missing SAKWiki wiki page slugs. - Integration of reverse-filtering from modal chips back to the sidebar.
- Generating network-consistent 1800x340 branding headers.
[2] PROBLEM BREAKDOWNS & APPLIED FIXES
A. Quick Info Modal Parameter Loss & Image Omission
- Problem:
Clicking "Quick Info" on model cards did not show knife hero photos. - Root Causes:
- static/app.js defined
async function openSpecModal(modelName, sizeMm, layers)
which only accepted 3 parameters, silently droppingimageUrl. - The modal inner HTML builder omitted any image tag entirely, starting
immediately with<div class="modal-specs-grid">.
- static/app.js defined
- Solution Applied:
- Updated
openSpecModal(modelName, sizeMm, layers, imageUrl)signature. - Updated the card button template to bind
data-image="${model.image || ''}". - Updated click event delegation to pass
btn.dataset.imageintoopenSpecModal. - Inserted
.modal-hero-wrappercontaining an<img>tag above.modal-specs-grid
with fallback styling to auto-hide if no image exists or if loading fails.
- Updated
B. SAKWiki Referrer / Hotlinking Block (Broken Image Icons)
- Problem:
Catalog cards and modal windows showed broken image place-markers for valid
SAKWiki images (e.g., Ensign, Traveller, RangerGrip 174, Wenger Junior S10). - Root Causes:
- SAKWiki's server (TikiWiki / Apache) inspects incoming HTTP request headers.
- When browsers loaded
https://sakselector.org, external<img>requests
sentReferer: https://sakselector.org/. - SAKWiki blocked cross-origin image requests with non-whitelisted referrers.
- Solution Applied:
- Added
<meta name="referrer" content="no-referrer">totemplates/index.html. - Explicitly added
referrerpolicy="no-referrer"to:- Grid card images in
static/app.js - Quick Info modal hero images in
static/app.js
- Grid card images in
- Added
C. Scraper 404 / 502 Failures on Wenger Slugs
- Problem:
Certain Wenger models (such as Wenger Deer, Wenger Tool Chest, Wenger Ranger 70)
threw "Failed to load live specifications from SAKWiki" errors inside the modal. - Root Causes:
- SAKWiki does not maintain a uniform naming convention for Wenger models.
Some are listed without brand prefixes ("Deer"), some keep prefixes ("Wenger
Ranger 51"), and others use composite sub-names ("Wenger Ranger 70 - Handyman"). - The scraper only queried the exact
model.nameslug.
- SAKWiki does not maintain a uniform naming convention for Wenger models.
- Solution Applied:
- Refactored
get_sakwiki_model()inside/opt/SAKSelector/app/sakwiki_integration.py
to evaluate multiple prioritized candidates sequentially:- Explicit
wiki_urllookups defined inmodels.json(skips guessing entirely). - Explicit alias dictionary entries in
SLUG_ALIASES. - Exact requested page slug.
- Prefix-stripped variations (e.g., stripping "Wenger " or "Victorinox ").
- Prefix-prepended variations (e.g., adding "Wenger ").
- Explicit
- Added
Wenger Ranger 70->Wenger Ranger 70 - Handymanmapping toSLUG_ALIASES.
- Refactored
[3] CORE MODIFIED CODE ARTIFACTS
A. /opt/SAKSelector/app/sakwiki_integration.py
- Lookups now check local JSON metadata before firing HTTP requests:
# Checks models.json for an explicit wiki_url try: import json from pathlib import Path m_file = Path(__file__).resolve().parent / "models.json" if m_file.exists(): with open(m_file, "r", encoding="utf-8") as mf: for entry in json.load(mf): if entry.get("name", "").strip().lower() == page_slug.strip().lower(): wurl = entry.get("wiki_url", "") if "page=" in wurl: target_slug = wurl.split("page=")[-1].replace("+", " ") if target_slug and target_slug not in candidates: candidates.insert(0, target_slug) break except Exception: pass - Added candidate fallback loop to handle 404/stub responses gracefully.
B. /opt/SAKSelector/static/app.js
- Button template:
<button class="btn-spec" data-name="${model.name}" data-size="${model.size_mm}" data-layers="${model.layers}" data-image="${model.image || ''}"> - Image rendering in modal:
const imgHtml = imageUrl && !imageUrl.includes('placeholder') ? `<div class="modal-hero-wrapper"><img src="${imageUrl}" alt="${modelName}" class="modal-hero-img" referrerpolicy="no-referrer" onerror="this.parentElement.style.display='none'" /></div>` : ''; - Event listener:
openSpecModal(btn.dataset.name, btn.dataset.size, btn.dataset.layers, btn.dataset.image);
C. /opt/SAKSelector/templates/index.html
- Added:
<meta name="referrer" content="no-referrer">inside<head>. - Asset cache strings incremented up to
?v=2.9.
[4] DEPLOYMENT & VERIFICATION PROCEDURES
A. Standard Deployment Command:
Execute when frontend or backend files change:
/usr/local/bin/sakselector-deployB. Verifying Scraper Endpoints from Terminal:
Run from any directory using the project's virtualenv and PYTHONPATH:
PYTHONPATH=/opt/SAKSelector /opt/SAKSelector/venv/bin/python3 -c '
import asyncio
from app.sakwiki_integration import get_sakwiki_modelasync def test(): res = await get_sakwiki_model("Wenger Ranger 70") print("Status: OK | Slug:", res.get("page_slug")) print("Image URL:", res.get("image")) print("Tool count:", len(res.get("tools", {}).get("all", []))) asyncio.run(test()) 'C. Checking Image HTTP Headers Directly:
curl -s -I -H "User-Agent: Mozilla/5.0" "https://sakwiki.com/show_image.php?id=2793"[5] PENDING / FUTURE MAINTENANCE CHECKLIST
-
Edge-Case Slug Mapping:
- If community members report specific models displaying "Failed to load live
specifications from SAKWiki", open/opt/SAKSelector/app/models.jsonand ensure
thewiki_urlfield points to the exact SAKWiki article, OR map it directly in
SLUG_ALIASESinside/opt/SAKSelector/app/sakwiki_integration.py.
- If community members report specific models displaying "Failed to load live
-
Missing Images in SAKWiki Database:
- Models displaying without photos either lack a primary image on SAKWiki or have
images uploaded under non-standard TikiWiki file galleries. If updated, ensure
new IDs are not inIGNORED_IMAGE_IDS.
- Models displaying without photos either lack a primary image on SAKWiki or have
-
Client Browser Cache Invalidation:
- Always remember to bump the version query parameter (e.g.,
?v=3.0) in
/opt/SAKSelector/templates/index.htmlwhenever editing CSS or JS to ensure
returning visitors pull fresh assets immediately.
================================================================================
- Always remember to bump the version query parameter (e.g.,
Plus it's been launched today, October 20, 2026.
Def
-
================================================================================
SAKSELECTOR SECURITY, HARDENING & ARCHITECTURE AUDIT LOG
Date: October 27, 2026
Host: SAKSelector-Server (Hetzner Cloud CX23)
Domain: https://sakselector.org- EXECUTIVE SUMMARY
SAKSelector runs a containerized FastAPI/Uvicorn backend supervised by systemd,
reverse-proxied via native host Nginx with automated Let's Encrypt SSL. The audit
identified an unnecessary exposed port in UFW, disabled SSH brute-force defense,
missing web security headers, and an unthrottled API reverse proxy. All items have
been resolved, tested, and verified.- REMEDIATION & HARDENING ACTIONS TAKEN
A. Firewall & Network Perimeter (UFW):
- Finding: Port 8000/tcp was explicitly allowed from Anywhere (v4/v6) in UFW.
- Action: Removed port 8000 rules. Docker binds to 127.0.0.1:8000 only.
- Current State: Only ports 22 (SSH), 80 (HTTP), and 443 (HTTPS) are open.
B. SSH Brute-Force Defense (Fail2ban):
- Finding: Fail2ban was installed but inactive and disabled on boot.
- Action: Enabled and started fail2ban.service targeting /var/log/auth.log.
- Verification: Active and functioning; immediately trapped and banned active
probing IPs (e.g., 2.57.122.150, 195.178.110.30).
C. Web Server & Reverse Proxy (Nginx):
- Cleaned up conflicting legacy configuration symlink in /etc/nginx/sites-enabled/.
- Added rate-limiting zone 'sak_limit' (10 req/s, burst 20, nodelay) to guard
against aggressive scraping and DoS attempts on search/model endpoints. - Injected mandatory security headers:
- X-Frame-Options: SAMEORIGIN
- X-Content-Type-Options: nosniff
- Referrer-Policy: strict-origin-when-cross-origin
- Strict-Transport-Security: max-age=31536000; includeSubDomains
- Added X-Forwarded-Proto $scheme to ensure FastAPI handles HTTPS redirects cleanly.
D. Backend & SAKWiki Integration:
- Supervised under systemd (/etc/systemd/system/sakselector.service).
- Confirmed asynchronous non-blocking scraping using httpx.AsyncClient.
- Verified 12.0s hard network timeout on external wiki calls to avoid worker hangs.
- Confirmed 1-hour in-memory caching (CACHE_TTL = 3600) to protect SAKWiki.
- Live query test on /sakwiki/model/SwissChamp returned HTTP 200 with full
parsed tool/dimension metadata.
- CURRENT RUNNING CONFIGURATION
Services:
- Nginx (Host): Reverse proxy & SSL termination
- Docker Container: sakselector-api (sakselector:latest) -> 127.0.0.1:8000
- Systemd Unit: sakselector.service (auto-restart enabled)
- Fail2ban: Active (sshd jail monitoring)
Firewall (UFW Active):
- 22/tcp ALLOW IN Anywhere (v4/v6)
- 80/tcp ALLOW IN Anywhere (v4/v6)
- 443/tcp ALLOW IN Anywhere (v4/v6)
- VERIFICATION COMMANDS
Check Fail2ban: fail2ban-client status sshd
Check Nginx: nginx -t && systemctl status nginx
Check App: systemctl status sakselector.service
Test Live API: curl -s https://sakselector.org/sakwiki/model/SwissChamp================================================================================
END OF AUDIT LOG - SAKSELECTOR HARDENED & OPERATIONAL
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login