Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion .github/actions/setup-rust/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,19 @@ runs:
build-essential curl file libayatana-appindicator3-dev libgtk-3-dev \
librsvg2-dev libssl-dev libwebkit2gtk-4.1-dev libxdo-dev patchelf wget

- uses: dtolnay/rust-toolchain@stable
# Version lue depuis `rust-toolchain.toml` plutôt qu'écrite ici : deux endroits
# finiraient par diverger, et c'est justement la dérive que l'épinglage évite.
- name: Version de la toolchain
id: toolchain
shell: bash
run: |
channel=$(sed -n 's/^channel[[:space:]]*=[[:space:]]*"\([^"]*\)".*/\1/p' rust-toolchain.toml)
echo "channel=$channel" >> "$GITHUB_OUTPUT"
echo "Toolchain épinglée : $channel"

- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ steps.toolchain.outputs.channel }}
components: clippy, rustfmt

# `workspaces` est obligatoire : le projet Cargo est dans src-tauri/, pas à la racine.
Expand Down
12 changes: 3 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,13 +60,6 @@ jobs:

- run: cargo clippy --manifest-path src-tauri/Cargo.toml --all-targets --locked -- -D warnings

# Les deux gardes de direction des dépendances documentées dans CLAUDE.md :
# domain/ ne connaît ni rusqlite ni Tauri, storage/ ne remonte pas vers commands/.
- name: Garde des dépendances entre couches
run: |
! grep -rn "rusqlite\|tauri::" src-tauri/src/domain/
! grep -rn "use crate::commands" src-tauri/src/storage/

build-front:
name: Build front
runs-on: ubuntu-22.04
Expand Down Expand Up @@ -173,8 +166,9 @@ jobs:
steps:
- uses: actions/checkout@v4

# Restaure le target/ de `build-rust` — dont la compilation de SQLite (rusqlite
# `bundled` compile les sources C), qui est l'essentiel du temps de ce job.
# Restaure le target/ de `build-rust` — dont la compilation de SQLite
# (`libsqlite3-sys` en `bundled` compile les sources C), qui est l'essentiel
# du temps de ce job.
- uses: ./.github/actions/setup-rust
with:
shared-key: rust-ubuntu
Expand Down
3 changes: 3 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ coverage
src-tauri/target
# Schémas générés par Tauri au build.
src-tauri/gen
# Bindings générés par tauri-specta : réécrits à chaque build Rust, les reformater
# ferait diverger le fichier de ce que le générateur produit.
src/app/core/ipc/bindings.ts
package-lock.json
# Maquette statique de référence : conservée telle quelle, hors périmètre du formatage.
docs/scratch-mockup-v2.html
55 changes: 32 additions & 23 deletions CLAUDE.md

Large diffs are not rendered by default.

25 changes: 14 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ A developer's Swiss Army knife for the desktop: a notes/snippets manager, plus u

> **Status** — the notes feature is complete end to end. The UI has no mock data left, every
> read and write crosses the `invoke()` bridge, and the Rust side persists to an embedded
> SQLite database. Business rules live in `src-tauri/src/domain/`, which depends on neither
> rusqlite nor Tauri. `crypto` and `formatters` are documented placeholders, not yet built.
> SQLite database. Business rules live in each feature's `model.rs`, which depends on neither
> Diesel nor Tauri. `crypto` and `formatters` are documented placeholders, not yet built.

## Prerequisites

Expand Down Expand Up @@ -53,15 +53,18 @@ For Rust-only iteration, `cargo check` from `src-tauri/` is much faster than a f
```
src/ Angular front-end (core/ state & data, features/ screens, layout/, shared/)
src-tauri/src/
domain/ Model and business rules — knows neither SQLite nor Tauri
storage/ SQLite persistence: SQL only, depends on domain/
commands/ Tauri adapters: lock, delegate, translate the error
notes/ The notes feature: model.rs, language.rs, view.rs, store.rs
spaces/ The spaces feature: model.rs, store.rs
db.rs Connection, migrations, schema, stored-instant format
error.rs The three errors and the translation between them
desktop.rs Tray and global shortcuts — native glue, not a feature
docs/ Architecture notes and UI mockup
```

Dependencies point one way: `commands/ → domain/ ← storage/`. Two greps keep it honest —
`grep -rn "rusqlite\|tauri::" src-tauri/src/domain/` and
`grep -rn "use crate::commands" src-tauri/src/storage/` must both come back empty.
Both halves are filed by **subject**, not by technical nature. On the Rust side each feature
owns its model, its SQL and the commands that expose it: `<feature>.rs` holds the
`#[tauri::command]`s, `<feature>/model.rs` the rules, `<feature>/store.rs` the SQL. Deleting
`src-tauri/src/notes/` deletes the feature.

## Documentation

Expand All @@ -80,9 +83,9 @@ Dependencies point one way: `commands/ → domain/ ← storage/`. Two greps keep
- [x] Full note editing: content, format, tags, pin, deletion
- [x] Spaces: notes carry a `spaceId`, the switcher filters on it and can create a space
- [x] ESLint + Prettier, with template accessibility rules
- [x] Persistence: embedded SQLite (`rusqlite`, `bundled`) with versioned, append-only
migrations
- [x] Business rules isolated in `src-tauri/src/domain/`, testable without a database
- [x] Persistence: embedded SQLite through Diesel (`libsqlite3-sys` `bundled`) with
append-only, embedded migrations
- [x] Business rules isolated in each feature's `model.rs`, testable without a database
- [x] Rust tests, clippy (`deny(clippy::all)`) and rustfmt
- [ ] Renaming and deleting a space — needs a decision on what happens to its notes
- [ ] Moving a note between spaces (already expressible: `spaceId` is part of `NotePatch`)
Expand Down
Loading
Loading