I built ShareBox: self-hosted file sharing in PHP 8.1 with no framework, SQLite, and FFmpeg for adaptive video streaming. The technical choices and what it taught me about the zero-dependency philosophy.
SFTP capped at 800 KB/s on a Gbit link. CUBIC, default ring buffers, misconfigured socket buffers — five kernel and daemon tweaks that bring throughput from 800 KB/s to several MB/s.
Implementing an append-only event store in Go with PostgreSQL: es_events table, subscriptions for projectors, replay from any point. No need for EventStoreDB.
The Handle(ctx, state, cmd) (Events, error) signature makes handlers testable without mocks, without DB, without Docker. The secret: zero side effects.
Idempotent commands with idempotency key, optimistic locking on aggregates, idempotent projections and outbox pattern. The 4 idempotency layers of a production Event Sourcing system.
What idempotency is, why it's crucial (retries, double-click, at-least-once), and how to implement it in Go: HTTP middleware, unique DB constraint, concurrency handling.
Complete security audit of a Debian 12 server after a brute force attack: custom fail2ban, SSH/SFTP chroot, auditd, permissions, automated AI audit, Docker, HTTP headers.
Complete method for diagnosing a slow PostgreSQL query: EXPLAIN ANALYZE, missing indexes (B-tree, GIN, BRIN), stale statistics, pg_stat_statements. From diagnosis to production fix, no fluff.