DEV Community

Cover image for Appwrite Releases Open Source Documentation
kodumbeats for Appwrite

Posted on


Appwrite Releases Open Source Documentation

At Appwrite, we're focused on creating the best developer experience possible, which is why we build tools that are easy to learn. To that end, we're thrilled to announce that our docs are now open-sourced, available on GitHub!

We're building Appwrite, an open-source Backend-as-a-Service (BaaS), packaged as a set of Docker microservices, to give developers of any background all of the tools necessary to build a modern apps quickly and securely.

Docs as Code

Appwrite uses the Utopia Framework under the hood, which encourages a declarative approach to building APIs. We explicitly declare route metadata - from labels to abuse limits to parameter definitions - as a part of our codebase, allowing us to procedurally generate not only the API specification, but also SDKs and code examples in multiple programming languages.

For example, the parameter descriptions on the listCollections method are used directly in the endpoint documentation:

    ->desc('List Collections')
    ->label('sdk.method', 'listCollections')
    ->label('sdk.description', '/docs/references/database/')
    ->param('search', '', new Text(256), 'Search term to filter your list results. Max length: 256 chars.', true)
    ->param('limit', 25, new Range(0, 100), 'Results limit value. By default will return maximum 25 results. Maximum of 100 results allowed per request.', true)
    ->param('offset', 0, new Range(0, 40000), 'Results offset. The default value is 0. Use this param to manage pagination.', true)
Enter fullscreen mode Exit fullscreen mode

Our SDK Generator does the heavy lifting of creating code examples for each API endpoint with Twig templates. The above API route metadata creates the following Node.js code:

const sdk = require('node-appwrite');

// Init SDK
let client = new sdk.Client();
let database = new sdk.Database(client);

    .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
    .setProject('5df5acd0d48c2') // Your project ID
    .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key

let promise = database.listCollections();

promise.then(function (response) {
}, function (error) {
Enter fullscreen mode Exit fullscreen mode

Better Together

Appwrite is a remote-first, international team, so we appreciate the strength of diverse opinions. With open-source docs, our community can lend its wide expertise to help us improve any resource that lacks clarity, detail, or brevity (or has spelling mistakes). Development tools are only as strong as their technical documentation, and we've set out to make ours the best.

Getting Started

If you're interested in improving Appwrite, check out the contribution guide on GitHub. We're always happy to welcome new members to our growing Appwrite community.

Extra Reading

Top comments (0)