Code Monkey home page Code Monkey logo

meli's Introduction

meli 🐝

Meli Android app built on top of p2panda

This Android app is a collaborative database for sighting and categorisation of Meliponini bee species in the Brazilian Amazon. This project is a collaboration between p2panda and Meli. The app runs a full p2panda node and allows decentralised and offline-first collaboration among users, it is developed with Flutter and uses the p2panda SDK for its p2p functionalities.

Development

This is a Melos mono-repository managing both the Android application source-code and "external" Dart and Flutter libraries providing all p2panda functionality via FFI bindings.

Requirements

Listed versions are the ones we used successfully in our developer environments, other versions might work well too, the exact NDK version is required though.

Setup

# Install all Dart dependencies, make sure you've installed melos globally
dart pub get

# Bootstrap your Melos environment
melos bs

Code-Checks

# Check code style and correctness
melos analyze

# Format code according to guidelines
melos format

FFI packages

To bring p2panda-rs and aquadoggo into a native Android environment we're utilising flutter_rust_bridge which automatically generates Dart code with FFI bindings from Rust.

The code resides in:

Use the following commands for FFI package development:

# After changing the Rust code in `packages/p2panda/native` re-build the
# library. This automatically installs Android compilation targets and the
# cargo-ndk tool if missing.
#
# Additionally this script moves the native android libraries into the `app`
# folder, where they are needed.
melos build

# Bump the package versions for release (we're not releasing yet).
melos version

Flutter App

It is recommended to develop or run the project with Android Studio or with the flutter-cli command line tool.

Here are some examples on how to run the app using the Flutter command line tool:

# Manage emulators
flutter emulators

# Launch an emulator
flutter emulators --launch <id>

# List all device ids (emulated or physical)
flutter devices

# Run app on emulated or connected device
flutter run --device-id <id>

Relay Node

To configure your app to connect to a relay node you will need to set RELAY_ADDRESS with the correct ipv4 address and port number via an environment variable or the command line like so.

flutter run --dart-define=RELAY_ADDRESS=203.0.113.0:2022

Schema

The p2panda schemas and migrations are managed in the schemas folder with the fishy command line tool.

License

GNU Affero General Public License v3.0 AGPL-3.0-or-later

Supported by



This project has received funding from the European Union’s Horizon 2020 research and innovation programme within the framework of the NGI-POINTER Project funded under grant agreement No 871528

meli's People

Contributors

achou11 avatar adzialocha avatar sandreae avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.