.tpl files) that render into multiple output formats — CSV, XML, HTML, TXT, or PDF. The source code is publicly available on GitHub.
| Template format | Output format |
|---|---|
CSV-structured .tpl | CSV file |
XML-structured .tpl | XML file |
HTML-structured .tpl | HTML or PDF file |
TXT-structured .tpl | TXT file |
Why use Reporter?
Financial institutions spend significant time producing recurring reports — for regulators, auditors, and internal stakeholders. Reporter eliminates this manual work by letting you define a report template once and generate updated reports automatically from live data. For technical teams: rather than writing complex SQL queries, you reference domains, tables, and fields through intuitive placeholders. This makes report creation faster, more flexible, and easier to maintain.
How it works
Workflow
Reporter follows a simple and efficient workflow that turns your templates into production-ready reports:- Submit templates with optional filters and parameters
- Reporter retrieves data from configured databases (PostgreSQL, MongoDB)
- Template logic is applied (loops, conditions, calculations)
- The final output is generated in the requested format

Architecture
Reporter is built on a layered architecture that keeps responsibilities clear and supports growth:- Data layer: Connects to databases through configured data sources. Supports PostgreSQL and MongoDB, with multi-schema queries for PostgreSQL.
- Business logic layer: Manages template parsing, placeholder resolution, and rendering.
- Storage layer: Stores templates and generated reports using S3-compatible object storage (AWS S3, MinIO, or SeaweedFS).
- Presentation layer: Returns formatted output through RESTful APIs.

What it can do
- Dynamic queries with placeholders: Reference any data point via direct paths — no SQL required.
- Multi-schema support: Query tables across multiple PostgreSQL schemas from a single template using explicit schema syntax.
- Loop and condition logic: Build dynamic content with
forloops,if/elif/elseconditionals, and scoped blocks. - Math operations and aggregation: Perform calculations with
sum_by,avg_by,count_by,min_by,max_by,calc, andaggregate_balance. - Counter tracking: Track and display named counters across template iterations with
counterandcounter_show. - Data transformation filters: Transform values inline with
where,sum,count,replace,slice,strip_zeros, andpercent_of. - Async processing: Heavy reports are handled asynchronously via message queue.
- S3-compatible storage: Templates and reports are stored in any S3-compatible service (AWS S3, MinIO, SeaweedFS).
- Multiple output formats: Generate CSV, XML, HTML, TXT, or PDF output from a single template engine.
Template model
Reporter uses templates that mirror the final document structure. Files must have the
.tpl extension regardless of the content format inside.
Even though the file content must follow the output format, make sure to save it with a
.tpl extension. This is required for the template to work properly.Setting up your data sources
Before generating reports, you need to configure the database connections that Reporter uses to retrieve data. Reporter connects to your databases through managed data sources, configured via the database connections API. Each data source represents a database connection identified by a unique name (
configName), which is then used when defining placeholders and filters in your templates. Through the connections API, you can:
- Register one or more databases (PostgreSQL or MongoDB)
- Test connectivity before running reports
- Validate template fields against your actual database schema
Recommended naming
To avoid conflicts — especially when different databases contain tables with the same names — use clear and descriptive identifiers for your data sources. For example:midaz_onboarding(PostgreSQL)midaz_onboarding_metadata(MongoDB)
Schema validation
When you create or update a template, Reporter validates that the fields referenced in your placeholders exist in the configured data sources. If a data source is temporarily unavailable during validation, Reporter returns warnings (not errors), allowing you to proceed with template creation.Valid fields are confirmed against the actual database schema. Unavailable data sources generate a warning with the code
DATA_SOURCE_DOWN, not a blocking error. You can fix connectivity issues later without losing your template work.Using placeholders
The placeholder structure follows a path-based syntax:
Multi-schema placeholders
When your PostgreSQL data source has multiple schemas, use the explicit schema syntax to avoid ambiguity:If a table name exists in only one schema, the legacy syntax
{{ base.table.field }} still works — Reporter auto-discovers the correct schema. If a table exists in multiple schemas, Reporter defaults to the public schema. If the table is not in public, Reporter returns an error with suggestions:Templates and placeholders reference
Reporter includes a rich set of template tags for aggregation (
sum_by, avg_by, count_by, min_by, max_by), arithmetic (calc), financial grouping (aggregate_balance), counters, and date/time formatting. It also provides filters for string manipulation, percentage calculation, and array operations.
For the complete reference, see Template reference.
For advanced report filtering with operators like eq, gt, between, in, and more, see the Advanced filtering section.
Need inspiration?
Check out the Template examples page to explore what you can do and start shaping your own template.
Authentication and authorization
Reporter does not require authentication by default, but it ships with native Access Manager integration. When enabled, Access Manager provides role-based access control (RBAC) for templates, reports, and data sources — giving you fine-grained control over who can view, create, or manage reporting resources.
Next steps
Explore the Reporter API
Browse endpoints for templates, reports, and data sources.
Using Reporter
Learn how to create and submit your first report template.

