How bookwyrm-social/bookwyrm works
Project type and purpose
• BookWyrm is a full-stack, open-source social-reading web application.
• It’s built on Django (Python), backed by PostgreSQL, with federated ActivityPub support, Celery for background tasks, and Redis as both a message broker and activity-stream cache.
• It provides a web UI (Django templates + Bulma CSS + vanilla JS), REST/ActivityPub endpoints, import connectors to external book data services, and a task queue for asynchronous work.
File structure
• Top level:
• bookwyrm/ – Django app (models, views, templates, static assets, ActivityPub logic, connector modules, management commands, etc.)
• celerywyrm/ – Celery “microservice” (app definition, worker settings, ASGI entry point)
• Dockerfile, docker-compose.yml – container build and orchestration
• nginx/ – reverse-proxy configs and SSL bootstrap scripts
• manage.py, gunicorn.conf.py – WSGI entry and Django management
• requirements.txt, pyproject.toml – Python dependencies
• Patterns:
• MVC (Django models/views/templates)
• Modular “connectors” for external services (OpenLibrary, Goodreads, etc.)
• ActivityPub endpoints under bookwyrm/activitypub and bookwyrm/views/wellknown
• Celery tasks defined in bookwyrm/tasks.py, celerywyrm/celery.py
• Deployment artifacts:
• docker-compose.yml orchestrates web, worker, Redis, PostgreSQL, Nginx, Flower
• contrib/systemd for running as services on a host
README for additional insights
• Tech stack confirms Django + PostgreSQL + Redis + Celery + Gunicorn + Nginx + Docker.
• Federation via ActivityPub—communication with Mastodon/Pleroma and other BookWyrm instances.
• Front end is server-rendered; no SPA, but uses client JS for autocompletion, guided tours, etc.