journal: record daily log for 2026-10-01
Brain Structural Validation / Validate Markdown Structure & Links (push) Successful in 6s
Brain Structural Validation / Validate Markdown Structure & Links (push) Successful in 6s
This commit is contained in:
1 parent
4b97bb8626
commit
65fb89f8a0
1 file changed
+70
@@ -0,0 +1,70 @@
|
|||||||
|
---
|
||||||
|
type: journal
|
||||||
|
project: brain
|
||||||
|
date: 2026-10-01
|
||||||
|
tags:
|
||||||
|
- homelab
|
||||||
|
- bdinvite
|
||||||
|
- nixos
|
||||||
|
- firewall
|
||||||
|
- biome
|
||||||
|
- architecture
|
||||||
|
- deployment
|
||||||
|
---
|
||||||
|
|
||||||
|
# Daily Journal: 2026-10-01
|
||||||
|
|
||||||
|
## Wins
|
||||||
|
|
||||||
|
### BDInvite Full-Stack Lifecycle & Production Deployment
|
||||||
|
- Engineered, validated, and successfully deployed **BDInvite** ([`06-projects/bdinvite/README.md`](../../06-projects/bdinvite/README.md)) to production at [`demos.roadtotech.me/birthday`](https://demos.roadtotech.me/birthday), delivering an interactive digital birthday invitation with real-time countdown, venue mapping, guest RSVP registration, and an administrative control panel.
|
||||||
|
- **Frontend Architecture**: Built with React 19, Vite, Tailwind CSS v4, Motion, Lucide React, and `canvas-confetti`. Configured self-hosted typography (`Playfair Display` and `Plus Jakarta Sans`) bundled locally as `.woff2` files in static distribution assets, eliminating runtime calls to third-party font CDNs and protecting guest privacy.
|
||||||
|
- **Backend Architecture**: Implemented with FastAPI running on Python 3.11 (`uvicorn`, managed via `uv`) with an embedded SQLite database operating in Write-Ahead Logging mode (`PRAGMA journal_mode=WAL;`). Included Colombian mobile phone number normalization (`+57 3XX...` $\to$ `3XXXXXXXXX`) with database-level uniqueness constraints for deduplication.
|
||||||
|
- **Edge Routing & Ingress Separation**: Designed a single-container multi-stage Docker build (`node:20-alpine` build stage $\to$ `ghcr.io/astral-sh/uv:python3.11-bookworm-slim` runtime). Deployed to Traefik v3 with path-based priority routing on `demos.roadtotech.me`:
|
||||||
|
- Priority 10: Public guest route on `/birthday` and `/birthday/api/*`.
|
||||||
|
- Priority 20: Authelia ForwardAuth SSO route on `/birthday/admin` and `/birthday/api/admin/*`.
|
||||||
|
- **Defense-in-Depth Authentication**: Admin API endpoints independently verify the presence of the `Remote-User` header injected by Authelia ForwardAuth, rejecting unauthenticated requests with HTTP 401 and preventing anonymous access if proxy rules are bypassed.
|
||||||
|
- **Homelab Orchestration**: Integrated into `appctl` with an `app.yaml` manifest declaring the `demos.roadtotech.me` domain, `BASE_PATH=/birthday`, and membership in the shared `proxy-net` Docker network.
|
||||||
|
|
||||||
|
### NixOS Declarative Dynamic Trusted Wi-Fi Firewall (Prototype)
|
||||||
|
- Designed an event-driven dynamic firewall architecture for mobile NixOS workstations in `~/Config/system/core.nix`, addressing port-management friction during local development.
|
||||||
|
- Implemented a custom `iptables` sub-chain (`nixos-fw-lan`) managed by a NetworkManager dispatcher script triggered on network connection events:
|
||||||
|
- Dynamically unblocks arbitrary incoming development ports (FastAPI on `:8000`, Vite on `:5173`) when connected to the trusted home SSID ("VICTORIA").
|
||||||
|
- Automatically locks down ingress traffic upon disconnecting or roaming to untrusted public Wi-Fi networks.
|
||||||
|
- Documented the architecture and verification procedure in [`04-learning/guides/nixos/dynamic-trusted-wifi-firewall.md`](../../04-learning/guides/nixos/dynamic-trusted-wifi-firewall.md), explicitly marking it as `status: testing` pending further field verification.
|
||||||
|
|
||||||
|
### Biome Monorepo VCS Symmetry & Root Resolution
|
||||||
|
- Investigated and resolved tooling configuration asymmetry in polyglot monorepos where backend tools (`uv`, `ruff`, `pytest`) traverse directories cleanly while frontend linters (Biome) fail when nested in subdirectories without local `.gitignore` files.
|
||||||
|
- Codified Biome v2's `vcs.root: ".."` resolution in [`04-learning/knowledge/technologies/biome-monorepo-vcs-symmetry.md`](../../04-learning/knowledge/technologies/biome-monorepo-vcs-symmetry.md), preserving clean subdirectory tool encapsulation without polluting repository roots.
|
||||||
|
|
||||||
|
### Hermetic Workstation Nix Development Shell
|
||||||
|
- Configured a hermetic, reproducible `flake.nix` development shell for `Sites/bdinvite` packaging Node.js 20, Python 3.11, `uv`, `biome`, and `sqlite3`, enabling isolated development without global system package pollution.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Planning & Specifications
|
||||||
|
|
||||||
|
- [BDInvite Architecture & Deployment Decision Record](../../03-records/decisions/bdinvite-architecture-and-deployment.md)
|
||||||
|
- MADR 4.0 capturing single-container multi-stage packaging, split Traefik priority routing, Authelia ForwardAuth defense-in-depth, and self-hosted typography.
|
||||||
|
- [BDInvite Implementation Plan](../../01-plans/bdinvite/implementation-plan.md)
|
||||||
|
- Phased technical execution plan (P0–P5) covering Docker packaging, FastAPI backend, React 19 frontend, Traefik split routing, and deployment.
|
||||||
|
- [Digital Invitation Frontend Specification](../../01-plans/bdinvite/frontend-specification.md)
|
||||||
|
- Responsive design principles, particle canvas architecture, typography, and guest/admin state transitions.
|
||||||
|
- [BDInvite System Topology Hub](../../06-projects/bdinvite/README.md)
|
||||||
|
- Project hub documenting architecture, repository locations, network topology, and database models.
|
||||||
|
- [Dynamic Trusted Wi-Fi Firewall Guide](../../04-learning/guides/nixos/dynamic-trusted-wifi-firewall.md)
|
||||||
|
- Technical guide capturing the NetworkManager dispatcher + iptables sub-chain architecture on mobile NixOS workstations (`status: testing`).
|
||||||
|
- [Biome Monorepo VCS Symmetry Knowledge Note](../../04-learning/knowledge/technologies/biome-monorepo-vcs-symmetry.md)
|
||||||
|
- Architectural note on polyglot monorepo tooling symmetry and VCS root resolution.
|
||||||
|
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Technical Reflections
|
||||||
|
|
||||||
|
- **Defense-in-Depth vs. Edge Reliance**:
|
||||||
|
- Relying solely on reverse proxy routing (Traefik path rules) for authentication is a brittle single point of failure. If proxy labels are misconfigured, private endpoints become public. By requiring the backend to independently verify identity headers (`Remote-User`), the application remains secure regardless of edge misconfigurations.
|
||||||
|
- **Subpath Micro-Workload Consolidation**:
|
||||||
|
- Hosting multiple lightweight demonstration or personal apps on dedicated subpaths of a shared subdomain (`demos.roadtotech.me/<app>`) reduces DNS and certificate sprawl, but requires strict base path encapsulation (`base: '/<app>/'` in Vite, `FastAPI(root_path='/<app>')`, and careful trailing slash normalization).
|
||||||
|
- **Single-Container Multi-Stage Efficiency**:
|
||||||
|
- For simple web apps with low concurrency, avoiding multi-container deployments (frontend webserver + backend API + external DB) significantly reduces host memory pressure and operational cognitive load while still preserving modern decoupled development workflows.
|
||||||
Reference in new issue
Block a user