API Reference Voile v#0.1.23

Copy Markdown View Source

Modules

Main storage interface that delegates to configured storage adapter.

HTTP client adapter for AWS SDK that uses Req instead of hackney.

Behaviour for storage adapters.

Local filesystem storage adapter.

S3-compatible storage adapter (works with AWS S3, Backblaze B2, MinIO, etc.)

Client for interacting with Xendit Payment Gateway API. Primarily uses the Payment Link API for fine payments.

Voile keeps the contexts that define your domain and business logic.

Dashboard analytics context for retrieving GLAM system statistics.

Analytics module for tracking search patterns and usage statistics. Provides insights into user search behavior and popular content.

Context module for handling attachment access control. Provides functions to check permissions, manage access lists, and handle embargos.

Simplified CSV importer for collections with dynamic property columns.

Context for managing clearance letters (Surat Keterangan Bebas Perpustakaan).

External book search module that aggregates results from OpenLibrary, Google Books, and OpenAlex.

External book data structure.

Google Books API adapter for book search.

OpenAlex API adapter for book search.

OpenLibrary API adapter for book search.

Helper functions for working with GLAM collections and curator permissions.

Action and filter hook system for Voile plugins.

Custom Swoosh adapter for Gmail API using OAuth2 authentication.

Helper module for Gmail OAuth2 authentication flow.

Imports bibliography/collection data from CSV files with optimized streaming and batch processing.

Common utilities and helpers for data migration.

Abstraction layer for data sources (CSV files or MySQL database).

Debug script to check which biblio records from CSV are missing from database

Imports fines data from CSV files to lib_fines table.

Imports item data from CSV files with optimized streaming and batch processing.

Imports leftover bibliography/collection data for items that couldn't be imported.

Imports leftover item data from a CSV list of item_codes that were not imported initially.

Imports loan history data from CSV files to lib_circulation_history table.

Imports loan data from CSV files to lib_transactions table.

Imports master data including authors/creators and publishers from CSV files with optimized streaming and batch processing.

Imports member data from CSV files with optimized streaming and batch processing.

MySQL/MariaDB database adapter for reading SLiMS data directly from MySQL or MariaDB database.

Performance testing utilities for migration importers.

Imports user data from CSV files with optimized streaming and batch processing.

Validation script to check the migration results and data integrity.

Email queue for sending emails with configurable delays to avoid spam filters.

Email templates for loan due date reminders. Generates and sends reminder emails to members about upcoming due dates.

Handles broadcasting and subscribing to loan due date reminder notifications. Members get notified via PubSub when they have loans due soon.

Handles broadcasting and subscribing to reservation notifications. Staff and admin users can subscribe to get notified when members request reservations.

Context module for OAI-PMH (Open Archives Initiative Protocol for Metadata Harvesting) v2.0.

Builds XML responses for OAI-PMH protocol requests. Follows OAI-PMH v2.0 specification for XML structure.

The behaviour that every Voile plugin must implement.

Macro that generates a Migrator for a plugin.

Manages the full lifecycle of plugins in Voile.

Persists the state of each plugin installation. Allows Voile to know which plugins are installed and active across server restarts.

Context for managing plugin records in the Voile database.

Rate limiter using Hammer 7.x with ETS backend.

Used for executing DB release tasks when run in production without Mix installed.

The Accounts context.

Defines the scope of the caller to be used throughout the app.

The Catalog context.

Schema for role-based access control on attachments. Links attachments to roles that can access them when access_level is "limited".

Schema for user-specific access control on attachments. Links attachments to specific users that can access them when access_level is "limited".

The Library Features context.

Resolves loan rules with proper precedence

Schema for library fine payments via payment gateway (Xendit).

The Master context.

The Metadata context.

The Search context for handling search operations across the application. Provides search functionality for both librarians and patrons with role-based filtering.

The StockOpname context for inventory checking functionality.

Delivers notifications for stock opname events.

The System context.

Context module for managing library holidays and weekly schedules for business day calculations.

Search context for collections with GLAM categorization support. Handles autocomplete suggestions and search functionality.

Task module for Collection-related business logic and data operations.

Task module for Items-related business logic and data operations.

Scheduled task that checks for loans due soon and sends reminders.

Scheduled task that automatically unsuspends users when their suspension period ends.

Audit logging utilities for Collection operations.

Helper functions for date and time formatting and conversion across the application. Enhanced with Indonesian localization and country-specific formatting.

Helper functions for search functionality across the application

The entrypoint for defining your web interface, such as controllers, components, channels, and so on.

Authorization module for checking user permissions in the Voile application.

Helper functions for authorization in Phoenix controllers.

GLAM-specific authorization helpers for Gallery, Library, Archive, and Museum curators.

Helper functions for authorization in Phoenix LiveView.

Module for managing permissions and roles in the system. Provides functions to create, update, and query permissions and roles.

Authorization helpers specific to Stock Opname functionality.

Label printing components for library items

A simple search bar component that matches the Voile dashboard styling

Reusable search widget component for embedding in other pages

Provides core UI components.

Combined import / export LiveView for collections.

Shared components for the circulation dashboard.

Helper functions for the circulation dashboard components.

LiveView for librarians to manually send loan reminders to members.

Plugin management admin page.

Per-plugin settings form.

Centralized HTML email templates for Voile system notifications.

This module is invoked by your endpoint in case of errors on HTML requests.

This module is invoked by your endpoint in case of errors on JSON requests.

Helper functions for the Atrium (member self-service portal).

Frontend LiveView for displaying collections to library members

Frontend LiveView for displaying individual collection details to library members

Simple LiveView to render a PDF e-book either from a local static path (e.g. /uploads/...) or from a public S3 URL.

Frontend LiveView for displaying items to library members

Frontend LiveView for displaying individual item details to library members

A module providing Internationalization with a gettext-based API.

This module holds different layouts used by your application.

LiveView hooks for handling authentication and authorization.

LiveView on-mount hook that ensures :current_path and :current_uri are available in assigns for all LiveViews, and kept up-to-date on navigation.

LiveView hook to maintain locale across LiveView mount/remount cycles. This ensures the locale set by the Locale plug persists during LiveView updates.

LiveView hook that adds reservation notification support to all dashboard pages.

LiveComponent for displaying reservation notifications to staff/admin. Receives notifications from parent LiveView via assigns.

Controller for handling OAI-PMH (Open Archives Initiative Protocol for Metadata Harvesting) requests.

Controller for serving OAI-PMH viewer HTML pages. Provides human-friendly interfaces to browse OAI-PMH metadata.

Dynamic plugin route dispatcher.

Rate limiter plug using Hammer 7.0+ for API endpoints.

Plug for authorization in Phoenix controllers.

Controller plug to authorize actions based on permissions.

Plug for setting the locale based on

Plug for checking if user can access any operation on a resource. Note: RBAC system removed - this now allows access for all authenticated users.

Component for search dashboard with analytics

This module contains pages rendered by SearchController.

LiveView component for real-time search functionality

PAuS (Padjadjaran Authentication System) OAuth 2.0 integration Following the same pattern as UserAuthGoogle using Assent

Helper functions for locale management

Centralized UI components for the Voile frontend

Mix Tasks

Migration task for importing data from SLiMS to Voile.