Skip to content

🚀 Feature: Reproducible Projects #3449

Closed

Description

@ZeroAurora

🔖 Feature description

Projects could be managed as simple as managing codes, just like Terraform. By achiving "reproducible", open-source project owner can feel easier to put their backend projects online.

🎤 Pitch

Current CLI is not reproducible, i.e. can not copy-and-paste from dev to production and work. It must be configured over Web UI. This is not that convenient when deploying self-hostable (especially open-source) applications.
So my idea is:

  • Provide a CLI command to "export" and "import" all of the project, with schemas and settings, and without data.
  • Provide a manual for interested developers to work with. For example, naming project/collections/buckets/... with provided names might be more "portable" than randomly generated IDs.

👀 Have you spent some time to check if this issue has been raised before?

  • I checked and didn't find similar issue

🏢 Have you read the Code of Conduct?

Activity

  1. stnguyen90 commented on Jul 2, 2022

    @stnguyen90
    Contributor

    Current CLI is not reproducible, i.e. can not copy-and-paste from dev to production and work. It must be configured over Web UI.

    Can you clarify what can't be configured? I know a project can't be created via the CLI. From your experience, what else is missing exactly?

  2. ZeroAurora commented on Jul 3, 2022

    @ZeroAurora
    Author

    Can you clarify what can't be configured? I know a project can't be created via the CLI. From your experience, what else is missing exactly?

    1. Turning on and off modules (cloud functions, users, database...) and the functions of each module (auth methods...).
    2. Specify IDs when creating projects, functions, collections, etc in CLI (AFAIK they can be configured in appwrite.json, but it needs recreating one with the same ID in WebUI)
    3. Changes in the WebUI won't be synchronized with local projects.
  3. stnguyen90 commented on Jul 13, 2022

    @stnguyen90
    Contributor
    1. Turning on and off modules (cloud functions, users, database...) and the functions of each module (auth methods...).

    You can't set this in the appwrite.json, but it should be doable via a CLI command: https://github.com/appwrite/sdk-for-cli/blob/8fe40a8c7471ab783c8bbabbda9e8d8744324d47/lib/commands/projects.js#L1001.

    1. Specify IDs when creating projects, functions, collections, etc in CLI (AFAIK they can be configured in appwrite.json, but it needs recreating one with the same ID in WebUI)

    Would PR appwrite/sdk-generator#484 cover this?

    1. Changes in the WebUI won't be synchronized with local projects.

    You don't want the appwrite.json to update after updating something in the Appwrite Console, right?

  4. stnguyen90 commented on Jul 13, 2022

    @stnguyen90
    Contributor

    This seems like it may be related to #491

  5. ZeroAurora commented on Jul 14, 2022

    @ZeroAurora
    Author

    Would PR appwrite/sdk-generator#484 cover this?

    Thanks! I may test it some day.

    You don't want the appwrite.json to update after updating something in the Appwrite Console, right?

    Well, maybe just allowing to export an appwrite.json in the UI/CLI is enough.

  6. johannesschobel commented on Nov 4, 2022

    @johannesschobel

    i think it would be benefitial to have a "single source of truth" (i.e., the appwrite.json file) that contains all relevant information to copy one project from one server to another one. That should, for example, also include the database names, and so on (currently not available)

  7. zdanl commented on Jan 30, 2023

    @zdanl

    as per mention, there are many plugins, "packaged projects" as @stnguyen90 called them, clearly with a need to be reproducible, some of which appwrite or the authors potentially can monetize on, even. are there any plans in that direction, Appwrite Premium, or that kind of appstore / plugin store?

    off the top of my head, i have the following roadmap with my project:

    • integrate web3 connect (non-custodial, ethers.js, ethereum) with appwrite sdk; notify the backend when a client-side wallet connection was established
    • custodial wallets (this could be a plugin, and since there may be more than 1 wallet per Account, it may be better off packaged with a serverless function and a database collection)
    • stronger and more specific support for oauth providers, especially github, which allows to interface with Repos in a way that DigitalOcean, Vercel, etc. display very well
    • a generic form of "projects" in a way that "teams" generalizes the "role" model of authentication systems. almost every website provides some sort of a workspace, either paid (github codespaces) or unpaid (basic organizational domains) that are named and relational to the items they contain / are described by (tags, description) in the most basic form, with user memberships in a more advanced (Github Projects, Github repos).
  8. bhagn commented on Aug 6, 2023

    @bhagn

    I'm not sure of the current progress on this issue. We have been using Appwrite for some time now and we had this issue of (re)creating dev. environments when a new developer joins, or someone wishes to setup the project from scratch. There is considerable amount of time that's spent in just setting up the project, API keys, OAuth etc; The latest CLI does help with syncing the collections and functions but doesn't go beyond that.

    We ended up creating our own CLI written on top of the Appwrite APIs to manage pretty much every resource Appwrite provides. But the most important feature being able to create a snapshot of the entire config and restoring/syncing it. This has helped us to reproduce the same env. on different machines very quickly - ~60s :)

    For those of you interested in giving it a try check out
    Pypi: https://pypi.org/project/appw/

    Github: https://github.com/TheGallliNetwork/appwrite-cli

    This snapshots are just json files that are created in the directory where you run the command. It tries not to store any of the API keys that get generated in your system, but uses placeholders and re-creates them on newer systems. The only key that gets stored in the snapshot (in plain text) are the auth keys (Oauth) - so please make sure you are aware of this and don't check-in to public repositories.

  9. added
    enhancement
    and removed on Mar 20, 2024
  10. eldadfux commented on Feb 23, 2026

    @eldadfux
    Member

    This is a pretty old issue, but commenting here for anyone who might find this from search.

    We have since introduced the appwrite.json file which allows you to replicate project structure, together with the CLI push and pull commands it is possible to replicate a full project's structure. The appwrite.json can be considered as a source of truth.

    For more info:
    https://appwrite.io/docs/tooling/command-line/installation

    We also plan to enable tighter integration between the Appwrite console and the appwrite.json, but no timeline for this just yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions