Coffee journaling on ATProto (alpha) alpha.arabica.social
coffee
14
fork

Configure Feed

Select the types of activity you want to include in your feed.

Go 62.9%
Svelte 31.2%
JavaScript 3.6%
Nix 1.3%
HTML 0.5%
Dockerfile 0.2%
CSS 0.1%
Just 0.1%
95 18 0

Clone this repository

https://tangled.org/arabica.social/arabica https://tangled.org/did:plc:chqc2ockzmyvlrasfb66x64a/arabica
git@tangled.org:arabica.social/arabica git@tangled.org:did:plc:chqc2ockzmyvlrasfb66x64a/arabica

For self-hosted knots, clone URLs may differ based on your setup.

Download tar.gz
README.md

Arabica#

Coffee brew tracking application build on ATProto

Development is primarily happening on Tangled, and is mirrored to GitHub:

Features#

  • Track coffee brews with detailed parameters
  • Store data in your AT Protocol Personal Data Server
  • Community feed of recent brews from registered users (polling or real-time firehose)
  • Manage beans, roasters, grinders, and brewers
  • Mobile-friendly PWA design

Quick Start#

# Using Nix
nix run

# Or with Go
go run cmd/arabica-server/main.go

Access at http://localhost:18910

Docker#

Build and run with Docker Compose:

docker compose -f deploy/compose.yml up -d

For production deployments, configure environment variables in docker-compose.yml:

environment:
  - SERVER_PUBLIC_URL=https://arabica.example.com

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: 18910)
  • SERVER_PUBLIC_URL - Public URL for reverse proxy deployments (e.g., https://arabica.example.com). When set to an HTTPS URL, secure cookies are automatically enabled.
  • ARABICA_DB_PATH - BoltDB path (default: ~/.local/share/arabica/arabica.db)
  • ARABICA_FEED_INDEX_PATH - Firehose index BoltDB path (default: ~/.local/share/arabica/feed-index.db)
  • ARABICA_PROFILE_CACHE_TTL - Profile cache duration (default: 1h)
  • OAUTH_CLIENT_ID - OAuth client ID (optional, uses localhost mode if not set)
  • OAUTH_REDIRECT_URI - OAuth redirect URI (optional)
  • LOG_LEVEL - Logging level: debug, info, warn, error (default: info)
  • LOG_FORMAT - Log format: console, json (default: console)

Development#

# Enter development environment
nix develop

# Run server
go run cmd/arabica-server/main.go

# Run tests
go test ./...

# Build
go build -o arabica cmd/arabica-server/main.go

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://arabica.example.com
PORT=18910

# The server listens on localhost:18910
# But OAuth callbacks use https://arabica.example.com/oauth/callback
# Secure cookies are automatically enabled when SERVER_PUBLIC_URL uses HTTPS

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.

NixOS Deployment#

See docs/nix-install.md for NixOS deployment instructions.

License#

MIT