# Introduction

Welcome to the official documentation for **EntryTarget** — a high-performance, double-entry financial ledger backend.

This project is AI-ready and provides an [llms.txt](https://entrytarget.com/llms.txt) file for use by large language models.

## What is EntryTarget?

EntryTarget is a financial core designed to handle double-entry bookkeeping with high throughput, strong consistency guarantees, and built-in integrity validation. It is delivered as a container image accompanied by a per-customer signed license file, running on your own segregated AWS infrastructure (Fargate + RDS).

## Key Features

* **Double-entry bookkeeping** — every transaction creates balanced debit and credit journal entries
* **High throughput** — batch processing engine capable of thousands of transactions per second
* **Atomic transactions** — multi-entry transactions execute as a single unit
* **Idempotency** — configurable idempotency window with three-layer duplicate detection
* **Row-level integrity** — cryptographic hash on every row detects direct database tampering
* **Crash recovery** — built-in recovery mechanism for post-crash reconciliation
* **Ledger archiving** — client-controlled archival of historical ledger data
* **Observability** — Prometheus metrics with Grafana dashboards

## Architecture at a Glance

```
HTTP Client
    |  REST / JSON  (X-Api-Key + X-Api-Secret headers)
    v
Axum HTTP Server
    |  Auth middleware + Metrics middleware
    v
Domain Layer (business rules)
    |                        |
    v                        v
Write Path               Read Path
(Batch Engine)           (Read Replica)
    |
    v
RDS Master  --(replication)--> RDS Read Replica
```

All write operations flow through a batch engine for maximum throughput. All read operations go to the read replica, keeping the master reserved for writes.

## Design Principles

* **Stateless** — all state lives in the database. The server can be restarted at any time.
* **Integer amounts** — all monetary values are integers. You control decimal places (e.g., R$1.00 = 100).
* **No silent defaults** — every required configuration must be explicitly set. Missing values cause an immediate startup failure.
* **Closed scope** — the system does exactly what it needs to do, nothing more.

## Who Uses This?

EntryTarget is designed for companies that need a reliable financial core. Your application handles its own account/customer registry and uses EntryTarget solely as the financial backbone — managing balances, transactions, journal entries, and integrity.

## Getting Started

1. [Register on the Console](/docs/console/overview.md) and choose a plan
2. [Deploy your instance](/docs/console/deployment-options.md) (managed or manual)
3. [Set up credentials](/docs/console/credential-management.md)
4. [Create your first account](/docs/api-reference/accounts.md) and [execute a transaction](/docs/api-reference/transactions.md)

## Need Help?

Access the vendor Console at `https://console.entrytarget.com/` for support and instance management.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://entrytarget.gitbook.io/docs/readme.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
