• ☐
  • THE CREATION OF OLDSC AND FORUM OLDSC **** page size: 4587 bytes

The Creation of oldsc and forum-oldsc

Introduction

This blog post covers the creation of two sister projects: oldsc (oldschool.technology) and forum-oldsc (the oldschool.technology forum). Both are written in V (vlang.io) and share a SQLite database for user management.

The Vision: oldschool.technology (oldsc)

The original project, oldsc, was conceived as a Hacker News / Lobsters clone with a distinct aesthetic: old-school web design inspired by Unix terminals and CRT displays. The requirements were clear from the start:

  • Technology stack: V language with SQLite3
  • Visual style: Amber/green/white phosphor CRT aesthetic with terminal-inspired layouts
  • Core features: Link and text submissions, threaded comments, voting/karma, tags, search, RSS, user profiles
  • Admin user: A bootstrap administrator named sarmonsiill
  • Registration flow: New accounts start as disabled with approved_by_admin = false, requiring manual admin approval
  • Security: CAPTCHA + proof-of-work registration, CSRF protection, rate limiting, secure cookies

The project evolved into a full-featured link aggregator with:

  • Server-rendered pages with minimal JavaScript (clock, keyboard shortcuts, PoW worker)
  • CAPTCHA-only registration path for non-JavaScript browsers
  • Self-hosted SHA-256 proof-of-work (no external dependencies)
  • SQLite-backed rate limits surviving restarts
  • Legacy browser support: NetSurf receives a dedicated CSS 2.1 terminal layout (netsurf.css) with stacked sidebar panels and conventional forms; Links and other text-mode browsers render cleanly thanks to semantic HTML and graceful degradation
  • Production hardening: __Host- cookies, trusted proxy validation, security audit logging

The Sister Site: forum-oldsc

After oldsc was functional, the need arose for a dedicated discussion forum — a "sister site" that would:

  • Share the same user accounts and sessions via the same SQLite database
  • Mirror the CRT visual style (amber phosphor, terminal layout)
  • Provide a different interaction model: categories → topics → flat comments (no nested replies)
  • Reuse admin tooling: existing oldsc administrators automatically administer the forum

Key design decisions:

  • Database separation: forum creates only forum_* tables, leaving oldsc's schema untouched
  • Shared authentication: Same bcrypt hashes, same sessions table, same ost_session cookie
  • Session behavior: On same hostname, sessions transfer automatically; on subdomains, users log in separately with same credentials
  • Admin capabilities: Category CRUD, user banning, topic/comment moderation (hide/moderate/restore/delete)
  • Flat comment structure: Explicitly no recursive threading — one level of comments per topic
  • Legacy browser parity: NetSurf receives static/netsurf.css (CSS 2.1 terminal layout); Links and other text-mode browsers work without JavaScript
  • Future protocol support: A Gemini protocol (gemini://) interface is planned, serving the same content over the lightweight Gemini protocol for maximum accessibility across legacy and alternative clients

Shared Infrastructure

Both projects deploy from the same VPS with:

  • Shared database: /var/lib/oldschool/oldschool.db with SQLite WAL mode
  • Reverse proxy: Caddy terminating TLS, forwarding to 127.0.0.1:8080 (oldsc) and 127.0.0.1:8081 (forum)
  • Systemd units: Hardened service files with filesystem restrictions
  • Daily backups: SQLite online backup API via Python, retaining 14 snapshots
  • Security limits table: Shared login throttling across both applications

Development Workflow

# oldsc
make build && ./oldsc

# forum-oldsc (requires oldsc's initialized database)
OST_DB_PATH=/path/to/oldsc/oldschool.db make build && ./forum

Testing:

  • make test in each repo — isolated integration tests with disposable databases
  • make test-production in forum-oldsc — exercises both binaries against a shared test database

Purpose Summary

| Project | Purpose | |---------|---------| | oldsc | A CRT-styled link/discussion board (HN/Lobsters clone) with strict registration controls and admin approval | | forum-oldsc | A flat-comment forum sharing oldsc's accounts, sessions, and visual identity — extending the community with category-based discussions |

Together they form a cohesive, self-hosted community platform built entirely in V with zero external authentication dependencies, designed for deployment on a single VPS with shared SQLite storage.