Technical Articles & Tutorials

Building DBBasic: A Framework That Teaches While You Build

After months of focused development, the DBBasic framework has reached a major milestone: eleven published modules on PyPI, a clear philosophy, and real-world usage validating the approach. This post celebrates what's been accomplished and shares what's coming next.

The Problem: Frameworks That Hide Primitives

Most web developers have never implemented fundamental patterns like session management, job queues, or event sourcing. Instead, they install Django, Celery, and Redis, copy configuration from Stack Overflow, and hope it works. When things break, they can't debug because they never understood what was happening.

What's Lost

In the CGI/Unix era, every web developer knew:

  • How cookies work (you set them manually)
  • How background jobs work (cron + scripts)
  • How logging works (write to files)
  • How to debug (cat the files)

Now these primitives are hidden behind frameworks, and developers think these are "complex enterprise patterns" instead of fundamental web programming building blocks.

The DBBasic Philosophy: Start Simple, Measure, Upgrade

DBBasic modules follow a consistent philosophy across all components:

  • Day 1: Everything works - Start with files, TSV, cookies, or other simple backends
  • Build features, not infrastructure - Focus on your application, not configuration
  • Measure performance - Upgrade based on data, not fear
  • Swap backends when needed - Interface stays the same, implementation can change
  • Most apps never need to upgrade - Single-server solutions handle more than you think

The 10x Advantage

It's not about code speed—it's about removing obstacles:

  • Django/Rails developer: Week 1 setup, Week 2 learning, Week 3 first feature, Week 4 debugging
  • DBBasic developer: Day 1 install and ship, Day 2 add background jobs, Day 3 add logging, Day 4 building product

Published Modules: The Foundation

All eleven modules are published on PyPI and follow the same design principles:

dbbasic-tsv

Database as code - TSV files + Git for version control, backup, and replication.

Instead of PostgreSQL setup, just create a .tsv file. Each row is a record, Git provides full history and rollback, and .idx index files give O(1) lookups. This very blog runs on dbbasic-tsv with 60+ articles.

Real-world usage: Powers quellhorst.com content management

dbbasic-pipe

Unix pipes without the Unix baggage - Bidirectional communication solved.

Traditional Unix pipes are one-way. This module provides clean bidirectional pipes for process communication without socket complexity. Recently published with a novel solution to the two-way pipe problem.

dbbasic-web

Web primitives - Request/response handling the Unix way.

Clean abstractions for HTTP without framework overhead. Handles routing, requests, and responses with minimal magic.

dbbasic-content

Block-based content system - Separate content from presentation.

JSON-based content blocks (paragraph, heading, card, list) that render through templates. Content is portable across any rendering system.

dbbasic-rss

RSS feed generation - From any data source to valid RSS/Atom.

One-liner generates RSS from TSV: rss.from_tsv('articles.tsv'). Works with Flask, Django, FastAPI, or static generators. Browser-friendly with HTML previews.

Just published: Available on PyPI and GitHub

dbbasic-sessions

Signed cookies, stateless sessions - 15 lines of code.

Learn how sessions actually work (HMAC-signed cookies with user_id) while implementing them. No Redis required for most apps.

dbbasic-queue

TSV-based job queue - 50 lines with retry logic.

Persistent job queue using TSV + worker processes. When you outgrow it, swap to Redis—interface stays the same.

dbbasic-logs

Structured logging - Sentry replacement for single servers.

Write structured logs to files, search them with grep/ripgrep, compress old ones. For most apps, this is all you need.

dbbasic-events

Event sourcing made simple - Append-only log with replay.

Start with file-based event log, understand the pattern, upgrade to Kafka only when you measure the need.

dbbasic-video

Video processing utilities - FFmpeg wrappers done right.

Clean interfaces for common video operations without fighting FFmpeg command-line complexity.

dbbasic-accounts

User account management - Authentication primitives.

Email verification, password handling, account creation patterns that you can understand and customize.

dbbasic-email

Email sending simplified - SMTP without the pain.

Send emails without wrestling with MIME multipart complexity. Templates, attachments, HTML/text alternatives made straightforward.

Real-World Validation: This Blog

Quellhorst.com is now running on dbbasic-tsv for content management. The migration from JSON files to TSV demonstrated the philosophy in action:

  • All 60+ articles stored in a single data/articles.tsv file
  • Git provides version control, rollback, and deployment
  • Index files (.idx) rebuilt automatically for fast lookups
  • Removed 43 legacy HTML templates (~21,000 lines of code)
  • Dynamic routing with catch-all Flask pattern
  • Content blocks (JSON) stored in TSV for flexible rendering

Benefits Already Seen

  • Simplicity: No database server to manage, configure, or back up
  • Git integration: Full audit trail of every content change with commit messages
  • Deployment: Just git push—data and code deploy together
  • Debugging: Open the .tsv file, see the data, use standard Unix tools
  • Performance: In-memory index provides O(1) lookups for 60+ articles

The Single-Server Reality

Modern hardware changes everything. A single $200/month cloud VM with 32 cores and 128GB RAM can handle 100K users easily, yet most apps have under 10K users. We're using distributed systems architecture for single-server problems.

The Modern Irony

2000s thinking: "We need to handle millions of users across hundreds of servers!"

2025 reality: Most apps run on one server with resources to spare.

DBBasic recognizes this: start with Unix patterns for single servers, graduate to distributed systems when you measure the need—not when you imagine you might need it.

Teaching While You Build

DBBasic modules aren't just tools—they're educational. By implementing them, you learn the patterns that big frameworks hide:

dbbasic-sessions teaches

  • How signed cookies work
  • Why HMAC prevents tampering
  • What sessions actually are (just user_id)
  • Why Flask/Rails chose this pattern

dbbasic-queue teaches

  • How job queues work (TSV + worker)
  • Why Celery exists (distribution)
  • When you actually need Redis
  • How retry logic works

dbbasic-events teaches

  • What event sourcing is
  • How to replay state from events
  • Why Kafka exists (real-time, multi-server)
  • When append-only logs make sense

You're not just using tools—you're understanding the fundamental patterns of web development that should be common knowledge but have been hidden away.

What's Next: Beyond Python Frameworks

With ten modules published and real-world validation, the next milestone is close: migrating my own projects away from Django and Flask to use DBBasic components directly.

The Migration Plan

Instead of pip install django bringing in hundreds of dependencies and complex configuration:

pip install dbbasic-web
pip install dbbasic-sessions
pip install dbbasic-queue
pip install dbbasic-logs
pip install dbbasic-tsv

# Each module: simple, understandable, composable
# No framework magic, just clean patterns

These modules work together because they share the same philosophy and formats. Complete, tested, documented—not "framework in progress."

Not Reinventing, Reconnecting

DBBasic isn't pure Unix, and it's not trying to be. It's a hybrid approach that takes the best of multiple eras:

  • Unix philosophy: Plain text, composition, small tools
  • Modern conveniences: Python, structured data (TSV/JSON), package management
  • Without the baggage: No distributed systems complexity unless needed

It's reconnecting modern developers with the fundamental patterns that work, stripped of the complexity that most applications don't need.

Complete Tools, Not Half-Baked Packages

The npm/pip ecosystem problem:

  • Install 47 packages
  • Configure 12 of them
  • Hope they work together
  • Update breaks everything
  • Half are abandoned

DBBasic approach: each module just works. They're designed together with the same philosophy, same formats, same patterns. Not a collection of random packages, but a cohesive toolkit.

The Correct Way Exists

There is a correct way to handle these web programming primitives:

Sessions

Signed cookies (stateless, fast, simple). No session store needed for most apps.

Queue

Persistent storage + workers + retry logic. Start with files, upgrade to Redis if needed.

Events

Append-only log + replay capability. Files work until you need real-time distribution.

Logs

Structured, searchable, compressed. Write to files, search with grep, compress old ones.

Data

TSV + Git for content, SQL for transactions. Right tool for the job, not one-size-fits-all.

Nobody teaches these patterns because frameworks hide them. DBBasic makes the primitives visible, understandable, and actually simpler than the frameworks.

Conclusion: From Accomplishment to Migration

Ten published modules. Real-world usage. Benefits already observed. The DBBasic framework has proven its philosophy works in practice, not just in theory.

The next step is migrating away from Django and Flask entirely—using DBBasic components to build applications with less complexity, better understanding, and the confidence that comes from knowing exactly how your stack works.

You Learn By Doing, Not By Configuring

That's the real accomplishment: creating tools that teach while you build, that work on Day 1, and that scale when you need them to—not before.

Web development's primitives were never complex. They just got hidden. DBBasic brings them back into the light.

About

Why fear those copying you, if you are doing good they will do the same to the world.

Explore Topics

Simple > Complex (16) Evolution Series (12) Contrarian Takes (9) Architecture (9) Information Mgmt (9) Accounting (5) Unix Philosophy (4) Self-Hosting (4) 90% Cheaper (3)

Optimize Your Website!

Is your WordPress site running slowly? I offer a comprehensive service that includes needs assessments and performance optimizations. Get your site running at its best!

Check Out My Fiverr Gig!