Skip to content

Appwrite Setup

Use Appwrite to turn Manifest projects into production-ready applications.


Overview

Appwrite provides turnkey backend infrastructure, available open source or cloud hosted with a generous free tier. Together with Manifest you can quickly generate feature-complete applications including user authentication, databases, and storage.


In Appwrite

Establish a project with any name and region in Appwrite. Once created you'll access the project console:


Credentials

Your Manifest project will need the Appwrite project's Project ID and API Endpoint to connect. Get them from the Appwrite project's general Settings, under API credentials:


Web Platform

Appwrite only accepts browser requests from hostnames registered with the project. From the project Overview, select Add platform > Web and enter each hostname that will run your Manifest project:

  • localhost for local development
  • Each staging and production domain, such as example.com

Without this, sign-in and data requests are blocked by the browser.


Dev Key

An optional Dev Key can also be used during Manifest project development to bypass Appwrite's rate limits. It should not be included in production. Get one from Overview > Dev keys:


Manifest Setup

Scripts

Add the Appwrite SDK and manifest.js scripts to the HTML head. manifest.json is also required to register Appwrite credentials and data sources.

Appwrite plugins can be loaded in two ways: explicitly via the data-plugins attribute, or automatically from manifest.json. When auto-detected, the data plugin loads when an appwrite object is present, the auth plugin when that object includes auth (even "auth": {}), and presence when it includes presence. The supporting core data plugin will also be loaded whether or not it's declared.

<!-- Meta -->
<link rel="manifest" href="/manifest.json">

<!-- Scripts -->
<script src="https://cdn.jsdelivr.net/npm/appwrite@latest"></script>
<script src="https://cdn.jsdelivr.net/npm/mnfst@latest/lib/manifest.min.js"></script>

manifest.json

Add the Appwrite project credentials detailed above to manifest.json under an appwrite property. These are inherited by any other objects in the manifest that reference Appwrite, like database or storage sources.

The Project ID and API Endpoint are public and safe to commit — Appwrite enforces access via its own project-level permissions. The Dev Key is sensitive (it bypasses rate limits) and must not be committed. Reference it via ${PUBLIC_APPWRITE_DEV_KEY} and put the value in a gitignored .env file. Only variables prefixed PUBLIC_ reach the browser, so the name needs that prefix. The same ${VAR} syntax is also supported for the Project ID and API Endpoint if you prefer to keep them out of source.

{
    "appwrite": {
        "projectId": "your-project-id",
        "endpoint": "your-API-endpoint",
        "devKey": "${PUBLIC_APPWRITE_DEV_KEY}"
    }
}

Data sources always connect with these appwrite credentials. A database source can name its own database with appwriteDatabaseId; without it, the source uses appwrite.databaseId, then main.


Next Steps

After a successful setup above, your Manifest project should be paired with your Appwrite project(s). Proceed to configuring: