Amatino is an accounting engine. It stores, organises, and retrieves financial information via an HTTP API. Amatino JS is a library for interacting with the Amatino API from within a Node.js application. By using Amatino JS, a Node.js developer can utilise Amatino services without needing to deal with raw HTTP requests.
Amatino gives you a full set of tools to store, organise and retrieve financial information. You don't need to set up databases or write any of your own double-entry accounting logic. All you need is this library, an Amatino account (Try free for two weeks!), and you are off and running.
Right now, the Amatino API offers a full range of accounting services via HTTP requests. However, this Amatino JS library is under construction. Its capabilities are limited to a subset of Amatino services.
To facilitate the use of those services not yet supported, Amatino JS includes the
AmatinoAlpha is a thin wrapper around asynchronous HTTP requests to the Amatino API. It facilitates testing and experimentation with the Amatino API without having to resort to raw HTTP request manipulation and HMAC computation.
Amatino JS will eventually offer expressive, object-oriented interfaces for all Amatino API services. To be notified when Amatino JS enters a Beta state, with all capabilities available, sign up to the Amatino Development Newsletter or follow @AmatinoAPI on Twitter.
In the mean time, you may wish to review Amatino's HTTP documentation to see what capabilities you can expect from Amatino JS in the future.
Amatino JS may be installed via NPM.
$ npm install amatino
To use Amatino JS, you will need an active Amatino subscription. You can start a free trial at https://amatino.io/subscribe.
Amatino JS requires Node version 10.4 or greater.
All interactions with Amatino start with a Session. Creating a Session is analogous to 'logging in' to the service. We create a Session like so:
const _ = Session;
We can then use that Session to utilise Amatino services. For example, we can create an Entity. Entities are objects, beings, and constructs that we wish to describe with financial information. For example, companies, people, or projects.
const _ = Entity;
Within Entities, we structure financial information into Accounts. For example, a bank account, revenue from sales of goods and services, a credit card, or shareholder equity.
const _ = Account
We can then store Transactions: Exchanges of value between Accounts.
Objects such as Balances, Recursive Ledgers, Positions, and Trees then provide you with powerful tools to manipulate and retrieve financial data. Those and other objects are not yet available in Amatino JS (We're racing to add them as soon as possible).
In the mean time, the
AmatinoAlpha object allows you to experiment with as-yet unsupported services without dealing with raw HTTP requests or HMACs. It lacks the expressive syntax, input validation, and error handling that characterise supported objects such as Transaction.
AmatinoAlpha instance like so:
const Amatino = ;let _ = AmatinoAmatinoAlpha;
Requests may then be made like so:
let _ = amatinoAlpha;
Wherein the parameters passed to
request() are the HTTP path, method, url parameters ('query string'), and body laid out in the Amatino API HTTP documentation.
For example, the above request created an Entity. The requirements for Entity creation are available at https://amatino.io/documentation/entities#action-Create.
For more examples of
AmatinoAlpha usage, see the getting started guide.
Amatino JS features a unit test suite. You can execute the test suite like so:
$ npm test
The test suite requires the presence of two environment variables:
AMATINO_TEST_SECRET. These variables must be populated with the email address and passphrase of an Amatino user account with a valid subscription. For example:
$ export AMATINO_TEST_EMAILfirstname.lastname@example.org$ export AMATINO_TEST_SECRET="some high entropy passphrase"
Amatino JS obeys the Semantic Version convention. Until v1.0.0, the JavaSript API should be considered unstable and liable to change at any time.
Watch out! API currently unstable!
Tell us what your think/want/like/hate
Please join us on the Amatino discussion forums and give us your feedback. We would love to hear from you. Amatino is in its earliest stages of development, and your feedback will influence the direction it moves in.
Pull requests, comments, issues, forking, and so on are also most welcome on Github!
- Amatino home
- Development blog
- Development newsletter
- Discussion forum
- More Amatino client libraries
- Billing and account management
- About Amatino Pty Ltd