Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/juanVillamilEchavarria/Leo_Counter-app/llms.txt

Use this file to discover all available pages before exploring further.

Movements are the core data unit of Leo Counter. Every peso or dollar that flows in or out of your household is recorded as a movement and linked to an account and a category. Leo Counter models three distinct movement types to match the real-world lifecycle of household spending: spontaneous one-off transactions, fixed recurring entries, and upcoming pending obligations. All three share a common set of fields but differ in how they are triggered, tracked over time, and ultimately settled.

Movement Types (TipoMovimiento)

Every movement carries a tipo_movimiento_id that resolves to one of two values defined in TipoMovimientoEnum:
ValueIDMeaning
INGRESO1Money coming in (salary, transfers received, etc.)
GASTO2Money going out (bills, purchases, subscriptions, etc.)
// app/Domains/TipoMovimiento/Enums/TipoMovimientoEnum.php
enum TipoMovimientoEnum: int
{
    case INGRESO = 1;
    case GASTO   = 2;
}

Spontaneous Movements (Espontáneos)

Spontaneous movements represent one-off transactions that you record manually after they happen — a grocery run, an ATM withdrawal, or a freelance payment received. They are the most common movement type and support the full CRUD lifecycle.Base route: /movimientos-espontaneos

Fields

nombre
string
required
A short label for the transaction (max 255 characters).
tipo_movimiento_id
integer
required
1 for income, 2 for expense.
cuenta_id
uuid
required
The account the transaction debits or credits.
categoria_id
uuid
required
The category used to classify the movement.
monto
numeric
required
The transaction amount (min 0, up to 12 digits with 2 decimal places).
descripcion
string
Optional free-text notes (max 1,000 characters).
comprobantes
array
Optional array of new file attachments (receipts, invoices, etc.).
On update, two additional fields are accepted:
comprobantes_existing
array
Array of attachment IDs to retain from the previous version of the movement.
comprobantes_delete_ids
array
Array of attachment IDs to remove when the movement is updated.
// app/Http/Requests/MovimientoEspontaneo/StoreMovimientoEspontaneoRequest.php
return [
    'nombre'            => 'required|string|max:255',
    'tipo_movimiento_id'=> 'required|integer|exists:tipo_movimientos,id',
    'cuenta_id'         => 'required|string|exists:cuentas,id',
    'categoria_id'      => 'required|string|exists:categorias,id',
    'monto'             => 'required|numeric|min:0',
    'descripcion'       => 'nullable|string|max:1000',
    'comprobantes'      => ['nullable', 'array'],
];

// app/Http/Requests/MovimientoEspontaneo/UpdateMovimientoEspontaneoRequest.php
// Extends StoreMovimientoEspontaneoRequest and adds:
return array_merge(parent::rules(), [
    'comprobantes_delete_ids' => ['nullable', 'array'],
    'comprobantes_existing'   => ['nullable', 'array'],
]);

Deleting a Spontaneous Movement

Deleting a spontaneous movement requires the current user’s password as confirmation. The password field is validated server-side before the movement is soft-deleted.
// app/Http/Requests/MovimientoEspontaneo/DestroyMovimientoEspontaneoRequest.php
return [
    'password' => ['required', 'string'],
];
You must submit password (the authenticated user’s current password) in the request body when calling DELETE /movimientos-espontaneos/{id}. Omitting it will return a validation error.

Routes

MethodURIAction
GET/movimientos-espontaneosList all spontaneous movements
GET/movimientos-espontaneos/createShow creation form
POST/movimientos-espontaneosStore a new movement
GET/movimientos-espontaneos/{id}/editShow edit form
PUT/movimientos-espontaneos/{id}Update a movement
DELETE/movimientos-espontaneos/{id}Delete a movement (requires password)

Historical Movements View

A read-only paginated list of all recorded movements (across every type) is accessible at:
MethodURIDescription
GET/movimientos/historicosPaginated historical movement list
GET/movimientos/historicos/{id}Detail view of a single movement
The historical view aggregates every movement regardless of type. Use it as an audit trail rather than a management interface. It does not support editing or deletion.

Pagos Pendientes

The /pagos-pendientes resource is registered in the router and renders a dedicated Pagos Pendientes view (PagosPendientes/Index). This feature is currently in an early implementation stage — the controller scaffolding is in place but the full business logic has not yet been completed. The routes are available for future use:
MethodURIAction
GET/pagos-pendientesList pagos pendientes
GET/pagos-pendientes/createShow creation form
POST/pagos-pendientesStore a new pago pendiente
GET/pagos-pendientes/{id}View a single pago pendiente
GET/pagos-pendientes/{id}/editShow edit form
PUT/pagos-pendientes/{id}Update a pago pendiente
DELETE/pagos-pendientes/{id}Delete a pago pendiente
For fully implemented pending obligation management, use the Movimientos Pendientes feature (/movimientos-pendientes) which includes status tracking, advance-notice alerts, and mark-as-done settlement.

File Attachments

Any spontaneous movement or settled pending movement can carry one or more file attachments (receipts, invoices, bank confirmations). Files are stored on the configured disk (defaults to local) and referenced through the archivo_movimientos table.
// database/migrations/2026_02_03_153930_create_archivo_movimientos_table.php
$table->string('nombre_original');
$table->string('nombre_guardado');
$table->string('disk')->default('local');
$table->string('path');
$table->string('mime_type');
$table->string('extension');
$table->unsignedBigInteger('tamano_bytes');
$table->text('notas')->nullable();
MethodURIAction
GET/movimientos/archivos/{id}Stream the file inline
GET/movimientos/archivos/{id}/downloadForce-download the file
The dias_aviso field on both fixed and pending movements lets you receive an email warning N days before the due date. Set it to 3 to get a three-day heads-up before each recurrence fires.

Build docs developers (and LLMs) love