Tea journaling on ATProto (alpha)
Go 52%
templ 23%
CSS 11%
Svelte 8%
TypeScript 4%
Nix 2%
JavaScript <1%
Just <1%
<1%

README.md

Oolong #

Tea tracking application built on AT Protocol.

Oolong is a fork of Arabica. The legacy Arabica application is no longer included; this repository contains the Oolong app and its shared infrastructure.

Development is on Tangled, and is mirrored to GitHub:

Quick Start #

# Using Nix
nix run

# Or with Go
templ generate
go run ./cmd/oolong

Access at http://127.0.0.1:18920.

Configuration #

Command-Line Flags #

  • --known-dids <file> - Path to file with DIDs to backfill on startup (one per line)

Environment Variables #

  • PORT - Server port (default: 18920)
  • SERVER_PUBLIC_URL - Public URL for reverse proxy deployments (e.g., https://oolong.example.com)
  • OOLONG_DB_PATH - OAuth session database path. Defaults to <XDG_DATA_HOME or ~/.local/share>/oolong/oolong.db. Only needed to override the default location.
  • OOLONG_PROFILE_CACHE_TTL - Profile cache duration (default: 1h)
  • OAUTH_CLIENT_ID - OAuth client ID (optional, uses loopback mode if not set)
  • OAUTH_REDIRECT_URI - OAuth redirect URI (optional)
  • SECURE_COOKIES - Set to true for HTTPS (default: false)
  • LOG_LEVEL - Logging level: debug, info, warn, error (default: info)
  • LOG_FORMAT - Log format: console, json (default: console)

Development #

Prerequisites #

  • Go 1.26+
  • Templ: go install github.com/a-h/templ/cmd/templ@latest
  • just (optional but recommended); run helpers in justfile

Setup #

  1. Create roles.json with moderator roles. Env var: OOLONG_MODERATORS_CONFIG=roles.json
  2. (Optional) Create known-dids.txt with one DID per line. Flag: -known-dids known-dids.txt

Running #

With Nix:

nix develop
templ generate
go run ./cmd/oolong

Without Nix, there are run helpers in justfile:

just run          # dev server: debug logging, hot reload, moderator config
just test         # run tests (regenerates templ first)
just templ-watch  # run with live template regeneration

CSS and JS are bundled in-process at server startup — no external build step needed. For development set OOLONG_DEV=1 to enable CSS+JS hot reload and unlock dev-only signup providers (e.g. pds.rip on /join/create).


Deployment #

Reverse Proxy Setup #

When deploying behind a reverse proxy (nginx, Caddy, Cloudflare Tunnel, etc.), set the SERVER_PUBLIC_URL environment variable to your public-facing URL:

# Example with nginx reverse proxy
SERVER_PUBLIC_URL=https://oolong.example.com
SECURE_COOKIES=true
PORT=18920

# The server listens on 127.0.0.1:18920
# But OAuth callbacks use https://oolong.example.com/oauth/callback

The SERVER_PUBLIC_URL is used for OAuth client metadata and callback URLs, ensuring the AT Protocol OAuth flow works correctly when the server is accessed via a different URL than it's running on.

License #

MIT