App
This is a client that displays and posts events related to short term accommodation lets over the nostr network.
Getting Started
Install Flutter
By default flutter launches in mock mode. It will not attempt to connect to relays or swap services. To connect to other environments, check the VSCode debug launcher.
flutter run
Structure
./lib
├── config # Configs like default relays and EVM-RPC URLs
├── core # Utils and mic
├── data
├── models # Data models and mock data
└── repositories # Classes for fetching certain types of data
├── logic # How data flows through app
├── presentation # How data looks
└── README.md
NIPs Utilized
- NIP-01: Basic protocol for event creation and subscription.
- NIP-05: Mapping Nostr keys to DNS-based internet identifiers.
- NIP-09: Event deletion for removing listings or messages.
- NIP-17: Encrypted direct messages for secure communication between hosts and guests.
- NIP-33: Parameterized replaceable events for creating and updating listings and bookings.
Dependency injection and mocking
- Each
Screenwidget just handles the mapping of query and path parameters onto it's correspondingViewwidget. This allows for catalogging widgets while only using their TypeSafe parameters, rather than having to pass in query strings etc.
Generating screenshots
To generate screenshots of the app run
./scripts/screenshots.sh
Screenshots will be saved in app/screenshot.
Compile ABIs
We use Boltz to swap into and out of escrow contracts on Arbitrum's EVM L2.
To facilitate this, we require the ABIs that Boltz makes available for their swaps, and the ABIs used for the escrow contract.
If we import the ABIs, we can use web3dart package and it's accompanying class builder to easily interact with any EVM compatible L2.
We only need to run this if there is a change in the ABIs, since the compiled dart is committed in the /app folder.
./scripts/compile_abis.sh
Assets
The assets directory houses images, fonts, and any other files you want to
include with your application.
The assets/images directory contains resolution-aware
images.
Localization
This project generates localized messages based on arb files found in
the lib/_localization directory.
To support additional languages, please visit the tutorial on Internationalizing Flutter apps