Liking cljdoc? Tell your friends :D

Any aspect of the Convex stack

Workflow

This monorepo hosts a variety of applications and libraries written in Clojure providing access to all aspects of the Convex network.

Convex can be understood as public database replicated worldwide between peer nodes. The network is effectively permissionless and anyone is free to participate. Data is defined in accounts akin to namespaces. Anyone can read data from those accounts but only owners and programmatically authorized users can transact new data using cryptographic keys. A consensus algorithm between peers guarantees that the network is tamperproof.

Using such a network, it is possible to write decentralized applications (dApps) that do not need a centralized database or server, are censorship-resistant, and highly-available. Such characterics provide a robust framework for managing any kind of state, even digital assets.

Instead of relying on a query language like SQL or datalog, querying or transacting data on the network is done via Convex Lisp. Almost a subset of Clojure, it is a fully Turing-complete language centered on immutable values. It is effectively the very first decentralized Lisp in the history of computing. A guide is accessible at this link.

Newcomers should follow progressive examples in :module/recipe in order to better understand how such a network works and how to build dApps in Clojure. Since Convex is written in Java, one can use the exact same tools for writing applications as those being used for running the network.

Most useful modules from this repositories are:

ProjectLibraryCljdocDownload
:module/cvmClojarscljdoc/
:module/genClojarscljdoc/
:module/netClojarscljdoc/
:module/shell//CVX Shell

Community

This repository is discussed on the Clojurians Slack community at #convex.

Our Discord channel is the best for discussing the overall project, beyond the Clojure tooling.

More more information about the Convex network on the official website.

Understanding this monorepo

Each module is found under ./module and follows a predictable structure:

  • Dedicated README, changelog, source, etc
  • All source is located under the ./src subdirectories
  • Source is subdivided by purpose (eg. main, test) and then by language (eg. clj, cvx)
  • All scripts and tasks are located and executed from the root of this repository

The following conventions are enforced in READMEs and source files:

  • Namespaces shorten convex into $: convex.cvm -> $.cvm
  • Symbols referring to collections are pluralized with + at the end: items -> item+

The ./deps.edn file is organized around aliases where each alias has one particular purpose: an external library, a module from this repository, etc

Babashka is used for running tasks found in ./bb.edn, listed as such:

bb tasks

The aliases:... tasks are especially important. They simply print all required ./deps.edn aliases for given a module and a given purpose. For instance, when working on :module/cvm:

bb aliases:dev :module/cvm

Which can then easily be combined with Clojure CLI given a little shell substitution with $():

clj -M$( bb aliases:dev :module/cvm )

Of course, any other aliases required for your own setup can be appended.

Testing a module, for instance the suite of generative tests for the CVM:

clj -M$( bb aliases:test :module/break )

License

Copyright © 2021 Protosens SRL and the Convex Foundation

Licensed under the Apache License, Version 2.0

Can you improve this documentation? These fine people already did:
Adam Helinski & Adam Helins
Edit on GitHub

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close