notedeck

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

README.md (2811B)


      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 If you're running debian-based machine like Ubuntu or ElementaryOS, all you need is to install [rustup] and run `sudo apt install build-essential`.
     32 
     33 First, install [nix][nix] if you don't have it.
     34 
     35 The `shell.nix` provides a reproducible build environment, mainly for android but it also includes rust tools if you don't have those installed. It will likely work without nix if you are just looking to do non-android dev and have the rust toolchain already installed. If you decide to use nix, I recommend using [direnv][direnv] to load the nix shell environment when you `cd` into the directory.
     36 
     37 If you don't have [direnv][direnv], enter the dev shell via:
     38 
     39 ```bash
     40 $ nix-shell
     41 ```
     42 
     43 Once you have your dev shell setup, you can build with this command:
     44 
     45 ```bash
     46 $ cargo run --release 
     47 ```
     48 
     49 ## Android
     50 
     51 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:
     52 
     53 ```
     54 $ rustup target add aarch64-linux-android
     55 ```
     56 
     57 To run on a real device, just type:
     58 
     59 ```bash
     60 $ cargo apk run --release
     61 ```
     62 
     63 ## Android Emulator
     64 
     65 - Install [Android Studio](https://developer.android.com/studio)
     66 - Open 'Device Manager' in Android Studio
     67 - 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)
     68 - Start up the emulator
     69 
     70 while the emulator is running, run:
     71 
     72 ```bash
     73 cargo apk run --release
     74 ```
     75 
     76 The app should appear on the emulator
     77 
     78 [direnv]: https://direnv.net/
     79 [nix]: https://nixos.org/download/
     80 
     81 ## Previews
     82 
     83 You can preview individual widgets and views by running the preview script:
     84 
     85 ```bash
     86 ./preview RelayView
     87 ./preview ProfilePreview
     88 # ... etc
     89 ```
     90 
     91 When adding new previews you need to implement the Preview trait for your
     92 view/widget and then add it to the `src/ui_preview/main.rs` bin:
     93 
     94 ```rust
     95 previews!(runner, name,
     96     RelayView,
     97     AccountLoginView,
     98     ProfilePreview,
     99 );
    100 ```
    101 
    102 
    103 ## Contributing
    104 
    105 Configure the developer environment:
    106 
    107 ```bash
    108 ./scripts/dev_setup.sh
    109 ```
    110 
    111 This will add the pre-commit hook to your local repository to suggest proper formatting before commits.
    112 
    113 [rustup]: https://rustup.rs/