notedeck

One damus client to rule them all
git clone git://jb55.com/notedeck
Log | Files | Refs | README | LICENSE

README.md (2407B)


      1 # Damus
      2 
      3 A multiplatform nostr client. Works on android and desktop
      4 
      5 Alpha! WIP!
      6 
      7 ## Desktop
      8 
      9 The desktop client is called notedeck:
     10 
     11 ![notedeck](https://cdn.jb55.com/s/notedeck-2024-04.png)
     12 
     13 ## Android
     14 
     15 Look it actually runs on android!
     16 
     17 <img src="https://cdn.jb55.com/s/bebeeadf7001fae1.png" height="500px" />
     18 
     19 ## Usage
     20 
     21 You can customize the columns by passing them as command-line arguments. This is only for testing and will likely change.
     22 
     23 ```bash
     24 $ ./target/release/notedeck "$(cat queries/timeline.json)" "$(cat queries/notifications.json)"
     25 ```
     26 
     27 # Developer Setup
     28 
     29 ## Desktop (Linux/MacOS, Windows?)
     30 
     31 First, install [nix][nix] if you don't have it.
     32 
     33 The `shell.nix` provides a reproducible build environment for android and rust. I recommend using [direnv][direnv] to load this environment when you `cd` into the directory.
     34 
     35 If you don't have [direnv][direnv], enter the dev shell via:
     36 
     37 ```bash
     38 $ nix-shell
     39 ```
     40 
     41 Once you have your dev shell setup, you can build with this command:
     42 
     43 ```bash
     44 $ cargo run --release 
     45 ```
     46 
     47 ## Android
     48 
     49 The dev shell should also have all of the android-sdk dependencies needed for development, but you still need the `aarch64-linux-android` rustup target installed:
     50 
     51 ```
     52 $ rustup target add aarch64-linux-android
     53 ```
     54 
     55 To run on a real device, just type:
     56 
     57 ```bash
     58 $ cargo apk run --release
     59 ```
     60 
     61 ## Android Emulator
     62 
     63 - Install [Android Studio](https://developer.android.com/studio)
     64 - Open 'Device Manager' in Android Studio
     65 - Add a new device with API level `34` and ABI `arm64-v8a` (even though the app uses 30, the 30 emulator can't find the vulkan adapter, but 34 works fine)
     66 - Start up the emulator
     67 
     68 while the emulator is running, run:
     69 
     70 ```bash
     71 cargo apk run --release
     72 ```
     73 
     74 The app should appear on the emulator
     75 
     76 [direnv]: https://direnv.net/
     77 [nix]: https://nixos.org/download/
     78 
     79 ## Previews
     80 
     81 You can preview individual widgets and views by running the preview script:
     82 
     83 ```bash
     84 ./preview RelayView
     85 ./preview ProfilePreview
     86 # ... etc
     87 ```
     88 
     89 When adding new previews you need to implement the Preview trait for your
     90 view/widget and then add it to the `src/ui_preview/main.rs` bin:
     91 
     92 ```rust
     93 previews!(runner, name,
     94     RelayView,
     95     AccountLoginView,
     96     ProfilePreview,
     97 );
     98 ```
     99 
    100 
    101 ## Contributing
    102 
    103 Configure the developer environment:
    104 
    105 ```bash
    106 ./scripts/dev_setup.sh
    107 ```
    108 
    109 This will add the pre-commit hook to your local repository to suggest proper formatting before commits.