AnarcosyndicalismeBOOK is a specialized CMS (Content Management System) tailored for digital libraries. It allows you to create and manage an online library of activist texts, PDF documents, and EPUB ebooks. https://anarcosyndicalismebookcms.unionlibertaireanarchiste.org/
  • PHP 48.3%
  • HTML 45.2%
  • CSS 2.1%
  • JavaScript 2.1%
  • Shell 1.8%
  • Other 0.5%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-10-11 04:14:25 +02:00
admin fix: harden import error handling 2026-10-11 03:59:52 +02:00
api fix: harden import error handling 2026-10-11 03:59:52 +02:00
assets feat: harden beta administration and imports 2026-10-11 03:35:56 +02:00
backups feat(release): v1.3.0-beta.1 - Sauvegardes Tout-en-Un, PWA hors-ligne, modernisations UX et robustesse 2026-08-25 22:46:14 +02:00
cache sec: interdire l'accès web direct et le listing sur logs, cache, backups, api/temp_migration et bloquer toute exécution de scripts dans uploads 2026-09-19 19:24:42 +02:00
docker feat: harden beta administration and imports 2026-10-11 03:35:56 +02:00
docs fix: remove accidental import examples 2026-10-11 03:36:59 +02:00
icons Initial commit 2025-12-15 03:05:54 +01:00
includes feat: harden beta administration and imports 2026-10-11 03:35:56 +02:00
languages i18n: translate mass import messages 2026-10-11 03:34:58 +02:00
logs sec: interdire l'accès web direct et le listing sur logs, cache, backups, api/temp_migration et bloquer toute exécution de scripts dans uploads 2026-09-19 19:24:42 +02:00
releases docs: document v1.3.1 beta 4 pre-release 2026-10-11 04:14:25 +02:00
sql feat: harden beta administration and imports 2026-10-11 03:35:56 +02:00
tests/import-massif test(import): script de rejeu HTTP des deux écrans et vérification du résultat 2026-10-10 21:22:21 +02:00
tools feat(release): v1.3.0-beta.1 - Sauvegardes Tout-en-Un, PWA hors-ligne, modernisations UX et robustesse 2026-08-25 22:46:14 +02:00
tools-restricted Maintenance: align bootstrap utilities 2026-10-05 18:59:01 +02:00
uploads feat: harden beta administration and imports 2026-10-11 03:35:56 +02:00
vendor feat: support shared-hosting installs 2026-04-18 19:52:22 +02:00
.dockerignore fix(security): exclude logs from Docker image 2026-08-23 13:34:51 +02:00
.gitignore test(import): script de rejeu HTTP des deux écrans et vérification du résultat 2026-10-10 21:22:21 +02:00
.htaccess sec: interdire l'accès web direct et le listing sur logs, cache, backups, api/temp_migration et bloquer toute exécution de scripts dans uploads 2026-09-19 19:24:42 +02:00
.user.ini v1.2.76: Multi-auteurs, PDF via URL, notes de bas de page 2026-06-14 19:04:58 +02:00
a-propos.php feat: migrate 'about' page to dynamic content in database 2025-12-17 22:45:35 +01:00
add_image_column.php Maintenance: stabilize setup helpers 2026-10-05 18:43:16 +02:00
auteur.php fix(i18n): Traduction complète des lecteurs (PDF, EPUB, Muse, offline), auteurs, catégories et formulaires newsletter 2026-08-26 20:42:43 +02:00
auteurs.php Harden author index output 2026-10-08 14:46:25 +02:00
auto_prepend.php Fix: Désactivation auto_prepend et inclusion manuelle de force_zip_extension 2026-03-08 23:19:31 +01:00
catalogue.php fix(i18n): fix UTF-8 author initials (%C3 fix), protect footer, sidebar cards and badges against auto-translation artifacts 2026-08-27 18:29:52 +02:00
categorie.php fix(i18n): fix UTF-8 author initials (%C3 fix), protect footer, sidebar cards and badges against auto-translation artifacts 2026-08-27 18:29:52 +02:00
CHANGELOG.md docs: document v1.3.1 beta 4 pre-release 2026-10-11 04:14:25 +02:00
chat.php fix(i18n,ui): internationalize chat, system updates, calibre import and fix social media form layout 2026-08-27 12:55:07 +02:00
check_logs.sh v1.1.7 - Expérience mobile révolutionnaire et système de debug email 2025-12-19 11:08:54 +01:00
check_table.php Maintenance: stabilize setup helpers 2026-10-05 18:43:16 +02:00
composer.json Initial commit 2025-12-15 03:05:54 +01:00
composer.lock feat: support shared-hosting installs 2026-04-18 19:52:22 +02:00
connexion.php fix(auth): rediriger vers index.php si database.php absent et auto-generer configs docker dev 2026-09-19 15:22:53 +02:00
contact.php fix(i18n): protect authentication forms and titles with notranslate across all auth pages 2026-08-27 18:24:41 +02:00
CONTRIBUTING.md Document project contribution workflow 2026-10-08 16:03:40 +02:00
create_codeberg_release.sh chore: make create_codeberg_release.sh read version.php by default 2026-09-19 16:24:41 +02:00
create_directories.php Maintenance: align media directory permissions 2026-10-05 18:44:41 +02:00
cron_backup.php security: blindage défensif anti-Zip Slip et inclusion sécurisée de translate.php 2026-08-25 23:10:10 +02:00
download-pdf.php v1.2.69 - Système d'optimisation PDF 2026-06-05 15:38:17 +02:00
epub-viewer.html feat(release): v1.3.0-beta.1 - Sauvegardes Tout-en-Un, PWA hors-ligne, modernisations UX et robustesse 2026-08-25 22:46:14 +02:00
exemple-formulaire-personnalise.php Correction des problèmes d'authentification admin 2025-12-19 09:53:15 +01:00
export-aln.php release: v1.2.81 - export Muse (ALN), API routes, and advanced search engine 2026-06-20 16:13:14 +02:00
favicon.svg Initial commit 2025-12-15 03:05:54 +01:00
health.php fix(page): corriger la variable slug non définie sur le bouton modifier admin et ajouter endpoint health.php 2026-08-26 00:43:52 +02:00
index.php fix(docker): ne pas rediriger vers install.php en environnement Docker 2026-09-19 15:28:44 +02:00
inscription.php fix(auth): rediriger vers index.php si database.php absent et auto-generer configs docker dev 2026-09-19 15:22:53 +02:00
install.php feat: harden beta administration and imports 2026-10-11 03:35:56 +02:00
install.sh release: v1.3.0 stable 2026-09-06 11:50:39 +02:00
install_email_personalization.php Maintenance: stabilize setup helpers 2026-10-05 18:43:16 +02:00
install_newsletter.php Maintenance: stabilize setup helpers 2026-10-05 18:43:16 +02:00
invitation-admin.php Release v1.2.59 2026-05-04 14:16:39 +02:00
LICENSE docs: Mise à jour LICENSE 2024-2025 AnarcosyndicalismeBOOK 2025-12-16 18:09:07 +01:00
lire.php fix(pdf): annulation propre des rendus concurrents et debouncing resize 2026-09-26 00:08:49 +02:00
livre.php v1.1.7 - Expérience mobile révolutionnaire et système de debug email 2025-12-19 11:08:54 +01:00
logout.php release: Version 1.2.41.0 2026-04-01 12:43:25 +02:00
manifest.json feat(release): v1.3.0-beta.1 - Sauvegardes Tout-en-Un, PWA hors-ligne, modernisations UX et robustesse 2026-08-25 22:46:14 +02:00
mentions-legales.php Initial commit 2025-12-15 03:05:54 +01:00
mes-favoris.php fix(i18n): fix UTF-8 author initials (%C3 fix), protect footer, sidebar cards and badges against auto-translation artifacts 2026-08-27 18:29:52 +02:00
MISE_A_JOUR.md feat(migration): migrate repository, update checks and documentation to Codeberg 2026-08-28 13:27:27 +02:00
mon-compte.php i18n(account): translate password hints, passkeys, and 2FA sections natively in all 42 languages 2026-09-06 23:02:32 +02:00
mot-de-passe-oublie.php fix(i18n): fix duplicate/glued strings in auth forms and translate reset instructions in all 42 languages 2026-08-27 23:10:23 +02:00
newsletter-inscription.php fix(newsletter): load i18n in newsletter-inscription and docker database template 2026-09-06 21:19:02 +02:00
oai.php Prepare beta release updates 2026-10-08 15:59:43 +02:00
offline.html fix(offline): deplacer escapeHtml en portee globale pour resoudre ReferenceError 2026-09-02 02:18:09 +02:00
opds.php fix(ui, i18n): fix API language dropdown overlap, add OPDS translations, clean offline 42 languages 2026-09-02 00:46:51 +02:00
page.php feat(i18n): Couverture totale exhaustive de 491 clés dans les 41 langues, refonte intégrale de l'administration et sécurisation htaccess des dictionnaires 2026-08-26 18:07:48 +02:00
README.md docs: document v1.3.1 beta 4 pre-release 2026-10-11 04:14:25 +02:00
README_FR.md Document project contribution workflow 2026-10-08 16:03:40 +02:00
recherche.php fix(i18n): fix UTF-8 author initials (%C3 fix), protect footer, sidebar cards and badges against auto-translation artifacts 2026-08-27 18:29:52 +02:00
reinitialisation-mot-de-passe.php fix(i18n): fix duplicate/glued strings in auth forms and translate reset instructions in all 42 languages 2026-08-27 23:10:23 +02:00
robots.txt security(api): bloquer l'indexation web des API via X-Robots-Tag et robots.txt 2026-08-26 02:56:09 +02:00
rss.php fix(i18n): achevement de l internationalisation de toutes les pages admin et actions rapides sans emojis 2026-09-05 15:04:05 +02:00
sitemap.php fix(routing): use clean urls in admin menus, pages, docker initialization and sitemap 2026-09-06 22:29:25 +02:00
soumettre.php fix(translate): secure api responses and handle on-demand translation timeouts 2026-09-13 15:42:48 +02:00
sw.js fix(captcha): support du protocole hashwx de Cap 3.1+, ajout de hashwx.wasm et dédoublonnage de cap.js 2026-09-28 19:57:37 +02:00
test-mobile-reading.html feat(release): v1.3.0-beta.1 - Sauvegardes Tout-en-Un, PWA hors-ligne, modernisations UX et robustesse 2026-08-25 22:46:14 +02:00
update.sh Amélioration du système de mise à jour 2025-12-19 09:36:53 +01:00
version.php release: version stable v1.3.1 pour production LAMP 2026-09-19 17:40:01 +02:00

AnarcosyndicalismeBOOK

AnarcosyndicalismeBOOK

Open-access anarcho-syndicalist digital library CMS

Compatible with the Anarchist Library archive network (AmuseWiki / ALN)

Codeberg Demo Version v1.3.1 Long Term Support (LTS) Releases

Compatible Libertarian Anarchist Network (ALN)

YunoHost Package Docker Image

PHP 8.0+ MySQL Bootstrap 5 PWA MIT License

AMD64, ARM64 and ARMv7 Secured Responsive Offline Accessible

"The emancipation of the working classes must be conquered by the working classes themselves." — IWA, 1864


What is it?

AnarcosyndicalismeBOOK is a specialized CMS (Content Management System) tailored for digital libraries. It allows you to create and manage an online library of activist texts, PDF documents, and EPUB ebooks.

Designed for:

  • Collectives, activist groups, unions, and grassroots organizations looking to distribute texts
  • Militant, alternative, or independent digital archives
  • Community document sharing and preserving cultural heritage
  • Self-hosting on personal servers, single-board computers, or shared hosting

Differences compared to generic CMS platforms:

  • Dedicated specifically to circulating texts and literature (not a blog or general e-commerce)
  • Native PDF and EPUB reader built directly into the browser
  • Clean, focused interface without plugin overhead or complex dependencies
  • Lightweight, dependable, and easy to maintain over decades
  • Engineered from the ground up for self-hosting (YunoHost, Raspberry Pi, VPS...)

Note

Release Lifecycle & Long-Term Support (LTS)
The current v1.3.1 release is designated as a Long-Term Support (LTS) / Long Version: its functional scope is frozen and stabilized.

  • Feature Freeze: No new breaking features will alter existing workflows or destabilize this branch.
  • Continuous Maintenance: This version will continue to receive dedicated bugfixes, compatibility refinements, and critical security patches.
  • Upcoming Intermediate Releases: New ongoing features under active development will be published through intermediate releases (Beta / staging channels) prior to being consolidated into the next major version.

See the complete English changelog, the v1.3.1 LTS release notes, and the v1.3.1 beta 4 pre-release notes.

Contributing

Contributions, bug reports, translations, accessibility improvements, and documentation updates are welcome. See CONTRIBUTING.md for the development setup, checks, and pull request guidelines.


Features

Feature Description
Online Reading Native integrated PDF and EPUB viewing with full-screen Zen mode
Mobile Reading Touch-optimized interface featuring smooth swipe gestures and page controls
PDF Printing Direct PDF printing without leaving the reading page
Downloads Export to PDF, EPUB, and Muse format (.muse) for offline reading and ALN exchange
File Uploads Upload and manage TXT, PDF, and EPUB formats from administration
Public Submissions Public form /proposer.php for readers to submit texts with author, metadata, and files
Admin Moderation Approval queue with review, editing, publication, or rejection workflows
Bulk Import Drag-and-drop batch upload for multiple PDF/EPUB files with automatic author creation
Calibre Import Import from metadata.db or remote Calibre Content Server (OPDS) with material types
Multi-Source Imports Import from Wikisource (all languages), The Anarchist Library, Anarchief, Project Gutenberg, Archive.org, Librivox, Standard Ebooks, and any WordPress site (via REST API) with HTML cleaning, anti-SSRF protections, and automatic metadata extraction
Advanced Search Full-text search across titles, authors, descriptions, categories, and material types
Categories Thematic categorization and organizational series
Material Types Precise document classification (books, booklets, flyers, posters, periodic journals, fanzines, essays)
Reading List Personal bookmarking and favorites list
Password Recovery Secure password resets via signed email tokens with anti-bot protection
Profiles User avatars and author portraits, Two-Factor Authentication (2FA/TOTP), Passkeys (WebAuthn)
Static Pages WYSIWYG editor for custom pages (About, Editorial Manifesto, Legal notice)
Customization Customizable title, quotes, license, logo, favicon, colors, patterns, background images, border radius, and typography
Live Theme Preview Real-time preview of customized color palettes, card styling, typography, and backgrounds
Email Templates Translatable and customizable email templates (welcome, contact, password reset, proposal status)
Newsletter Built-in subscriber list manager and broadcast sender with ethical throttling
Social Auto-Publish Automated syndication to Mastodon, Bluesky, Facebook, X, Tumblr, and Threads
Menu Manager Complete control over navigation menus (links, ordering, icons, visibility)
Community Chat Real-time instant messaging with public channels, private invited groups, encrypted DMs, and admin moderation channel
RSS Feeds Open web syndication feeds (global, per-category, and per-author) with styled HTML previews
OPDS Server Open Publication Distribution System catalog for e-readers (Calibre, Moon+ Reader, KOReader...)
OAI-PMH Provider Read-only OAI-PMH 2.0 catalogue provider exposing validated public metadata in Dublin Core (oai_dc) format
REST API Comprehensive REST API for third-party integrations and ALN Muse exports, with mandatory TOTP verification when 2FA is active
Sitemap Dynamic XML sitemap and visitor-friendly styled HTML directory
Native i18n (42 Languages) Comprehensive native internationalization engine across 42 languages (local JSON dictionaries, autonyms, zero state flags, full UI and admin coverage)
Translation Engine High-performance on-the-fly content translation powered by LibreTranslate with sub-5ms cached queries
All-in-One Backups Complete unified archive generation (MariaDB SQL dump + uploads/ directory) with automatic rotation
Cron Automation Secure endpoint (cron_backup.php) protected by 256-bit cryptographic token, flock locking, and non-blocking asynchronous responses
Offline PWA Mode Local text caching in IndexedDB with interactive status indicators for offline reading
100% Local Dependencies Fully self-hosted vendor libraries (assets/vendor/: Bootstrap, FontAwesome, PDF.js, ePub.js, Swiper, Quill, OpenDyslexic) with zero third-party CDN leaks
System Health Monitor Real-time diagnostic monitor on the administrative dashboard
Clean URLs & Slugs Complete support for clean URLs without .php and flexible slug resolution with spaces and special characters
Accessible Modals Native Bootstrap 5 modals styled to match the theme replacing legacy browser alert/confirm dialogues
Progressive Web App Installable on mobile and desktop devices with an optimized Service Worker and custom offline page
Automatic HTTPS Automatic TLS certificate support via Let's Encrypt
SEO Optimization Open Graph, Twitter Cards, JSON-LD structured data, canonical URLs, and robots.txt
Social Sharing Modern bottom sheet drawer with Mastodon, Bluesky, Telegram, WhatsApp, X, Facebook, and email
Recommendations "If you liked this text..." recommendation engine based on shared categories
Full Accessibility Accessibility widget with local OpenDyslexic font, contrast adjustments, and text-to-speech
One-Click Updates Check and install upstream updates from Codeberg (stable and beta branches)
One-Click Restore In-dashboard database and file restoration tools with confirmation safeguards
Error Logs Integrated system health inspection and error log rotation
Built-in Help Manual Comprehensive documentation manual across 42 languages accessible directly in administration
Docker Multi-Arch Development and production Compose environments with multi-architecture Docker Hub images (latest, 1.3.1, v1.3.1)

Installation

Prerequisites

PHP 8.0+  •  MySQL/MariaDB  •  Composer  •  Apache/Nginx/Caddy

Required PHP Extensions:

  • pdo_mysql
  • curl
  • mbstring
  • fileinfo
  • gd
  • zip

Optional (for Calibre and advanced feeds):

  • sqlite3 (CLI)
  • simplexml

Self-Hosting Platforms

AnarcosyndicalismeBOOK runs seamlessly on multiple self-hosting platforms:

Solution Deployment Guide
YunoHost Official YunoHost Package — 1-click install
Docker Official Docker Image — Multi-architecture deployment
Cloudron Deployed via LAMP stack or custom app container
CapRover Standard PHP/MySQL containerized deployment
Raspberry Pi Standard LAMP/LEMP installation on Debian / Raspberry Pi OS
Dedicated VPS Manual installation on Debian, Ubuntu, Rocky Linux, or Alpine

To deploy quickly on a VPS or via Portainer, use the official Docker image. Database setup and administrator initialization can be automated.

Multi-Architecture Support:
Full native support for ARM (ARM64 / linux/arm64, ARMv7 / linux/arm/v7) and x86_64 (linux/amd64). You can run AnarcosyndicalismeBOOK natively on Raspberry Pi 4/5, ARM servers (Ampere, Oracle Cloud ARM, AWS Graviton), Apple Silicon, and standard x86 servers.

# Pull the official Docker Hub image (stable release)
docker pull liberchat/anarcosyndicalismebook:latest

# Or pull the beta channel for testing upcoming improvements
docker pull liberchat/anarcosyndicalismebook:beta

Published tags:

# Stable production releases (AMD64 + ARM64 + ARMv7)
liberchat/anarcosyndicalismebook:latest
liberchat/anarcosyndicalismebook:1.3.1
liberchat/anarcosyndicalismebook:v1.3.1

# Beta & pre-release testing channel (AMD64 + ARM64 + ARMv7)
liberchat/anarcosyndicalismebook:beta
liberchat/anarcosyndicalismebook:beta-4
liberchat/anarcosyndicalismebook:1.3.1-beta
liberchat/anarcosyndicalismebook:1.3.1-beta.4

# Previous releases
liberchat/anarcosyndicalismebook:1.2.103
liberchat/anarcosyndicalismebook:v1.2.103

Release Channels (Stable vs. Beta)

  • Stable Channel (latest, 1.3.1): Recommended for production environments. Thoroughly tested releases with verified migrations and full stability.
  • Beta Channel (beta, 1.3.1-beta): Allows administrators and contributors to test new features, bugfixes, and security enhancements prior to general release. Container images on the beta channel are built with the same multi-architecture toolchain and are ideal for staging instances.

The current beta includes a read-only OAI-PMH 2.0 provider at /oai.php, exposing validated public catalogue metadata in the oai_dc format. Resumption tokens are signed and the endpoint applies basic rate limiting. See docs/oai-pmh.md for the supported verbs and examples.

Local Development Mode

The repository includes an out-of-the-box development stack orchestrated with Docker Compose:

# Start local development environment: app + MariaDB + Mailpit + CAP
docker compose -f docker/docker-compose.dev.yml up -d --build

How local development works:

  • Live Code Sync (Bind Mount): Your local project directory is mounted directly to /var/www/html inside the container. Any edit to PHP files, JavaScript, or CSS reflects immediately without rebuilding the image.
  • Zero-Manual-Setup Initialization: The container entrypoint executes docker/create-admin.php at startup. It automatically generates includes/database.php and includes/config.php if missing on the host, creates the database schema, executes pending migrations, and configures the default admin account.
  • Automated Installer Bypass: In Docker environments, manual setup via install.php is disabled (returns HTTP 403) because the container stack provisions itself programmatically.
  • Built-in Mail Sandbox (Mailpit): All emails sent by the application (registration, contact forms, password recovery, admin alerts) are trapped by Mailpit. No external SMTP credentials are required, and you can inspect delivered emails via the web UI.
  • Bot Protection Sandbox (CAP): A local instance of the CAP anti-bot service runs alongside the application for full feature testing.

Development services and default credentials:

  • Web application: http://localhost:8888
  • Mailpit web UI: http://localhost:8026
  • Local development uses the credentials defined in docker/.env; production requires an explicit ADMIN_PASS of at least 12 characters.
  • MySQL credentials are read from docker/.env; do not use repository defaults in a deployed instance.
# Stop development environment
docker compose -f docker/docker-compose.dev.yml down

Production Deployment

# 1. Prepare configuration
cp docker/.env.prod.example docker/.env.prod
# Edit docker/.env.prod with secure passwords, your domain, and production SMTP settings

# 2. Launch production stack
docker compose --env-file docker/.env.prod -f docker/docker-compose.prod.yml up -d --build

To update an existing Compose deployment, keep .env.prod and all named volumes, then rebuild only the application service:

docker compose --env-file docker/.env.prod -f docker/docker-compose.prod.yml up -d --build app

Do not use docker compose down -v in production because it removes persistent data. ADMIN_PASS is used when creating the first administrator. If an admin already exists, the startup script detects it and preserves its password when the application container is recreated.

If your SMTP server utilizes a self-signed TLS certificate (such as an internal mail server or YunoHost instance), enable this setting in docker/.env.prod:

SMTP_ALLOW_SELF_SIGNED=true

Calibre TLS verification remains enabled by default. Only for a trusted local Calibre server using a self-signed certificate, explicitly add:

CALIBRE_ALLOW_SELF_SIGNED=true

For additional details, see docker/README.md and the Docker Hub repository.


Standard Web Server Installation (LAMP / LEMP)

For shared hosting, dedicated servers, or Linux VPS with Apache/Nginx, PHP 8.0+, and MySQL/MariaDB:

# 1. Prepare an empty MySQL/MariaDB database beforehand
mysql -u root -p -e "
CREATE DATABASE bibliotheque CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
CREATE USER 'biblio_user'@'localhost' IDENTIFIED BY 'your_secure_password';
GRANT ALL PRIVILEGES ON bibliotheque.* TO 'biblio_user'@'localhost';
FLUSH PRIVILEGES;"

# Note: You only need to create the empty database and user.
# You do NOT need to manually import any SQL tables or schema files;
# install.php provisions all tables, indexes, and default settings automatically.

# 2. Clone the repository or extract the official release archive
git clone https://codeberg.org/Anarcosyndicalismebook/anarcosyndicalismebook.git /var/www/bibliotheque
cd /var/www/bibliotheque

# 3. Install dependencies
composer install --no-dev --optimize-autoloader

# 4. Set proper file ownership and permissions
sudo chown -R www-data:www-data /var/www/bibliotheque
sudo chmod -R 775 uploads backups logs

# 5. Launch the web installer
# Navigate to https://your-domain.org/install.php

The step-by-step installation wizard guides you through:

  1. Welcome — Overview of capabilities
  2. System Checks — Verification of PHP extensions and write permissions
  3. Database — MariaDB/MySQL connection parameters and connection test
  4. Configuration — Base URL, SMTP mailer, and anti-bot protection
  5. Administrator Account — Creating the primary administrator account
  6. Installation — Automatic schema migration and configuration generation
  7. Finished & Secured — install.php is automatically locked and deleted for security

Directory Structure

anarcosyndicalismebook/
├── admin/                   # Administrative dashboard and controllers
│   ├── dashboard.php        # Overview and statistics
│   ├── parametres.php       # Instance preferences
│   ├── menus.php            # Menu hierarchy editor
│   ├── pages.php            # Static page WYSIWYG editor
│   ├── liste-textes.php     # Document management
│   ├── liste-auteurs.php    # Author catalog
│   ├── liste-categories.php # Category structure
│   ├── liste-utilisateurs.php # Account management
│   ├── ajouter-texte.php    # Add and publish documents
│   ├── ajouter-auteur.php   # Add author biographies
│   ├── import-masse.php     # Drag-and-drop batch upload
│   ├── import-calibre.php   # Calibre metadata.db or OPDS import
│   ├── newsletter.php       # Newsletter manager and queue
│   ├── import-wikisource.php # Multi-source imports (Wikisource, ALN, Gutenberg...)
│   └── ...
├── api/                     # REST API endpoints
│   ├── passkey.php          # WebAuthn passkeys backend
│   └── chat.php             # Real-time discussion backend
├── assets/                  # Frontend assets
│   ├── styles.css           # Primary red & black theme
│   ├── css/                 # Extended stylesheets
│   ├── js/                  # Client-side scripts
│   └── vendor/              # Self-hosted vendor packages
├── includes/                # Backend logic and helpers
│   ├── security.php         # CSRF, CSP, rate limiting
│   ├── authentification.php # Session handling
│   ├── totp.php             # RFC 6238 TOTP two-factor engine
│   ├── webauthn.php         # WebAuthn and passkey verification
│   ├── database.php         # PDO database layer
│   ├── config.php           # Global settings
│   ├── header.php           # Template header
│   ├── footer.php           # Template footer
│   ├── mail.php             # Email delivery helper
│   ├── captcha.php          # CAP captcha handler
│   └── ImportExterne.php    # SSRF-protected content fetcher
├── languages/               # Internationalization engine
│   ├── help/                # HTML manuals in 42 languages
│   └── *.json               # Native translation dictionaries
├── sql/                     # Schema definition and migrations
├── icons/                   # PWA iconography (72px to 512px)
├── uploads/                 # Media storage
│   ├── site/                # Customized logos and favicons
│   ├── auteurs/             # Author portraits
│   ├── textes/              # Document cover images
│   └── avatars/             # User profile avatars
├── backups/                 # Database dumps and archives
├── index.php                # Homepage
├── catalogue.php            # Catalog browser
├── auteurs.php              # Author directory
├── categorie.php            # Category view
├── lire.php                 # Universal PDF/EPUB reader
├── recherche.php            # Search engine
├── connexion.php            # Login page (+ Passkeys)
├── mot-de-passe-oublie.php  # Password reset request
├── reinitialisation-mot-de-passe.php # Token reset handler
├── inscription.php          # Registration page
├── mon-compte.php           # User account profile (2FA & Passkeys)
├── mes-favoris.php          # Reading list
├── contact.php              # Contact form
├── newsletter-inscription.php # Newsletter subscription
├── rss.php                  # RSS syndication feed
├── opds.php                 # OPDS e-reader catalog
├── sitemap.php              # Dynamic XML and HTML sitemap
├── robots.txt               # Search engine directives
├── version.php              # Application release version
├── manifest.json            # PWA manifest
├── sw.js                    # PWA Service Worker
└── offline.html             # Offline fallback view

Security

The platform integrates defensive mechanisms against modern cyber threats:

Protection Implementation
SQL Injection Parameterized queries enforced across all database queries using PDO
Cross-Site Scripting (XSS) Strict context-aware HTML escaping and Content Security Policy headers
CSRF Cryptographically unique validation tokens for all state-changing POST forms
Two-Factor Authentication (2FA) Time-based One-Time Passwords (RFC 6238 TOTP) with recovery codes
Passkeys Passwordless biometric and hardware authentication via FIDO2 / WebAuthn
Brute Force Defense IP-based rate limiting, fingerprinting, and privacy-friendly CAP captcha
Session Security HttpOnly, Secure, and SameSite=Strict flags with session ID regeneration
Password Storage Secure hashing via bcrypt (password_hash)
File Uploads Magic byte inspection, MIME validation, file size limits, and SVG sanitization
Background Images Restricted to image formats (JPG/PNG/WebP/GIF), 5MB size limit, random filename
SSRF Mitigation Strict domain allowlists, private IP/localhost blocking, mandatory HTTPS, 5MB response cap
Theme Customization Hex color codes (#RRGGBB), strict design tokens, and restricted CSS rules
HTTP Headers CSP, X-Frame-Options (DENY), X-Content-Type-Options (nosniff), Referrer-Policy
Server Protection Directory-level access restrictions in .htaccess protecting sensitive paths

SEO & Discoverability

Built-in discoverability features ensure your digital library is indexed ethically:

Standard Description
Open Graph og:title, og:description, og:image, og:url, og:type metadata
Twitter Cards twitter:card, twitter:title, twitter:description, twitter:image tags
JSON-LD Structured schema markup (WebSite, Article, Person)
Canonical URLs Canonical link relations specified across all content pages
Meta Elements Accurate description, keywords, author, and robots instructions
Search Console Domain verification support for Google Search Console and Bing Webmaster Tools

Dynamic Sitemap: Accessible at /sitemap.php, indexing texts, authors, and categories. Provides styled HTML for users and structured XML for search engine crawlers.

Social Sharing Drawer: Interactive sharing drawer with dedicated links for Mastodon, Bluesky, Telegram, WhatsApp, X, Facebook, email, and one-click URL copying.

Contextual Recommendations: Automatic "If you appreciated this text, you may also like..." recommendations based on shared topics and catalog taxonomy.


Accessibility (a11y)

A comprehensive floating accessibility panel is available on all pages:

Feature Description
Font Scaling Dynamically increase or decrease font size (80% to 150%)
High Contrast Black background, crisp white typography, and vibrant link highlights
Dyslexia Font Locally hosted OpenDyslexic typeface for easier reading
Line Spacing Generous line height adjustments to prevent visual crowding
Link Underlines Persistent underline indicators across all interactive hyperlinks
Large Cursor High-visibility enlarged mouse pointer
Motion Reduction Disable animations and smooth transitions for sensitive readers
Screen Reader Mode Semantic structure optimized for NVDA, JAWS, Orca, and VoiceOver

Additional accessibility enhancements:

  • Direct "Skip to main content" keyboard shortcut link
  • Persistent accessibility preferences stored in local storage
  • Comprehensive ARIA labeling on all interactive elements
  • Enhanced visible keyboard focus rings

Administration

Access: /admin/ (restricted to authenticated administrators)

  • Dashboard — Visitor counts, reading metrics, recent activity, and system shortcuts
  • Documents — Create, update, or remove texts; upload PDF, EPUB, and TXT files
  • Public Proposals — Review, proofread, approve, or reject user-submitted texts with email notifications
  • Bulk Import — Multi-file drag-and-drop batch upload with author extraction
  • Calibre Import — Direct ingestion from metadata.db or remote Calibre Content Server
  • External Imports — Fetch content from Wikisource, The Anarchist Library, Anarchief, and WordPress sites
  • Authors — Biographies, photos, and author catalog management
  • Categories & Materials — Taxonomic categorization and document classification
  • User Accounts — Access role assignments (Administrator, Editor, Reader)
  • Admin Invitations — Secure email invitations featuring single-use cryptographic tokens
  • Custom Pages — Rich-text WYSIWYG editor for static organizational pages
  • Menus — Navigation link order, nesting, icons, and visibility
  • Settings — Identity, logo, favicon, SEO parameters, and CAP anti-bot integration
  • Email Customization — Tailored email styling, color accents, and translated preview modals
  • Newsletter — Subscriber management, automated unsubscribe workflows, and broadcast delivery
  • Social Auto-Publish — Automated syndication to Mastodon, Bluesky, Facebook, X, Tumblr, and Threads
  • System Health — Real-time checks on PHP extensions, database status, and file storage permissions
  • Integrated Manual — Comprehensive help documentation across 42 languages
  • Updates — In-dashboard upstream update inspection and installation from Codeberg

Upstream Updates

The built-in update engine checks for new releases on Codeberg directly from the administrative interface:

Release Policy & Long-Term Support

  • Long-Term Support (LTS) — Currently v1.3.1: The feature set is strictly frozen to deliver maximum stability, dependability, and compatibility for production libraries. Maintenance on this branch focuses exclusively on bug fixes, performance optimizations, and security patches.
  • Intermediate Releases: Future feature additions and developmental improvements will be published as intermediate releases (available via the Beta / Pre-release channel in the admin dashboard) to ensure thorough real-world validation before inclusion in a future major release.

Access: Admin → Settings → Updates

Update Procedure:

  1. Check for new releases via the Forgejo / Codeberg API
  2. Display detailed release notes
  3. Perform one-click automated update:
    • Database backup archive creation in backups/
    • Preservation of instance configuration (config.php)
    • Code synchronization via Git (git fetch & git reset --hard origin/main)
    • Configuration restoration
    • Dependency verification via composer install

Creating a New Release (Developers):

  1. Bump the release number in version.php
  2. Document updates in CHANGELOG.md
  3. Draft release notes under releases/RELEASE_NOTES_vX.Y.Z.md
  4. Tag the commit: git tag -a vX.Y.Z -m "Release vX.Y.Z"
  5. Push commit and tags: git push origin main && git push origin vX.Y.Z
  6. Build and publish multi-arch Docker image:
    docker buildx build --platform linux/amd64,linux/arm64,linux/arm/v7 -f docker/Dockerfile \
      -t liberchat/anarcosyndicalismebook:X.Y.Z \
      -t liberchat/anarcosyndicalismebook:vX.Y.Z \
      -t liberchat/anarcosyndicalismebook:latest --push .
    
  7. Publish the release on Codeberg

Passkeys (WebAuthn / FIDO2)

Passwordless authentication using biometric authentication or hardware security keys:

Supported Authenticators:

  • Fingerprint scanners (Touch ID, Windows Hello, Android Biometrics)
  • Facial recognition (Face ID)
  • Hardware USB/NFC security keys (YubiKey, Nitrokey)
  • Cross-device authentication (Smartphones via QR code)

Key Capabilities:

  • Register multiple hardware authenticators per account
  • Manage passkeys directly inside User Account settings
  • Instant passwordless login from the sign-in screen
  • Rigorous cryptographic verification (Challenge, Origin, RP ID hash, user presence, signature verification, and anti-replay counters)
  • Fully compatible alongside TOTP two-factor authentication
  • Requires HTTPS in production

Activist Newsletter

Integrated newsletter broadcast platform:

Capabilities:

  • Public subscription form in the footer and on a dedicated page
  • Compose newsletters featuring newly published texts
  • Complete template styling (accent colors, logo, introductory and closing text)
  • Real-time preview before sending
  • Full broadcast log and delivery audit trail
  • Subscriber status management with automated one-click unsubscribe links
  • Reliable delivery via PHPMailer (SMTP)

Social Media & Fediverse Auto-Publishing

Automated syndication across decentralized and centralized platforms:

Supported Networks:

  • Mastodon (Fediverse)
  • Bluesky (AT Protocol)
  • Facebook (Pages)
  • X (Twitter)
  • Tumblr
  • Threads

Key Capabilities:

  • Automatic dispatch upon publishing new texts
  • Integration with Calibre imports
  • Customizable message templates with dynamic tags ({titre}, {auteur}, {resume}, {url})
  • Configurable hashtags
  • Broadcast history and real-time connectivity testing tools

OPDS Catalog

Standard OPDS feed for e-readers and mobile applications (Calibre, Moon+ Reader, KOReader, FBReader):

Feed URL: /opds.php

Available Feeds:

  • /opds.php — Root catalog
  • ?feed=recent — Recent acquisitions
  • ?feed=popular — Most read texts
  • ?feed=authors — Browse by author
  • ?feed=categories — Browse by category
  • ?search=query — Catalog search

REST API

Comprehensive REST API for mobile applications and network syndication:

Base URL: /api/

Public Endpoints:

  • ?endpoint=books — Book list with search and pagination
  • ?endpoint=authors — Author directory and biographical information
  • ?endpoint=categories — Category hierarchy
  • ?endpoint=search&q=term — Full-text search
  • ?endpoint=recent — Recent releases
  • ?endpoint=popular — Popular texts
  • ?endpoint=stats — General library statistics
  • ?endpoint=export-aln — JSON index of available Muse archives
  • ?endpoint=export-aln&slug=slug-name — Direct download of raw Muse (.muse) document

Authentication:

  • POST ?endpoint=auth — Authenticate and receive a Bearer token
  • Header: Authorization: Bearer {token}
  • Accounts with 2FA enabled require a valid TOTP code during authentication.

Unified Backups & Scheduled Tasks (Cron)

AnarcosyndicalismeBOOK includes a built-in BackupManager capable of archiving the database and all media files (uploads/) into a single timestamped ZIP archive.

Capabilities:

  • One-click backup from administration with status indicators
  • Full restoration: Restore database alone or entire backup archive
  • Secure Cron Endpoint (/cron_backup.php): Triggered via 256-bit token with flock locking and asynchronous non-blocking response
  • Automatic rotation: Retains the 10 most recent backups to conserve disk space
  • Directory Protection: Strict access restrictions blocking public downloads of .zip files

Recommended Cron Command (daily at 3:00 AM):

0 3 * * * curl -s "https://your-site.org/cron_backup.php?token=YOUR_SECRET_TOKEN" > /dev/null

Offline PWA Reading

Offline capabilities powered by Progressive Web App standards:

  • IndexedDB Storage: Save individual texts locally for offline reading
  • Interactive Offline Indicators: Real-time status indicators on saved texts
  • Service Worker Caching: Transparent caching of essential reading stylesheets, fonts, and e-reader engines

Native Internationalization (42 Languages)

In-memory i18n engine (includes/i18n.php):

  • 42 Languages: Esperanto, French, Spanish, English, Catalan, Basque, Galician, Italian, German, Portuguese (Portugal and Brazil), Irish, Dutch, Russian, Ukrainian, Polish, Czech, Slovak, Slovenian, Croatian, Serbian, Bulgarian, Greek, Turkish, Arabic, Persian, Hebrew, Hindi, Bengali, Indonesian, Malay, Vietnamese, Thai, Simplified Chinese, Japanese, Korean, Swedish, Danish, Finnish, Norwegian, Hungarian, Romanian.
  • Native Autonyms: Cultural respect without nationalistic state flags.
  • Zero Network Overhead: Direct in-memory lookup from structured JSON dictionaries (languages/*.json).
  • Protected Dictionaries: Public HTTP access to raw JSON files blocked by web server configuration.

Local Independence & Vendor Assets

All third-party libraries are completely self-hosted in assets/vendor/:

  • Included Packages: Bootstrap 5.3, FontAwesome 6.4, PDF.js, ePub.js, Swiper, JSZip, Quill, OpenDyslexic.
  • Zero Third-Party CDN Calls: No telemetry or asset requests to Google Fonts, cdnjs, or external providers.

Development

# Quick built-in PHP development server
php -S localhost:8080

# Database import
mysql -u root -p anarcosyndicalismebook < database_numerique.sql

Docker development environment:

docker compose -f docker/docker-compose.dev.yml up -d --build
docker compose -f docker/docker-compose.dev.yml logs -f
docker compose -f docker/docker-compose.dev.yml down

This configuration starts MariaDB, the CMS on http://localhost:8888, and Mailpit on http://localhost:8026.



License

Component License Terms
Source Code MIT License
Activist Content Free circulation of knowledge

Knowledge belongs to humanity.

No god no master