Example DBBasic apps (an API, a blog and a microblog) and a template for new DBBasic modules.

0 downloads

Download zip
Clone
Clone with git
git clone https://gitstable.com/git/askrobots/dbbasic-examples.git
HTTPS
https://gitstable.com/git/askrobots/dbbasic-examples.git
SSH
ssh://git@gitstable.com:2222/askrobots/dbbasic-examples.git

Cloning needs no sign-in. Pushing over HTTPS asks for your username and an access token. SSH needs your key under SSH keys.

danq9 Add official module template for creating DBBasic packages 17cf88a 1 year, 1 month ago History
README.md · 1.1 KB · 46 lines

Microblog

Twitter-like social app built with dbbasic-web

Features

  • User registration and login (dbbasic-accounts + Argon2id hashing)
  • Post updates
  • Follow/unfollow users
  • Personal timeline
  • User profiles
  • Unix-style file structure (etc/, home/, var/)
  • TSV file storage
  • Filesystem-based routing
  • Jinja2 templates

What we DON'T do

No "degrees of separation" / friend-of-friend queries

Why? This killed Friendster. Computing "friends of friends" or "6 degrees of separation" requires recursive graph traversal that gets exponentially slower with scale. Friendster's profile pages took 30-40 seconds to load because of this.

We keep it simple:

  • Direct follows only
  • Simple timeline queries
  • Fast and scalable

As Why the Lucky Stiff said: "Chunky Bacon!" Keep it simple.

Setup

pip install -r requirements.txt
python manage.py serve

Visit http://localhost:8000

Database Schema

posts.tsv

  • id, username, content, created

follows.tsv

  • follower, following, created

All queries are simple lookups - no joins, no recursion.