/ code / README.md
README.md
 1  # Circulari.ty
 2  
 3  This is the code; a monorepo. Assuming you have read
 4  [../CIRCULARI.TY.md](../CIRCULARI.TY.md) which explains the spiral idea, here
 5  you find all the `apps`.
 6  
 7  There are also `packages`, but these are just copied over from
 8  [o19](https://github.com/mnzaki/o19) which aspires to be a foundational
 9  framework for Circulari.ty apps.
10  
11  ## Monorepo things
12  
13  ### Prereqs
14  
15  You will need installed globally:
16  
17  - [Node.js](https://nodejs.org/) (for all frontend apps)
18  - [pnpm](https://pnpm.io/) (monorepo uses pnpm workspaces)
19  - [Rust](https://rustup.rs/) (for native code on mobile)
20  - `cargo install bacon` (it's a rust code watcher/rebuilder)
21  - install a package for `webkit2gtk-4.1` if you are on linux because Tauri is
22    picky
23  - `pnpm install` for enumerable npm happiness
24  
25  ### Doing the dev
26  
27  - `pnpm tauri:dev:DearDiary`
28  
29  ### Create a new Tauri app
30  
31  ```sh
32  cd apps
33  pnpm create tauri-app -t svelte-ts AnAwesomeApp
34  ```
35  
36  Then add these scripts to `apps/AnAwesomeApp/package.json`:
37  
38  ```json
39  ...
40    "scripts": {
41      ...,
42      "tauri:dev": "tauri dev",
43      "tauri:build": "tauri build"
44    }
45  ...
46  ```
47  
48  And add any packages you need from the monorepo to
49  `apps/AnAwesomeApp/package.json`:
50  
51  ```json
52    ...,
53    "dependencies": {
54      ...,
55      "@repo/ui": "workspace:*"
56    }
57  ```
58  
59  And update `turbo.json` to add these `tasks` if missing:
60  
61  ```json
62  {
63    ...,
64    "tasks": {
65      ...,
66      "tauri:dev": {
67        "cache": false,
68        "persistent": true
69      },
70      "tauri:build": {
71        "outputs": ["src-tauri/target/**"]
72      }
73    }
74  }
75  ```