a free (libre) open source, mobile OS for Ethereum https://status.im
Go to file
Icaro Motta c1dcd7a764
Introduce malli library (#17867)
This commit is the foundational step to start using malli
(https://github.com/metosin/malli) in this project.

Take in consideration we will only be able to realize malli's full power in
future iterations.

For those without context: the mobile team watched a presentation about malli
and went through a light RFC to put everyone on the same page, among other
discussions here and there in PRs.

To keep things relatively short:

1. Unit, integration and component tests will short-circuit (fail) when
   inputs/outputs don't conform to their respective function schemas (CI should
   fail too).
2. Failed schema checks will not block the app from initializing, nor throw an
   exception that would trigger the LogBox. Exceptions are only thrown in the
   scope of automated tests.
3. There's zero performance impact in production code because we only
   instrument. Instrumentation is removed from the compiled code due to the
   usage of "^boolean js.goog/DEBUG".
4. We shouldn't expect any meaningful slowdown during development.

**What are we instrumenting in this PR?**

Per our team's agreement, we're only instrumenting the bare minimum to showcase 2 examples.

- Instrument a utility function utils.money/format-amount using the macro
  approach.
- Instrument a quo component quo.components.counter.step.view/view using the
  functional approach.

Both approaches are useful, the functional approach is powerful and allow us to
instrument anonymous functions, like the ones we pass to subscriptions or event
handlers, or the higher-order function quo.theme/with-theme. The macro approach
is perfect for functions already defined with defn.

**I evaluated the schema or function in the REPL but nothing changes**

- If you evaluate the source function, you need to evaluate schema/=> or
  schema/instrument as well.
- Remember to *var quote* when using schema/instrument.
- You must call "(status-im2.setup.schema/setup!)" after any var is
  re-instrumented. It's advisable to add a keybinding in your editor to send
  this expression automatically to the CLJS REPL, or add the call at the end of
  the namespace you are working on (similar to how some devs add "(run-tests)"
  at the end of test namespaces).

**Where should schemas be defined?**

For the moment, we should focus on instrumenting quo components, so define each
function schema in the same namespace as the component's public "view" var.

To be specific:

- A schema used only to instrument a single function and not used elsewhere,
  like a quo component schema, wouldn't benefit from being defined in a separate
  namespace because that would force the developer to constantly open two files
  instead of one to check function signatures.
- A common schema reused across the repo, like ":schema.common/theme" should be
  registered in the global registry "schema.registry" so that consumers can just
  refer to it by keyword, as if it was a built-in malli schema.
- A common schema describing status-go entities like message, notification,
  community, etc can be stored either in the respective
  "src/status_im2/contexts/*" or registered globally, or even somewhere else.
  This is yet to be defined, but since I chose not to include schemas for them,
  we can postpone this guideline.
2023-11-18 11:04:48 -03:00
.clj-kondo Introduce malli library (#17867) 2023-11-18 11:04:48 -03:00
.dependabot [Fixes: #11518] Fix dependabot directory 2020-12-07 12:14:16 +01:00
.github Adjust PR template to add before/after (#17402) 2023-09-25 13:42:37 +03:00
.lsp chore: add lsp clean-ns in lint-fix (#17661) 2023-10-18 00:17:43 +08:00
.vscode Document how to auto-format Clojure files in VSCode with zprint (#17719) 2023-10-25 23:19:56 -03:00
android Fix recent album not showing count (#17498) 2023-10-24 17:23:16 +03:00
ci Reduce Clojure linter warning noise (#17491) 2023-10-04 16:06:54 -03:00
doc Add contribution status-go doc 2023-11-09 15:34:20 +00:00
fastlane ios: drop fastlane-plugin-clean_testflight_testers 2023-05-24 11:52:01 +02:00
ios Getting rid of status-im.multiaccounts.core + removing three word random names (#17384) 2023-11-06 14:38:14 +01:00
modules/react-native-status Getting rid of status-im.multiaccounts.core + removing three word random names (#17384) 2023-11-06 14:38:14 +01:00
nix Introduce malli library (#17867) 2023-11-18 11:04:48 -03:00
resources [#17423] fix: update sync flow (#17731) 2023-10-27 11:16:56 +03:00
scripts chore: lint require i18n-resources first in status-im2.core (#17905) 2023-11-16 11:10:40 +08:00
src Introduce malli library (#17867) 2023-11-18 11:04:48 -03:00
test Introduce malli library (#17867) 2023-11-18 11:04:48 -03:00
test-resources Update prettier config for the project. (#16303) 2023-06-19 19:09:12 +05:30
translations Wallet: Keypair Screen (#17775) 2023-11-13 14:43:43 +04:00
.buckconfig
.carve_ignore remove quo lib (#17626) 2023-10-16 18:34:00 +02:00
.dockerignore Create Nix package for building status-go 2019-04-09 12:44:39 +02:00
.env Remove options to create community from mobile from release and nightly builds (#17495) 2023-10-04 15:12:16 +05:30
.env.e2e Add method for fast creation of communities (#16806) 2023-08-03 08:59:28 +08:00
.env.jenkins Add method for fast creation of communities (#16806) 2023-08-03 08:59:28 +08:00
.env.nightly Add method for fast creation of communities (#16806) 2023-08-03 08:59:28 +08:00
.env.release Remove options to create community from mobile from release and nightly builds (#17495) 2023-10-04 15:12:16 +05:30
.envrc Add login integration test 2022-06-08 13:43:32 +01:00
.eslintrc.js Update prettier config for the project. (#16303) 2023-06-19 19:09:12 +05:30
.flowconfig RN 63 and xcode12 2021-01-14 09:41:38 +01:00
.gitattributes Desktop branch merged into develop (#5266) 2018-07-23 18:21:31 +03:00
.gitignore chore: ignore auto generated lint-fix files (#17783) 2023-11-10 18:12:03 +05:30
.mailmap fix my name 2019-02-28 14:50:42 +01:00
.nycrc add coverage test 2019-07-10 16:15:44 -04:00
.prettierignore feat: lint direct require quo component outside src/quo (#17828) 2023-11-07 10:21:58 +08:00
.prettierrc.js Update prettier config for the project. (#16303) 2023-06-19 19:09:12 +05:30
.watchmanconfig Ensure shell.nix uses same nixpkgs as the rest of the environment 2019-06-20 09:18:24 -04:00
.zprintrc Introduce malli library (#17867) 2023-11-18 11:04:48 -03:00
LICENSE.md
Makefile chore: lint require i18n-resources first in status-im2.core (#17905) 2023-11-16 11:10:40 +08:00
README.md Fixed Some Grammatical Errors in README.md (#17716) 2023-10-27 13:17:16 +05:30
RELEASES.md rename quo2 (#17660) 2023-10-17 17:27:18 +02:00
VERSION Bump release to 1.25.0 (#17247) 2023-09-11 14:42:15 +01:00
app.json Lint and fix missing trailing newlines (#16445) 2023-07-04 19:40:13 +00:00
babel.config.js Dont parse unused identicon 2023-09-06 14:09:37 +01:00
binding.gyp Add status-go tests 2022-05-25 17:59:02 +01:00
default.nix nix: minor cleanup and documentation updates 2020-06-05 14:49:34 +02:00
index.js Update prettier config for the project. (#16303) 2023-06-19 19:09:12 +05:30
metro.config.js Update prettier config for the project. (#16303) 2023-06-19 19:09:12 +05:30
package.json stop package bot from complaining (#17810) 2023-11-04 11:58:19 +05:30
react-native.config.js Update prettier config for the project. (#16303) 2023-06-19 19:09:12 +05:30
shadow-cljs.edn Introduce malli library (#17867) 2023-11-18 11:04:48 -03:00
shell.nix nix: minor cleanup and documentation updates 2020-06-05 14:49:34 +02:00
status-go-version.json Updated to status-go with fixed timeouts (#17831) 2023-11-08 15:08:52 +00:00
supervisord.conf Add docker-compose for development build 2018-04-11 14:58:38 +01:00
yarn.lock stop package bot from complaining (#17810) 2023-11-04 11:58:19 +05:30

README.md

Status - a Mobile Ethereum Operating System

Get it on Google Play Get it on F-Droid

Get it on Github

Join us in creating a browser, messenger, and gateway to a decentralized world. Status is a free (libre) open source mobile client targeting Android & iOS built entirely on Ethereum technologies. That's right, no middlemen and go-ethereum running directly on your device.

Getting started with Status

Why?

We believe in a medium of pure free trade, economies with fair, permission-less access and a world without intermediaries. We want to create policies that can exist between friends or scale globally, we want to communicate securely and be uninhibited by legacy systems.

We want to take responsibility for our data, and the way we conduct ourselves privately and promote this way of life to a mass audience.

We want deep insights into our own economies so we can make informed, data-driven decisions on how to make our lives better. The Ethereum blockchain, Smart Contracts, Swarm and Whisper provide us with a path forward.

If this interests you, help us make Status a reality - anyone can contribute and we need everyone at any skill level to participate.

How to Contribute?

Go straight to the docs and choose what interests you:

  • Developer Developers are the heart of software and to keep Status beating we need all the help we can get! If you're looking to code in ClojureScript or Golang then Status is the project for you! We use React Native and there is even some Java/Objective-C too! Want to learn more about it? Start by reading our Developer Introduction which guides you through the technology stack and start browsing beginner issues. Then you can read how to Build Status, which talks about managing project dependencies, coding guidelines and testing procedures. Check out our coding guidelines.

  • Community Management Metcalfe's law states that the value of a network is proportional to the square of the number of connected users of the system - without community Status is meaningless. We're looking to create a positive, fun environment to explore new ideas, experiment and grow the Status community. Building a community takes a lot of work but the people you'll meet and the long-lasting relationships you form will be well worth it, check out our Mission and Community Principles

  • Specification / Documentation John Dewey once said, "Education is not preparation for life; education is life itself ". Developers and Designers need guidance and it all starts from documentation and specifications. Our software is only as good as its documentation, check out our docs and see how you can improve what we have.

  • Blog Writing Content is King, keeping our blog up to date and informing the community of news helps keep everyone on the same page.

  • Testers It's bug-hunting season! Status is currently under active development and there is sure to be a bunch of learning, build status from scratch or if an android user checks out our nightly builds. You can shake your phone to submit bug reports, or start browsing our Github Issues. Every bug you find brings Status closer to stable, usable software for everyone to enjoy!

  • Security Status is a visual interface to make permanent changes on the Blockchain, it handles crypto-tokens that have real value and allows 3rd party code execution. Security is paramount to its success. You are given permission to break Status as hard as you can, as long as you share your findings with the community!

  • Evangelism Help us spread the word! Tell a friend right now, in fact, tell everyone - yell from a mountain if you have to, every person counts! If you've got a great story to tell or have some interesting way you've spread the word about Status let us know about it in our chat

Give me Binaries!

You can get our Beta builds for both Android and iOS on our website, through our nightly builds, or by building it yourself.

Core Contributors

Core Team Members

Special thanks to @adrian-tiberius. Without the dedication of these outstanding individuals, Status would not exist.

Contact us

Feel free to email us at support@status.im.

License

Licensed under the Mozilla Public License v2.0