From c7d6e2339884bbd176d7880a80dac43f51a1b409 Mon Sep 17 00:00:00 2001 From: Felipe Coutinho Date: Wed, 1 Apr 2026 14:15:03 +0000 Subject: [PATCH] chore: atualiza biome, CLAUDE.md, llms.txt e corrige optional chaining MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - biome.json: schema atualizado para 2.4.9 - public/llms.txt: novo arquivo de documentação pública do projeto - CLAUDE.md: ajustes menores de documentação interna - invoices-queries.ts: usa optional chaining `?.startsWith` no lugar de verificação dupla de nullish - CHANGELOG.md: documentadas as mudanças do ciclo atual em [Unreleased] Co-Authored-By: Claude Sonnet 4.6 --- CHANGELOG.md | 18 +++++++++++ CLAUDE.md | 4 +++ biome.json | 2 +- public/llms.txt | 36 ++++++++++++++++++++++ src/features/dashboard/invoices-queries.ts | 2 +- 5 files changed, 60 insertions(+), 2 deletions(-) create mode 100644 public/llms.txt diff --git a/CHANGELOG.md b/CHANGELOG.md index 5e92046..121e95b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,24 @@ e este projeto adere ao [Versionamento Semântico](https://semver.org/lang/pt-BR ## [Unreleased] +### Adicionado + +- Anexos: nova página de galeria em `/attachments` com miniaturas, visualização inline de imagem e PDF, download direto e acesso a partir do lançamento +- Anexos: suporte a visualização de PDF diretamente no app via `pdfjs-dist` +- Autenticação: sidebar redesenhado com mockup de faturas e três itens de funcionalidade; páginas de login e cadastro ganham gradiente decorativo e logo visível no mobile +- Notificações: alertas de vencimento para boletos e faturas do período seguinte exibidos quando o vencimento está dentro de 5 dias +- Documentação: novo arquivo público `public/llms.txt` com resumo do projeto e links curados para documentação, setup e arquitetura + +### Alterado + +- Performance: queries de cache do dashboard migradas de `unstable_cache` para a diretiva `use cache` com `cacheTag` e `cacheLife`; todas as páginas do dashboard passam a chamar `connection()` para renderização dinâmica; `next.config.ts` adota `cacheComponents: true` +- Tipografia: adicionada fonte America Medium (weight 500); pesos tipográficos padronizados para `font-medium` em títulos, valores e rótulos em todos os componentes +- Anexos: `AttachmentPreview` foi simplificado para exibir apenas nome da transação, nome do arquivo, navegação entre anexos e ações de download, abrir em nova aba e fechar com ícone `X` + +### Corrigido + +- Lançamentos: uploads e remoções de anexo agora funcionam para todos os lançamentos, não apenas os pertencentes a séries + ## [2.1.2] - 2026-03-30 ### Adicionado diff --git a/CLAUDE.md b/CLAUDE.md index 0d001be..b1fa3cf 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -44,6 +44,10 @@ Use esta pergunta: Se um contrato cruza dominios, ele deve morar em `src/shared/`. +**Excecao intencional: `attachments` depende de `transactions`** + +`src/features/attachments` importa `TransactionDialog`, `TransactionDetailsDialog` e `TransactionItem` diretamente de `src/features/transactions`. Isso e uma dependencia explicita e aceita: anexos sao semanticamente uma extensao de lancamentos — existem por causa deles e nao fazem sentido sem esse contexto. Mover esses componentes para `shared/` seria errado (eles pertencem a transactions). Nao tratar isso como bug a corrigir. + Exemplos comuns: - auth: `src/shared/lib/auth/*` diff --git a/biome.json b/biome.json index 6c708c2..422d2c5 100644 --- a/biome.json +++ b/biome.json @@ -1,5 +1,5 @@ { - "$schema": "https://biomejs.dev/schemas/2.4.8/schema.json", + "$schema": "https://biomejs.dev/schemas/2.4.9/schema.json", "vcs": { "enabled": true, "clientKind": "git", diff --git a/public/llms.txt b/public/llms.txt new file mode 100644 index 0000000..ec22172 --- /dev/null +++ b/public/llms.txt @@ -0,0 +1,36 @@ +# OpenMonetis + +> OpenMonetis is a self-hosted personal finance web app for manual financial control. It helps users manage accounts, cards, invoices, budgets, notes, reports, attachments, and AI-generated insights. The product UI is in Brazilian Portuguese, the codebase uses English folder and import names, and there is no hosted SaaS version. + +OpenMonetis is meant to be deployed by the user on their own machine or server. +There is no Open Finance or automatic bank synchronization. +Transactions can be entered manually or imported from OFX and XLS/XLSX files. +Attachments are optional and require S3-compatible storage. +The public website is mainly a landing page; the main technical documentation lives in the GitHub repository. + +## Docs + +- [Landing page](/): Public homepage and high-level product overview +- [README](https://github.com/felipegcoutinho/openmonetis/blob/main/README.md): Main project documentation covering features, installation, Docker, environment variables, architecture, contributing, and license +- [CHANGELOG](https://github.com/felipegcoutinho/openmonetis/blob/main/CHANGELOG.md): Release history and notable changes +- [LICENSE](https://github.com/felipegcoutinho/openmonetis/blob/main/LICENSE): CC BY-NC-SA 4.0 license terms + +## Setup + +- [Setup script](https://raw.githubusercontent.com/felipegcoutinho/openmonetis/main/setup.mjs): Interactive installer for local or self-hosted setup +- [Environment example](https://github.com/felipegcoutinho/openmonetis/blob/main/.env.example): Required and optional environment variables +- [Docker Compose](https://github.com/felipegcoutinho/openmonetis/blob/main/docker-compose.yml): Local app and PostgreSQL stack definition + +## Architecture + +- [CLAUDE.md](https://github.com/felipegcoutinho/openmonetis/blob/main/CLAUDE.md): Project architecture, naming rules, query rules, and feature checklist +- [AGENTS.md](https://github.com/felipegcoutinho/openmonetis/blob/main/AGENTS.md): Agent-oriented project instructions and repository context + +## Related Projects + +- [OpenMonetis Companion](https://github.com/felipegcoutinho/openmonetis-companion): Android app that captures bank notifications and sends them to the OpenMonetis inbox for review + +## Optional + +- [robots.txt](/robots.txt): Crawl policy for the public site +- [sitemap.xml](/sitemap.xml): Public sitemap diff --git a/src/features/dashboard/invoices-queries.ts b/src/features/dashboard/invoices-queries.ts index 8d9a4d9..d3751a4 100644 --- a/src/features/dashboard/invoices-queries.ts +++ b/src/features/dashboard/invoices-queries.ts @@ -89,7 +89,7 @@ export async function fetchDashboardInvoices( const paymentMap = new Map(); for (const row of paymentRows) { const note = row.note; - if (!note || !note.startsWith(ACCOUNT_AUTO_INVOICE_NOTE_PREFIX)) { + if (!note?.startsWith(ACCOUNT_AUTO_INVOICE_NOTE_PREFIX)) { continue; } const parts = note.split(":");