Appwrite Releases Open Source Documentation
Tags: webdev, opensource, documentation
Published: 2021-03-10 11:01:30

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](https://appwrite.io/docs) are now open-sourced, available on [GitHub](https://github.com/appwrite/docs)!

> 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](https://github.com/utopia-php/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](https://appwrite.io/specs/open-api3), but also [SDKs](https://appwrite.io/docs/sdks) and code examples in multiple programming languages.

For example, the parameter descriptions on the `listCollections` method are used directly in the [endpoint documentation](https://appwrite.io/docs/server/database#databaseListCollections):

```php
App::get('/v1/database/collections')
    ->desc('List Collections')
    ->label('sdk.method', 'listCollections')
    ->label('sdk.description', '/docs/references/database/list-collections.md')
    ->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)
```

Our [SDK Generator](https://github.com/appwrite/sdk-generator) does the heavy lifting of creating code examples for each API endpoint with [Twig](https://twig.symfony.com/) templates. The above API route metadata creates the following Node.js code:

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

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

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) {
    console.log(response);
}, function (error) {
    console.log(error);
});
```

## 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](https://github.com/appwrite/appwrite/blob/master/CONTRIBUTING.md#other-ways-to-help) on GitHub. We're always happy to welcome new members to our growing Appwrite community.

## Extra Reading

- [How We Integrated Our Docs and SDKs As First-Class Citizens of Our Coding Process](https://betterprogramming.pub/how-we-integrated-our-docs-and-sdks-as-first-class-citizens-of-our-coding-process-8e343def0e9)
- [Your Docs Are a Gateway to Your Devtool](https://levelup.gitconnected.com/9-tips-that-will-help-you-write-a-winning-developers-documentation-for-your-next-project-d3248fcf704b)