fixmind 1.0.2 → 1.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,70 +0,0 @@
1
- # Setting up sync (Pro)
2
-
3
- Fixmind sync uses a free [Supabase](https://supabase.com) project as the
4
- backend. Supabase only ever stores **encrypted blobs**: lesson content is
5
- encrypted on your machine before it leaves it, with a key derived from a
6
- passphrase you choose. Supabase never sees your passphrase or your
7
- plaintext lessons.
8
-
9
- ## 1. Create a Supabase project
10
-
11
- 1. Sign up at https://supabase.com and create a new project (free tier).
12
- 2. In **Authentication > Providers**, make sure "Email" is enabled.
13
- 3. In **Project Settings > API**, copy the **Project URL** and the
14
- **anon public key**.
15
-
16
- ## 2. Enable GitHub sign-in (recommended)
17
-
18
- `fixmind login` defaults to signing in with GitHub through Supabase's
19
- OAuth provider, so no passwords are typed into the terminal.
20
-
21
- 1. On GitHub, go to **Settings > Developer settings > OAuth Apps > New OAuth App**.
22
- - **Homepage URL**: anything, e.g. your project's repo URL.
23
- - **Authorization callback URL**: `https://<project-ref>.supabase.co/auth/v1/callback`
24
- (use your own project ref, from the URL you copied in step 1).
25
- 2. Create the app and copy its **Client ID** and **Client Secret**.
26
- 3. In Supabase, go to **Authentication > Providers > GitHub**, enable it, and
27
- paste the Client ID/Secret. Save.
28
- 4. In **Authentication > URL Configuration > Redirect URLs**, add
29
- `http://127.0.0.1:51763` (the fixed local port the CLI listens on during
30
- login). This is required — Supabase rejects redirects to URLs not on this
31
- list.
32
-
33
- If you'd rather not set this up, pass `--password-login` to
34
- `fixmind login` to use email/password instead (make sure email
35
- auth is enabled, as in step 1).
36
-
37
- ## 3. Apply the schema
38
-
39
- Open **SQL Editor > New query** in the Supabase dashboard, paste the
40
- contents of [`supabase/schema.sql`](../supabase/schema.sql), and run it.
41
- This creates the `sync_users` and `lessons_sync` tables with row-level
42
- security so each account can only read/write its own rows.
43
-
44
- ## 4. Point fixmind at your project
45
-
46
- Set these environment variables (e.g. in your shell profile):
47
-
48
- ```sh
49
- export FIXMIND_SUPABASE_URL="https://<project-ref>.supabase.co"
50
- export FIXMIND_SUPABASE_ANON_KEY="<anon-public-key>"
51
- ```
52
-
53
- ## 5. Log in and sync
54
-
55
- ```sh
56
- fixmind login
57
- fixmind sync push
58
- fixmind sync pull
59
- ```
60
-
61
- `fixmind login` opens your browser to sign in with GitHub (creating
62
- the Supabase account on first use), then asks for an encryption
63
- passphrase. The passphrase is used to derive an AES-256 key locally
64
- (scrypt) and is never sent to Supabase. Use the **same passphrase on
65
- every machine** you sync — if you forget it, your synced lessons cannot
66
- be decrypted.
67
-
68
- Run `fixmind sync push` to upload local changes and `fixmind sync pull`
69
- to fetch changes made on other machines. Conflicts are resolved by
70
- last-write-wins, comparing each lesson's `updatedAt` timestamp.