Skip to main content

Aleteia Reports

Aleteia Reports is a Rails application that serves as a central hub for managing and automating editorial, marketing, and analytics processes for the Aleteia network. The application integrates multiple external services and provides APIs, scheduled jobs, and web interfaces to support the network's daily operations.

The application is built with Ruby on Rails 7.0 and a React/TypeScript frontend, using PostgreSQL as the database and Redis/Sidekiq for background jobs.


Macro Features

Below are the main features currently in use on the platform.

Algolia Indexing of WordPress Content

The application automatically indexes WordPress content to Algolia to enable full-text search across Aleteia sites. When a post is created or updated on WordPress, a webhook triggers content indexing on Algolia, enabling fast and relevant searches for end users.

The system supports multiple locales and handles incremental index updates to keep search results always synchronized with published content.

Reports Author for Payments

The system generates detailed reports on WordPress authors through the authorsReport job accessible from the homepage. This feature provides comprehensive author management capabilities, including tracking author contributions, article counts, and related metrics needed for payment processing.

The WordPress author synchronization job (SyncWordpressAuthorsJob) runs hourly to keep author data up to date across all locales.

Dailymotion Report

The application generates daily reports on the performance of video content published on Dailymotion. The DailyMotionExportJob runs every day at 1:00 AM (America/Los_Angeles timezone) and produces an export of video performance data.

The reports are used by the analytics team to monitor views, engagement, and monetization metrics for Aleteia network video content.

TikTok Report

The TikTok integration allows generating daily reports on the performance of connected TikTok accounts. The system uses OAuth with LoginKit for authentication and automatically generates CSVs with view statistics.

Reports are uploaded to S3 for import into the big data system. Accounts must be re-authorized annually due to refresh token expiration.

📄 Documentation: TikTok Integration

Magnificat and Daily Prayers/Daily Posts

The application automatically imports spiritual content from the Magnificat website, including daily prayers and readings. The MagnificatImportJob runs every 6 hours to synchronize new content.

This content is then distributed through Aleteia network channels, including push notifications and newsletters.

SendGrid and Newsletter Subscriptions

The system manages newsletter subscriptions through SendGrid, supporting multiple distribution lists organized by language and type. The integration includes:

  • Welcome Email: Automatic welcome email delivery to new daily newsletter subscribers
  • Extra and Special Lists: Advanced suppression group management for special and optional lists
  • Segmentation: Support for segments by locale (IT, EN, FR, ES, PT, PL, AR, SI)

The APIs allow reading and updating contact subscription status with deterministic subscribe/unsubscribe logic.

📄 Documentation: Welcome Email | Extra and Special Lists

Email Campaign Delivery API, Scheduler and Slack Notifications

The application provides a complete system for planning and sending email campaigns. Campaigns can be scheduled for future delivery and the system sends Slack notifications upon delivery completion.

The API allows creation, modification, and scheduling of campaigns with support for dynamic templates and content personalization based on the recipient.

OneSignal Integration and Push Notifications Delivery

The system exposes API wrappers for the OneSignal service, enabling push notification delivery to millions of users on web and mobile. The integration supports:

  • Creating notifications with title, message, link, and images
  • Targeting by language/locale
  • Retrieving notification delivery status
  • JWT authentication for API security

The OneSignalAppImportJob periodically synchronizes OneSignal app configuration.

📄 Documentation: OneSignal Push Notification API

WordPress Webhooks for Algolia Integration

When a post is published or updated on WordPress, the application receives webhooks that trigger various automatic actions:

  • Algolia Indexing: Updates the search index with new content
  • Media Processing: Initiates the image copying process between different WordPress installations

Donations Platform, Donors Profile Page and Reporting

The donations platform is a central component of the application, built on Stripe for payment processing. It supports:

  • Single and recurring donations: One-time payments or monthly subscriptions
  • Multi-currency: EUR, USD, and other optional currencies (BRL, PLN, MXN, COP, ARS)
  • Payment methods: Credit cards, SEPA Direct Debit, Przelewy24, PayPal
  • Donor profile: Personal page to view donation history
  • Reporting: Daily reports on payments, abandoned sessions, and conversion metrics
  • Campaigns: Tracking donations by specific campaign

📄 Documentation: Stripe + Donation Platform Overview

Premium Subscription System

The Premium subscription system integrates Stripe for payment processing with Firebase Authentication for user management and Firestore for premium status persistence. Key features include:

  • Automated User Provisioning: Creates Firebase Auth users automatically when subscriptions are created
  • Premium Status Management: Tracks premium status and plan tier in Firestore
  • Newsletter Auto-Subscription: Automatically subscribes new users to daily and Vatican newsletter segments
  • Multi-Language Support: All communications respect subscriber's locale preference
  • Email Notifications: Sends welcome and goodbye emails via SendGrid templates

📄 Documentation: Premium Integration Overview

One Shot Tasks for Batch Operations

The application includes jobs for batch operations that run periodically or on demand. Examples include:

  • Slovenian Picture Reports: Monthly export of image data for the Slovenian editorial team (SlovenianArticleExportJob)
  • Monthly Picture Report: Monthly report on image usage (MonthlyPictureReportJob)
  • Clean Bounce Users: Periodic cleanup of users with invalid emails

These tasks automate operations that would otherwise require repetitive manual intervention.

Scheduled Reports in schedule.yml

The application uses Sidekiq-Cron to schedule recurring jobs. The config/schedule.yml file defines all periodic jobs, including:

JobFrequencyDescription
MagnificatImportEvery 6 hoursMagnificat content import
SyncWordpressAuthorsHourlyWordPress author synchronization
DailyMotionExportDailyDailymotion metrics export
TikTok::UploadReportDailyTikTok report upload to S3
PaymentsReportDailyDonation payments report
MonthlyPictureReportMonthlyImage usage report

📄 Documentation: Sidekiq-Cron Upgrade Guide

Slideshows Copy API

The API allows copying slideshows between different Aleteia language editions. The system automatically handles structure translation and image copying, allowing editors to replicate content from one language to another with a single API call.

The process is asynchronous: the API immediately returns a tracking ID and the client can query the status until the copy is complete.

📄 Documentation: Slideshow Copy API

WordPress Copy Pictures

The system automatically synchronizes images between different WordPress installations in the Aleteia network. When an image is uploaded to one site (e.g., aleteia.org), it is automatically copied to all other active sites (es.aleteia.org, fr.aleteia.org, etc.).

The feature uses SHA256 hashes to avoid duplicates and tracks the parent/child relationship between master images and derived copies.

📄 Documentation: WordPress Media Copy Overview


Use the sidebar to explore detailed documentation for each feature.