Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
205 commits
Select commit Hold shift + click to select a range
0b44611
server: add healthcheck subcommand
Skyfuller1303 Nov 3, 2026
585e4b9
packaging: add a hardened container image and a Docker Compose deploy…
Skyfuller1303 Nov 3, 2026
61829b0
meta: add device sessions, password change and revoke queries
Skyfuller1303 Nov 3, 2026
862b167
api, proto, server: add account, password change and device routes
Skyfuller1303 Nov 3, 2026
6c9454c
server: sign devices out on password reset, add device revoke-all
Skyfuller1303 Nov 3, 2026
afc44ff
docs: describe device sessions, password change and migration 0007
Skyfuller1303 Nov 3, 2026
6811ec7
server: answer 401 to the long-poll and live socket of a signed-out d…
Skyfuller1303 Nov 3, 2026
8c891b3
meta, server: keep a password change atomic against revokes and races
Skyfuller1303 Nov 3, 2026
6fa9f56
server: fix the healthcheck request and its answer check
Skyfuller1303 Nov 3, 2026
00f31da
server: look a long-polling device up again after the change set is read
Skyfuller1303 Nov 3, 2026
62e9151
meta: take the user's row first in every transaction that revokes or …
Skyfuller1303 Nov 3, 2026
d324a12
server: require a complete status line in the healthcheck
Skyfuller1303 Nov 3, 2026
d93728b
packaging: keep invite codes out of Caddy's error log
Skyfuller1303 Nov 3, 2026
7d5331d
packaging: pass db-init the superuser password in a private file
Skyfuller1303 Nov 3, 2026
302acd2
packaging: give Caddy's address a pool of its own, update the Docker …
Skyfuller1303 Nov 3, 2026
b33af92
packaging: refuse a secret file with more than one line
Skyfuller1303 Nov 4, 2026
fe47e7e
packaging: recreate secrets-init to change a secret or a setting
Skyfuller1303 Nov 4, 2026
3dd9f28
meta tests: let the failure test's check run more than once
Skyfuller1303 Nov 4, 2026
f69dab0
meta, server: lock the account first when a join, a pairing or a sign…
Skyfuller1303 Nov 4, 2026
31d92fd
meta: consume a join code only for the account it was found for
Skyfuller1303 Nov 4, 2026
e516a77
store: say what kind of storage a backend is
Skyfuller1303 Nov 4, 2026
876b181
proto: add the admin API's bodies and error codes
Skyfuller1303 Nov 4, 2026
4586bad
meta: add admin changes, reset codes, removal marks and quotas
Skyfuller1303 Nov 4, 2026
37b8be8
server: enforce the admin role and add the HTTP admin API
Skyfuller1303 Nov 4, 2026
282d04d
server: do not count a try the limiter refuses
Skyfuller1303 Nov 4, 2026
32e8d08
meta: refuse a sign-in checked before a disable and an enable
Skyfuller1303 Nov 4, 2026
436da65
agent: build a historical live snapshot by replaying its history
Skyfuller1303 Nov 4, 2026
39b8e35
proto: add the audit log's bodies
Skyfuller1303 Nov 4, 2026
be81aba
meta: write the security audit log, one event with each change
Skyfuller1303 Nov 4, 2026
d5485ef
server: add the audit routes, the [audit] config and the audit command
Skyfuller1303 Nov 4, 2026
7d80a6f
docs: describe the security audit log
Skyfuller1303 Nov 4, 2026
833e56a
server, docs: hide others' details in own activity, honour before_ms …
Skyfuller1303 Nov 4, 2026
7450523
deps: add aes-gcm, hmac, sha1, subtle and zeroize for two-factor sign-in
Skyfuller1303 Nov 4, 2026
9190657
meta: add two-factor sign-in, sign-in challenges and the lock
Skyfuller1303 Nov 4, 2026
cb19c05
proto, api: add the two-factor bodies, the challenge and the error codes
Skyfuller1303 Nov 4, 2026
7716e43
meta: show sealed secrets by length only in Debug output
Skyfuller1303 Nov 4, 2026
3f8ab9f
server: add two-factor sign-in, the key file and the admin integration
Skyfuller1303 Nov 4, 2026
2f47fb7
docs: describe two-factor sign-in, its key file and the admin confirm…
Skyfuller1303 Nov 4, 2026
b11af72
meta: count wrong proofs under the lock that checked them, and rewrit…
Skyfuller1303 Nov 4, 2026
6f57f99
server: rekey every secret fresh per account and check again, let a l…
Skyfuller1303 Nov 4, 2026
758b625
docs: rotate the key with every instance restarted first, and what th…
Skyfuller1303 Nov 4, 2026
1cbbecf
server, meta: answer every refused join alike, and force the rekey ra…
Skyfuller1303 Nov 4, 2026
ccabbe9
api, proto, app: add the local API's two-factor calls, the typed chal…
Skyfuller1303 Nov 4, 2026
a3b11af
agent: add the second step of a sign-in, a code for join and the acco…
Skyfuller1303 Nov 4, 2026
6ed1260
desktop: add the Security page and the code a join asks for
Skyfuller1303 Nov 4, 2026
a7c24cb
docs: two-factor sign-in at the agent and its local API
Skyfuller1303 Nov 4, 2026
2cc5d1a
app: test that the challenge is hidden by its value, not its field name
Skyfuller1303 Nov 4, 2026
e5ffda0
desktop, app: forget typed secrets in egui's undo history; keep the R…
Skyfuller1303 Nov 4, 2026
a35b6c7
meta, proto: write the audit events of two-factor sign-in
Skyfuller1303 Nov 4, 2026
75153fb
server: audit a sign-in's challenge that is not good, test the two-fa…
Skyfuller1303 Nov 4, 2026
d288a50
docs: describe what two-factor sign-in writes to the audit log
Skyfuller1303 Nov 4, 2026
5239af5
api, app: the admin API's bodies for apps, and blocking admin calls
Skyfuller1303 Nov 4, 2026
822ae2c
agent: pass the server's admin API through the local API
Skyfuller1303 Nov 4, 2026
e6bbb52
desktop: admin pages for admins
Skyfuller1303 Nov 4, 2026
f16bb8a
docs: the local API's admin calls
Skyfuller1303 Nov 4, 2026
31f54f4
desktop: forget the typed password, match answers to their calls, rev…
Skyfuller1303 Nov 4, 2026
08015da
api, app: the audit log and the signed-in account for apps
Skyfuller1303 Nov 4, 2026
da32856
agent: pass the account, its activity and the audit log through the l…
Skyfuller1303 Nov 4, 2026
d7034bf
desktop: confirm admin changes with a second factor, turn two-factor …
Skyfuller1303 Nov 4, 2026
1397ad9
desktop: the audit log for admins, every account's own activity, and …
Skyfuller1303 Nov 4, 2026
22fa708
docs: the local API's account, activity and audit calls, and the seco…
Skyfuller1303 Nov 4, 2026
9d4436a
audit: write exports to a file of their own, match export answers to …
Skyfuller1303 Nov 4, 2026
29befa3
proto: add the history and restore bodies
Skyfuller1303 Nov 4, 2026
7c7096c
meta: add version history and restore of an old version
Skyfuller1303 Nov 4, 2026
d2a0c0f
server: add the history and restore routes
Skyfuller1303 Nov 4, 2026
2171728
docs: describe version history and restore
Skyfuller1303 Nov 4, 2026
ec83bd7
meta, docs: index the history query and correct the restore note
Skyfuller1303 Nov 4, 2026
48106b5
proto: add the trash bodies
Skyfuller1303 Nov 4, 2026
523ff28
meta: add the trash, with deletion times and a restore that works aro…
Skyfuller1303 Nov 4, 2026
aa7f082
server: add the trash routes and retention.trash_days
Skyfuller1303 Nov 4, 2026
4023e5c
docs: describe the trash
Skyfuller1303 Nov 4, 2026
14e95c4
meta: add browser sessions for the web admin
Skyfuller1303 Nov 4, 2026
79914b8
server: add the admin pages with browser sessions
Skyfuller1303 Nov 4, 2026
e354075
docs: describe the admin pages, browser sessions and web-sessions prune
Skyfuller1303 Nov 4, 2026
135688a
meta, proto: bring a file back as a new version and keep restored fol…
Skyfuller1303 Nov 4, 2026
015f2de
sync: do not delete a folder twice after a delete whose answer was lost
Skyfuller1303 Nov 4, 2026
81224f0
docs, server: correct the agent compatibility of the trash restore
Skyfuller1303 Nov 4, 2026
b7e6cb1
sync: judge a folder whose delete was in doubt after the files it hel…
Skyfuller1303 Nov 4, 2026
0d58ecf
test server API on Postgres with disk storage
Skyfuller1303 Nov 4, 2026
28d7aa7
sync: settle a lost folder delete deepest first and on a relist
Skyfuller1303 Nov 4, 2026
2aad296
sync: pin folder rules after lost deletes
Skyfuller1303 Nov 4, 2026
f2f51b1
meta: add the reference index of what each manifest names
Skyfuller1303 Nov 4, 2026
d0ff336
server: add verify and index build, and finish a manifest's index bef…
Skyfuller1303 Nov 4, 2026
b70886d
docs: describe the reference index and verify
Skyfuller1303 Nov 4, 2026
54ff35c
meta: find negative ordinals and reset an index in bounded batches
Skyfuller1303 Nov 4, 2026
d7c6898
server, meta, store: verify only an existing server and check the siz…
Skyfuller1303 Nov 4, 2026
c8725af
test: cover reference index edge cases
Skyfuller1303 Nov 4, 2026
1f9610a
meta, server: make the reference index edge-case tests prove what the…
Skyfuller1303 Nov 4, 2026
5edfa80
Raise the minimum Rust version to 1.95 and check it in CI
Skyfuller1303 Nov 4, 2026
39c682a
meta, server: name web admin sign-ins in the audit log
Skyfuller1303 Nov 4, 2026
11d89e9
api, app: add the file history and restore calls of the local API
Skyfuller1303 Nov 4, 2026
59e9aa9
agent: forward a file's history and a restore from the local API
Skyfuller1303 Nov 4, 2026
eec5cf6
desktop: add a versions screen for a file
Skyfuller1303 Nov 4, 2026
35d8003
docs: describe the local file history and restore routes
Skyfuller1303 Nov 4, 2026
af15254
store: list the blobs of a kind in pages
Skyfuller1303 Nov 4, 2026
197a2fa
Merge history-ui into trash-ui
Skyfuller1303 Nov 4, 2026
c020eb9
api, app: add trash client operations
Skyfuller1303 Nov 4, 2026
acef672
agent: expose trash through local API
Skyfuller1303 Nov 4, 2026
1b610c1
desktop: add trash screen
Skyfuller1303 Nov 4, 2026
21ff2ee
docs: describe local trash routes
Skyfuller1303 Nov 4, 2026
de88483
desktop: report a restore at the sync root and cover stuck-screen cases
Skyfuller1303 Nov 4, 2026
84599b5
meta, server: open an existing SQLite database read-only so verify ca…
Skyfuller1303 Nov 5, 2026
544c563
Merge store-list into gc-dry-run
Skyfuller1303 Nov 5, 2026
1dac175
store: read objects within their size limit and read a stored size wi…
Skyfuller1303 Nov 5, 2026
857dab8
meta, server: inventory the store and add gc --dry-run, which changes…
Skyfuller1303 Nov 5, 2026
cf18199
docs: the store inventory and the gc dry run
Skyfuller1303 Nov 5, 2026
7b15de1
Merge docker (#13)
Skyfuller1303 Nov 5, 2026
25f3b45
Merge agent-memory-bound (#16)
Skyfuller1303 Nov 5, 2026
dcbc88e
Merge test-postgres-disk (#23)
Skyfuller1303 Nov 5, 2026
58c3d04
Merge msrv-195 (#26)
Skyfuller1303 Nov 5, 2026
f08c348
Merge admin-ui-desktop (#20)
Skyfuller1303 Nov 5, 2026
4af44c7
integration: close healthcheck helper before audit command
Skyfuller1303 Nov 5, 2026
b0b4996
integration: share Postgres disk test helper
Skyfuller1303 Nov 5, 2026
d010d7c
Merge audit-web-kind (#27)
Skyfuller1303 Nov 5, 2026
dad87a0
integration: use shared admin API types
Skyfuller1303 Nov 5, 2026
2ffd71c
Merge trash-ui (#30)
Skyfuller1303 Nov 5, 2026
a074e26
integration: combine app API exports and tests
Skyfuller1303 Nov 5, 2026
757c10f
integration: merge refusal details and restore exports
Skyfuller1303 Nov 5, 2026
62b6ac0
integration: close merged server config blocks
Skyfuller1303 Nov 5, 2026
7fea19d
integration: close public URL state builder
Skyfuller1303 Nov 5, 2026
8ece480
integration: combine local refusal mappings
Skyfuller1303 Nov 5, 2026
67e4a61
integration: combine local API error details
Skyfuller1303 Nov 5, 2026
46f3670
integration: repair local API error merge
Skyfuller1303 Nov 5, 2026
66cf77a
integration: fix combined agent and desktop fixtures
Skyfuller1303 Nov 5, 2026
c43abcb
integration: close merged agent and UI blocks
Skyfuller1303 Nov 5, 2026
bb63002
integration: retain history methods in fake agent
Skyfuller1303 Nov 5, 2026
fd0b6eb
integration: merge desktop API imports
Skyfuller1303 Nov 5, 2026
b933fc4
integration: preserve trash refusal details in UI fakes
Skyfuller1303 Nov 5, 2026
a4364e2
integration: deduplicate trash refusal test fields
Skyfuller1303 Nov 5, 2026
3336e4d
integration: fix duplicate refusal field separator
Skyfuller1303 Nov 5, 2026
31521fb
integration: combine server state builders
Skyfuller1303 Nov 5, 2026
c21c4b2
integration: deduplicate identical history and trash tests
Skyfuller1303 Nov 5, 2026
646822b
integration: repair trash merge tests and schema checks
Skyfuller1303 Nov 5, 2026
db462f3
Merge gc-dry-run (#31)
Skyfuller1303 Nov 5, 2026
ec3a29c
integration: format merged sources
Skyfuller1303 Nov 5, 2026
a14c5d5
integration: keep trash errors compact
Skyfuller1303 Nov 5, 2026
0783ada
integration: roll back migrations in schema tests
Skyfuller1303 Nov 5, 2026
25c859d
meta: add account storage estimates
Skyfuller1303 Nov 5, 2026
7b46036
proto, server: expose account usage route
Skyfuller1303 Nov 5, 2026
17968bc
docs: document account usage estimates
Skyfuller1303 Nov 5, 2026
403dbaf
integration: run the damaged-deletion-time test once in its own Postg…
Skyfuller1303 Nov 5, 2026
205bafd
meta: leave saved versions out of the history estimate
Skyfuller1303 Nov 5, 2026
6913574
server, docs: describe the quota override without naming a pull request
Skyfuller1303 Nov 5, 2026
d8ad5aa
api: expose account usage through shared client
Skyfuller1303 Nov 5, 2026
c17709e
agent: proxy account usage from local API
Skyfuller1303 Nov 5, 2026
9078541
desktop: show account storage usage
Skyfuller1303 Nov 5, 2026
db99801
docs: document local usage route
Skyfuller1303 Nov 5, 2026
c0c4dda
Merge account-usage (#32)
Skyfuller1303 Nov 5, 2026
6487b1b
meta: share the effective quota rule between the upload check and its…
Skyfuller1303 Nov 5, 2026
d911d9c
meta, server: expose admin storage usage
Skyfuller1303 Nov 5, 2026
39b4a66
desktop: add admin storage views
Skyfuller1303 Nov 5, 2026
93188ad
web: add admin storage views
Skyfuller1303 Nov 5, 2026
2aa0833
docs: describe admin storage views
Skyfuller1303 Nov 5, 2026
e76ccdb
Merge usage-ui (#33) into admin-storage
Skyfuller1303 Nov 6, 2026
9003994
packaging: build the image with Rust 1.95
Skyfuller1303 Nov 6, 2026
cb7157d
Merge docker (#13): build the image with Rust 1.95
Skyfuller1303 Nov 6, 2026
c7b3874
agent: send client kind, platform and version on sign-in and join
Skyfuller1303 Nov 6, 2026
2b63673
Merge device-sessions: the agent sends its device details
Skyfuller1303 Nov 6, 2026
b2da75a
Merge admin-api: the agent sends its device details
Skyfuller1303 Nov 6, 2026
0d0cb78
Merge audit-log: the agent sends its device details
Skyfuller1303 Nov 6, 2026
0cf61b4
Merge two-factor: the agent sends its device details
Skyfuller1303 Nov 6, 2026
be8410a
Merge admin-ui-web: the agent sends its device details
Skyfuller1303 Nov 6, 2026
d6e3001
Merge audit-web-kind: the agent sends its device details
Skyfuller1303 Nov 6, 2026
1fe8c6c
meta, server: a folder comes back and goes with everything of it in t…
Skyfuller1303 Nov 6, 2026
1dfad98
sync: tests keep a folder alone by taking what is below it out of the…
Skyfuller1303 Nov 6, 2026
ff02c5d
Merge trash: a folder comes back with what was deleted with it
Skyfuller1303 Nov 6, 2026
2ddd75d
Merge trash: a folder comes back with what was deleted with it
Skyfuller1303 Nov 6, 2026
455353a
Merge gc-reference-index: a folder comes back with what was deleted w…
Skyfuller1303 Nov 6, 2026
6b6450b
Merge gc-reference-index: a folder comes back with what was deleted w…
Skyfuller1303 Nov 6, 2026
aeb53fc
Merge account-usage: a folder comes back with what was deleted with it
Skyfuller1303 Nov 6, 2026
838a9bb
Merge usage-ui: a folder comes back with what was deleted with it
Skyfuller1303 Nov 6, 2026
abaf4dd
Merge gc-dry-run: a folder comes back with what was deleted with it
Skyfuller1303 Nov 6, 2026
51cedaf
Merge trash-ui: a folder comes back with what was deleted with it
Skyfuller1303 Nov 6, 2026
b61fcd6
meta: a folder restore or removal takes at most the cap below it, the…
Skyfuller1303 Nov 6, 2026
2ecf54b
Share one wgpu device between the desktop app's kittest tests
Skyfuller1303 Nov 6, 2026
2c45e1b
Merge trash: a folder restore or removal takes at most the cap below it
Skyfuller1303 Nov 6, 2026
6dbb9f2
Merge gc-reference-index: a folder restore or removal takes at most t…
Skyfuller1303 Nov 6, 2026
159ed56
Merge account-usage: a folder restore or removal takes at most the ca…
Skyfuller1303 Nov 6, 2026
5dfd615
Merge gc-reference-index: a folder restore or removal takes at most t…
Skyfuller1303 Nov 6, 2026
788d1b7
Merge usage-ui: a folder restore or removal takes at most the cap bel…
Skyfuller1303 Nov 6, 2026
59d5f7b
Merge gc-dry-run: a folder restore or removal takes at most the cap b…
Skyfuller1303 Nov 6, 2026
23bcc31
Merge trash: a folder restore or removal takes at most the cap below it
Skyfuller1303 Nov 6, 2026
27f70fc
Merge trash-ui: a folder restore or removal takes at most the cap bel…
Skyfuller1303 Nov 6, 2026
19ca781
Merge trash: a folder restore or removal takes at most the cap below it
Skyfuller1303 Nov 6, 2026
98020a2
meta tests: name the trash tests' sorting helper sorted_nodes
Skyfuller1303 Nov 6, 2026
8a23d1f
Merge gc-reference-index: a folder restore or removal takes at most t…
Skyfuller1303 Nov 6, 2026
bef5416
Merge account-usage: a folder restore or removal takes at most the ca…
Skyfuller1303 Nov 6, 2026
b5fc3c7
Merge gc-reference-index: a folder restore or removal takes at most t…
Skyfuller1303 Nov 6, 2026
9431468
Merge usage-ui: a folder restore or removal takes at most the cap bel…
Skyfuller1303 Nov 6, 2026
692ec79
Merge trash: a folder restore or removal takes at most the cap below it
Skyfuller1303 Nov 6, 2026
ab39831
Merge gc-dry-run: a folder restore or removal takes at most the cap b…
Skyfuller1303 Nov 6, 2026
6d8192b
Merge trash-ui: a folder restore or removal takes at most the cap bel…
Skyfuller1303 Nov 6, 2026
353bb65
Let every desktop test module use the shared wgpu device
Skyfuller1303 Nov 7, 2026
9384e74
Merge desktop-test-wgpu (#35): share one wgpu device between the desk…
Skyfuller1303 Nov 7, 2026
db60091
desktop: render the Security page tests on the shared wgpu device
Skyfuller1303 Nov 7, 2026
1da36e0
desktop: ask again for usage and admin access when leaving trash or v…
Skyfuller1303 Nov 7, 2026
8c00b0d
desktop: fill the new storage overview fields with defaults in the te…
Skyfuller1303 Nov 7, 2026
be9e08c
server: storage capacity setting and room numbers in GET /admin/storage
Skyfuller1303 Nov 7, 2026
7600d4a
server: read SQLite URLs as sqlx does, accept capacity as plain bytes…
Skyfuller1303 Nov 7, 2026
72df5bd
server: refuse new uploads when the server is full, opt-in
Skyfuller1303 Nov 8, 2026
db45387
server: keep the full state to real numbers, accept what the account …
Skyfuller1303 Nov 8, 2026
11154e7
agent: say why a run is paused as a code, not only in words
Skyfuller1303 Nov 8, 2026
8d17b25
server: report the server's health in GET /admin/server
Skyfuller1303 Nov 8, 2026
60a6407
desktop: fill the new server health fields with defaults in the test …
Skyfuller1303 Nov 8, 2026
c786867
server: a disk store whose directory is gone is not ok in the health …
Skyfuller1303 Nov 8, 2026
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
20 changes: 20 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# The build context of packaging/docker/Dockerfile is the repository root, because Cargo needs the manifests of
# every workspace member. Nothing here may reach the image: no history, no local data, no secrets.
.git
.github
target
**/target
/dist
/temp
/data
docs
packaging
**/*.md
.env
.env.*
**/.env
**/.env.*
*.sqlite
*.sqlite-wal
*.sqlite-shm
*~
23 changes: 23 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -127,3 +127,26 @@ jobs:

- name: Test storage, metadata and the server on every backend
run: cargo test -p craft-cloud-store -p craft-cloud-meta -p craft-cloud-server --locked

# The other jobs build with the newest stable Rust, so code or a dependency that needs a newer compiler than the
# `rust-version` in Cargo.toml would go unnoticed. Keep the toolchain here equal to that `rust-version`.
msrv:
name: minimum Rust version
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v7

- name: Install Linux system dependencies (egui/winit)
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends \
libxkbcommon-dev libwayland-dev libx11-dev libxrandr-dev libxi-dev libgl1-mesa-dev

- uses: dtolnay/rust-toolchain@1.95

- uses: Swatinem/rust-cache@v2
with:
save-if: ${{ github.ref == 'refs/heads/main' }}

- name: Check
run: cargo check --workspace --all-targets --locked
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,6 @@ target/
*.sqlite-shm
# a snapshot test's own render when it doesn't match
*.new.png
# the Docker deployment's settings and secrets (written by packaging/docker/install.sh), and a custom TLS certificate
/packaging/docker/.env
/packaging/docker/tls/
10 changes: 5 additions & 5 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,22 +26,22 @@ The design lives in `docs/design/sync.md`; the live protocols (the server's live

```text
crates/
api craft-cloud-api what apps need of the protocol, with no postcard: IDs, names, limits, the agent's local API (`local.rs`, `/v1/blobs` too), error codes and the account's devices (`api.rs`)
api craft-cloud-api what apps need of the protocol, with no postcard: IDs, names, limits, the agent's local API (`local.rs`, `/v1/blobs` too), error codes, the account's devices and the admin API's bodies (`api.rs`)
proto craft-cloud-proto wire types: hashes, manifests, commit ops, API bodies, join codes and join strings (`join.rs`), the live protocol (`live.rs`); re-exports `craft-cloud-api` under the same paths
chunker craft-cloud-chunker FastCDC `fastcdc-v1` + BLAKE3, frozen by golden vectors
store craft-cloud-store blob store: disk, S3, memory; checks every blob in and out
meta craft-cloud-meta metadata on SQLite or Postgres; the batch commit; the change feed; invites and pairings (`join.rs`); live documents' logs and snapshots (`live.rs`)
sync craft-cloud-sync the sync engine over `Fs`/`Transport` traits; `MemFs`; scenario tests and the simulation
kit craft-cloud-kit the app kit (`docs/kit.md`): an app's model live through the agent; the `LiveDocument` trait and `Session` (`session.rs`: open, the `local_change` hook, `poll`, undo through Loro's undo manager, reconnect and the 64 MiB queue, presence, saves), the change writer that cuts commits under 512 KiB (`writer.rs`), the mappings (`tree.rs`, `text.rs`, `table.rs`, `timeline.rs`, `opaque.rs`, `list.rs`), values, chunk references and blob stores (`value.rs`)
egui craft-cloud-egui Craft Cloud's piece of an app's window: the account line, the shared recents, a live document's badge, and `CloudWatch` that keeps them current
app craft-cloud-app what apps link: a blocking client of the agent's local API (status, sign-in, joining, computers, pause, autostart, recents, live documents at the level of bytes: `live.rs`)
app craft-cloud-app what apps link: a blocking client of the agent's local API (status, sign-in, joining, computers, pause, autostart, recents, live documents at the level of bytes: `live.rs`, the admin calls: `admin.rs`)
apps/
craft-cloud-server HTTP API (`/api/v1`), the live service (`/api/v1/live`, `live.rs`: logs, documents by import, snapshots and compaction, presence), join codes (`join.rs`: pairings, join, the `/join/{code}` page), auth, admin CLI (`init`, `serve`, `user` with `invite`, `device`, `reset-epoch`, `live`)
craft-cloud-agent the sync agent: real disk `Fs`, HTTP `Transport` over a `Connection`, saved account and state, root marker, CLI (`login`, `join`, `run`, `sync`, `status`, `logout`, `recents`, `doc` (`doc.rs`), `add-computer`, `devices`, `pause`, `resume`, `quit`, `autostart`), the `run` loop, the local API (`local_api.rs`), the live hub (`live/`: a document's Loro copy, recents document, replica (recents and documents of files), store (with the documents' journals), link, hub, the local API's docs socket), start at login (`autostart/`: Windows, macOS, Linux), the background build (`src/bin/bg.rs`, logging to `runlog.rs`)
craft-cloud-server HTTP API (`/api/v1`), the live service (`/api/v1/live`, `live.rs`: logs, documents by import, snapshots and compaction, presence), join codes (`join.rs`: pairings, join, the `/join/{code}` page), auth, admin pages (`web/`: server-rendered HTML with browser sessions, off unless `[web_admin]` is on), admin CLI (`init`, `serve`, `user` with `invite`, `device`, `reset-epoch`, `live`, `web-sessions`)
craft-cloud-agent the sync agent: real disk `Fs`, HTTP `Transport` over a `Connection`, saved account and state, root marker, CLI (`login`, `join`, `run`, `sync`, `status`, `logout`, `recents`, `doc` (`doc.rs`), `add-computer`, `devices`, `pause`, `resume`, `quit`, `autostart`), the `run` loop, local API (`local_api.rs`, including server admin calls in `admin.rs`), live hub (`live/`: a document's Loro copy, recents document, replica (recents and documents of files), store (with the documents' journals), link, hub, the local API's docs socket), start at login (`autostart/`: Windows, macOS, Linux), background build (`src/bin/bg.rs`, logging to `runlog.rs`)
tests/network/ the simulation over a simulated network (turmoil): `main.rs` histories and scenarios, `harness.rs` server and agent hosts, `live.rs` live documents over WebSockets on it
tests/recents_sim.rs the recents convergence simulation: replicas against the server's live sessions
tests/documents_sim.rs the documents convergence simulation (shares `tests/docs_common/` with `documents.rs` and `live_speed.rs`)
craft-cloud-desktop the Craft Cloud app (`craft-cloud`, eframe/egui): the pure model (`model.rs`), the agent behind a trait and calls on threads (`agent.rs`), starting the agent (`start_agent.rs`), one app per user (`single_instance.rs`), the window (`ui/`, `app.rs`), the tray (`tray/`: tray-icon in the window's process on Windows and macOS; on Linux a StatusNotifierItem over zbus in a process of its own, `craft-cloud --tray`, `tray/process.rs`, since Wayland can't hide a window), the app's own start at login (`autostart.rs`), its icons (`assets/`, drawn by `cargo xtask icons`)
craft-cloud-desktop the Craft Cloud app (`craft-cloud`, eframe/egui): the pure model (`model.rs`, the admin pages' part of it in `admin.rs`), the agent behind a trait and calls on threads (`agent.rs`), starting the agent (`start_agent.rs`), one app per user (`single_instance.rs`), the window (`ui/`, `app.rs`), the tray (`tray/`: tray-icon in the window's process on Windows and macOS; on Linux a StatusNotifierItem over zbus in a process of its own, `craft-cloud --tray`, `tray/process.rs`, since Wayland can't hide a window), the app's own start at login (`autostart.rs`), its icons (`assets/`, drawn by `cargo xtask icons`)
tests/snapshots/ every screen as kittest draws it (`UPDATE_SNAPSHOTS=1` redraws them)
craft-cloud-setup the Windows setup (`craft-cloud-setup.exe`): install, upgrade, move from a hand-made install, `--uninstall`; the exes built in by `cargo xtask package`
craft-cloud-kit-demo the app kit's demo (never packaged or installed): a story and a layer tree, live through the kit; its model and adapter (`model.rs`), its window (`ui.rs`); tests drive two windows on one fake hub, and time the kit on a big document
Expand Down
1 change: 1 addition & 0 deletions ATTRIBUTION.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,4 @@ next to them.
| `apps/craft-cloud-desktop/assets/tray-*.png` | Craft Cloud's tray icon in each state (synced, syncing, offline, needs attention, paused): a cloud with a badge | Craft Cloud contributors | Drawn by `cargo xtask icons` (`xtask/src/icons.rs`) for this repository | MIT OR Apache-2.0 |
| `apps/craft-cloud-desktop/tests/autostart/*` | Expected start-at-login entries of the app per OS (golden files) | Craft Cloud contributors | Written for this repository | MIT OR Apache-2.0 |
| `apps/craft-cloud-desktop/tests/snapshots/*.png` | The Craft Cloud app's screens as its snapshot tests expect them (the text in egui's default fonts, see `epaint_default_fonts`) | Craft Cloud contributors | Rendered by the tests (`UPDATE_SNAPSHOTS=1`) | MIT OR Apache-2.0 |
| `apps/craft-cloud-server/src/web/style.css` | The admin pages' stylesheet: system fonts, no images, no external files | Craft Cloud contributors | Written for this repository | MIT OR Apache-2.0 |
129 changes: 129 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 12 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ members = ["crates/*", "apps/*", "xtask"]
version = "0.1.0"
edition = "2024"
license = "MIT OR Apache-2.0"
rust-version = "1.94"
rust-version = "1.95"
repository = "https://github.com/itrycodinganditsbad/craft-cloud"

[workspace.lints.rust]
Expand All @@ -28,6 +28,13 @@ craft-cloud-agent = { path = "apps/craft-cloud-agent" }
craft-cloud-app = { path = "crates/app" }
craft-cloud-kit = { path = "crates/kit" }
craft-cloud-egui = { path = "crates/egui" }
# Two-factor sign-in: AES-256-GCM for the stored TOTP secrets (RustCrypto, pure Rust), and HMAC-SHA-1 for the codes
# themselves (authenticator apps speak SHA-1). `subtle` compares codes in constant time, `zeroize` wipes secrets.
aes-gcm = "0.10.3"
hmac = "0.13"
sha1 = "0.11"
subtle = "2.6"
zeroize = "1.9"
argon2 = "0.6"
async-trait = "0.1.89"
# `ws`: the server's live service and the agent's local API are WebSockets (tokio-tungstenite, MIT).
Expand All @@ -47,6 +54,10 @@ reqwest = { version = "0.13", default-features = false, features = ["json", "rus
file-id = "0.2.3"
notify = { version = "8.2", default-features = false, features = ["macos_fsevent"] }
jiff = { version = "0.2.38", default-features = false, features = ["std", "tz-system", "tzdb-zoneinfo", "tzdb-bundle-platform"] }
# Total and free bytes of a filesystem (the admin's storage overview); rustix on Unix, windows-sys on Windows.
fs4 = { version = "1.1", default-features = false, features = ["sync"] }
# Decoding a SQLite URL's path as sqlx does (the admin's storage overview finds the database file with it).
percent-encoding = "2.3"
rustix = { version = "1.1.5", default-features = false, features = ["std", "fs"] }
toml = "1.1"
tracing = "0.1.44"
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ that is signed in, and enter its code on the new one.
## Documentation

- [Installing the Craft Cloud app](docs/install.md) on Windows, macOS and Linux
- [Running the server](docs/server.md): reverse proxy, Postgres and S3, accounts, invites, backups
- [Running the server](docs/server.md): reverse proxy, Postgres and S3, accounts, invites, backups, Docker
- [The agent on the command line](docs/agent.md): `login`, `run`, `sync`, `join`, start at login
- [Development](docs/development.md): how it fits together, building, testing, the sync engine's rules
- [The app kit](docs/kit.md): how a Craft app makes its documents live
Expand Down
Loading