projet de comptabilité personnel simplifié et 100% local
Find a file
le king fu 7a604e0e0d
All checks were successful
PR Check — Frontend / frontend (pull_request) Successful in 1m48s
fix(import): persist the import format and restore it faithfully
The root bug of this chantier. `import_sources` carried no `amount_mode` and no
`sign_convention` until v17, so restoring a configured source re-inferred the
mode from `mapping.debitAmount !== undefined` and wrote
`signConvention: "negative_expense"` outright (useImportWizard.ts:321-323). A
credit-card statement configured for positive expenses came back on the default
convention at its second import and `parseFilesInternal` negated every amount:
expenses landed as income, with no error shown anywhere. The format is a read
value now, not a guessed one.

Two types and a codec, not one composed type. The four carriers are
structurally incompatible -- `ImportSource.has_header` is declared boolean,
`ImportConfigTemplate.has_header` is a number, `SourceConfig` is camelCase on a
parsed mapping -- so the guarantee cannot come from a shared shape. It comes
from `src/utils/importFormat.ts` being the single conversion point between
`ImportFormatRow` (persisted: snake_case, mapping as JSON, `has_header`
normalized to 0/1) and `ImportFormat` (domain), and from its completeness test.

That test is enforced on two levels, and both were mutation-checked:
`FORMAT_FIELD_PAIRS` is typed `Record<keyof ImportFormat, keyof
ImportFormatRow>`, so a field added to the format fails to BUILD until it is
listed; the test then compares each codec's real output keys against that table,
so a field listed but not wired fails the TEST. Dropping `sign_convention` from
`formatToRow` -- the shape of the original bug -- fails 14 tests.

`formatFromRow` validates rather than falls back. The v17 CHECK admits
`absolute_indicator` so the third amount mode ships without another migration,
but the app cannot map one: falling through to the `single` branch would read
the wrong column for every row, and anything other than `positive_expense`
would silently mean `negative_expense`. It raises an `ImportFormatError`
carrying an i18n key, and the wizard opens on a fresh configuration so
"reconfigure this source" stays an action the user can actually take.

Also here:

- The config write moves from `checkDuplicatesInternal` to `executeImport`, so
  an import abandoned at the duplicate step leaves no configuration behind. It
  is the only write point in the hook and a guard test holds that.
- Switching amount mode prunes the abandoned mode's columns, so the mode owns
  the mapping rather than the reverse. The column the `<select>` merely displays
  is deliberately not materialized -- #325 turns an unmapped amount column into
  an explicit row error, and writing a 0 here would make it unreachable. The
  mode and the pruned mapping land in ONE state update: the panel's handlers
  each spread the same `config` prop, so two calls would see the same stale
  value.
- `template_id` is recorded and restored as provenance only, never re-read as
  format. `selectedTemplateId` is no longer blanked on every source selection.
  An acceptance test rewrites a template end to end and asserts the linked
  source reads identically, plus a non-vacuity check that the template really
  changed.
- Both template writers go through the codec too, so a new format field cannot
  reach one table and miss the other.

`parseFilesInternal` is untouched: link 1's static guard on its five pinned
expressions still passes. 39 new tests (963 vitest total, was 924), build clean,
`cargo check` clean, no migration.

Resolves #324
2026-08-13 13:16:52 -04:00
.cargo fix(deps): clear 6 reachable RustSec advisories, accept 3 unreachable ones 2026-07-27 19:45:15 -04:00
.claude ci: ignore .claude/ in the frontend filter, drop stale check.yml ref 2026-07-24 21:02:12 -04:00
.forgejo/workflows ci: make the suppression guard log every check, not just failures 2026-07-27 20:00:09 -04:00
.github/workflows chore(ci): drop redundant push trigger; add concurrency group 2026-04-28 20:50:34 -04:00
config Initial project scaffold: Tauri v2 + React + TypeScript + TailwindCSS v4 2026-02-07 11:05:11 +00:00
docs fix(deps): update postcss to 8.5.23, accept the react-router advisory 2026-07-27 20:00:11 -04:00
public feat(branding): replace default Tauri icon with custom design 2026-05-02 14:51:55 -04:00
src fix(import): persist the import format and restore it faithfully 2026-08-13 13:16:52 -04:00
src-tauri schema: add migration v17 carrying the full import format on import_sources 2026-08-13 12:56:28 -04:00
tasks docs: update lessons learned from recent sessions 2026-02-15 13:40:06 +00:00
tests/smoke feat(prices): commit smoke test scaffold for /v1/prices 2026-04-28 21:31:27 -04:00
.gitignore feat(reports): real-vs-real compare as an income statement + previous-month default 2026-07-05 18:36:57 -04:00
CHANGELOG.fr.md fix(deps): update postcss to 8.5.23, accept the react-router advisory 2026-07-27 20:00:11 -04:00
CHANGELOG.md fix(deps): update postcss to 8.5.23, accept the react-router advisory 2026-07-27 20:00:11 -04:00
CLAUDE.md fix(deps): update postcss to 8.5.23, accept the react-router advisory 2026-07-27 20:00:11 -04:00
index.html feat(branding): replace default Tauri icon with custom design 2026-05-02 14:51:55 -04:00
LICENSE Add GPL-3.0 license 2026-03-01 10:10:43 -05:00
package-lock.json fix(deps): update postcss to 8.5.23, accept the react-router advisory 2026-07-27 20:00:11 -04:00
package.json chore: release v0.14.0 2026-07-18 14:56:17 -04:00
README.md docs: update README for v0.3.7 with new features and Linux support 2026-02-18 07:29:51 -05:00
spec-decisions-collapse-multi-niveaux.md docs(collapse): ADR 0016 per-profile UI state + guide, architecture, i18n 2026-07-18 14:43:24 -04:00
spec-decisions-feature-gating.md spec(gating): adjustments -> Base tier + STATE review sync 2026-07-19 17:44:22 -04:00
spec-decisions-import-csv-format.md docs(spec): add import CSV format spec (decisions + reviewed plan) 2026-08-13 12:17:04 -04:00
spec-decisions-refonte-seed-categories-ipc.md docs: add spec decisions and plan for categories IPC seed refactor 2026-04-19 15:35:15 -04:00
spec-issue-66-oauth-keychain.md docs: add WIP specs for OAuth keychain, monetisation, reports, and web 2026-04-20 20:41:00 -04:00
spec-monetisation.md docs: add WIP specs for OAuth keychain, monetisation, reports, and web 2026-04-20 20:41:00 -04:00
spec-plan-collapse-multi-niveaux.md docs(collapse): ADR 0016 per-profile UI state + guide, architecture, i18n 2026-07-18 14:43:24 -04:00
spec-plan-feature-gating.md spec(gating): adjustments -> Base tier + STATE review sync 2026-07-19 17:44:22 -04:00
spec-plan-import-csv-format.md docs(spec): add import CSV format spec (decisions + reviewed plan) 2026-08-13 12:17:04 -04:00
spec-plan-refonte-seed-categories-ipc.md docs: add spec decisions and plan for categories IPC seed refactor 2026-04-19 15:35:15 -04:00
spec-refonte-rapports.md docs: add WIP specs for OAuth keychain, monetisation, reports, and web 2026-04-20 20:41:00 -04:00
spec-simpl-resultat-web.md docs: add WIP specs for OAuth keychain, monetisation, reports, and web 2026-04-20 20:41:00 -04:00
STATE.md state: sync after #310 + #311 merge (deps advisories cleared) 2026-07-27 20:41:01 -04:00
tsconfig.json Initial project scaffold: Tauri v2 + React + TypeScript + TailwindCSS v4 2026-02-07 11:05:11 +00:00
tsconfig.node.json Initial project scaffold: Tauri v2 + React + TypeScript + TailwindCSS v4 2026-02-07 11:05:11 +00:00
vite.config.ts fix: address reviewer feedback (#37) 2026-03-11 14:04:34 -04:00

Simpl'Résultat

Application de bureau 100 % locale pour importer, catégoriser et analyser vos transactions financières personnelles ou d'entreprise. Aucune donnée ne quitte votre ordinateur.

Version Windows Linux

Fonctionnalités

  • Import CSV — Importez vos relevés bancaires depuis plusieurs sources avec auto-détection des colonnes et modèles d'import réutilisables
  • Tableau de bord — Vue d'ensemble avec KPIs, répartition par catégorie et dernières transactions
  • Transactions — Parcourez, recherchez et filtrez avec sélection rapide de période
  • Catégorisation automatique — Attribution automatique par mots-clés, avec ajustement manuel
  • Split de transactions — Répartissez une transaction sur plusieurs catégories
  • Budgets — Grille budgétaire 12 mois par catégorie avec modèles et rapport Budget vs Réel
  • Ajustements — Ajustements ponctuels ou récurrents par catégorie
  • Rapports — Tendances mensuelles, répartition par catégorie, évolution dans le temps, budget vs réel
  • Graphiques interactifs — Motifs SVG, menu contextuel (clic droit), détail des transactions par catégorie
  • Profils multiples — Bases de données séparées avec protection PIN optionnelle
  • Export / Import de données — Sauvegarde complète avec chiffrement AES-256-GCM optionnel
  • Mode sombre — Thème sombre avec palette gris chaud
  • Bilingue — Interface disponible en français et en anglais
  • Guide utilisateur intégré — Documentation complète accessible depuis les paramètres, imprimable en PDF
  • Mise à jour automatique — Notifications et installation des nouvelles versions depuis l'application

Installation

Windows

  1. Rendez-vous sur la page Releases
  2. Téléchargez le fichier .exe (installateur NSIS)
  3. Lancez le fichier téléchargé

Note : Windows SmartScreen peut afficher un avertissement car l'application n'est pas signée numériquement. Cliquez sur « Informations complémentaires » puis « Exécuter quand même » pour continuer.

Linux

  1. Rendez-vous sur la page Releases
  2. Téléchargez le format adapté à votre distribution :
    • .deb pour Debian / Ubuntu
    • .rpm pour Fedora / openSUSE
    • .AppImage pour toute distribution (exécutable universel)
  3. Installez le paquet ou lancez l'AppImage directement

Démarrage rapide

1. Choisir ou créer un profil

Au premier lancement, un profil par défaut est créé. Vous pouvez ajouter d'autres profils (chacun avec sa propre base de données) et les protéger par un PIN.

2. Configurer le dossier d'import

Organisez vos fichiers CSV dans un dossier avec un sous-dossier par source :

Documents/
  Comptabilité/
    Desjardins/
      releve-2024-01.csv
      releve-2024-02.csv
    Autre banque/
      export.csv

3. Importer des transactions

  • Allez dans Import
  • Sélectionnez le dossier source et les fichiers CSV
  • Configurez le mappage des colonnes (ou utilisez un modèle d'import sauvegardé)
  • Vérifiez les doublons puis lancez l'import

4. Consulter le tableau de bord

Le tableau de bord affiche automatiquement :

  • Les KPIs du mois (revenus, dépenses, solde)
  • La répartition des dépenses par catégorie
  • Les dernières transactions

5. Parcourir et catégoriser les transactions

  • Utilisez la recherche et les filtres (date, catégorie, source, période rapide)
  • Modifiez la catégorie d'une transaction en cliquant dessus
  • Ajoutez des mots-clés pour automatiser les futures catégorisations
  • Scindez une transaction sur plusieurs catégories si nécessaire

6. Gérer les budgets

  • Définissez un budget mensuel par catégorie sur une grille 12 mois
  • Créez des modèles budgétaires réutilisables
  • Consultez le rapport Budget vs Réel pour suivre vos écarts

7. Analyser les rapports

  • Tendances — Évolution mensuelle des revenus et dépenses
  • Catégories — Répartition détaillée par catégorie (clic droit pour masquer ou voir le détail)
  • Évolution — Suivi dans le temps par catégorie
  • Budget vs Réel — Comparaison mensuelle et cumul annuel

8. Guide utilisateur

Un guide complet est accessible via Paramètres → Guide utilisateur. Il couvre toutes les fonctionnalités et peut être imprimé ou exporté en PDF.

Développement

Prérequis

Lancer en mode développement

npm install
npm run tauri dev

Compiler l'application

npm run tauri build

Les installateurs sont générés dans src-tauri/target/release/bundle/.

Publier une nouvelle version

  1. Mettez à jour la version dans src-tauri/tauri.conf.json et package.json
  2. Committez les changements
  3. Créez et poussez un tag :
git tag v0.3.7
git push origin v0.3.7

Le workflow GitHub Actions compile automatiquement l'application pour Windows et Linux, puis publie les installateurs dans une nouvelle Release.

Technologies

Technologie Rôle
Tauri v2 Framework desktop (Rust backend)
React 19 Interface utilisateur
SQLite Base de données locale
Tailwind CSS v4 Styles
Recharts Graphiques
react-i18next Internationalisation
PapaParse Parsing CSV