GithubHelp home page GithubHelp logo

appwrite / appwrite Goto Github PK

View Code? Open in Web Editor NEW
40.9K 374.0 3.7K 270.04 MB

Build like a team of hundreds_

Home Page: https://appwrite.io

License: BSD 3-Clause "New" or "Revised" License

Dockerfile 0.83% Shell 0.41% PHP 18.22% TypeScript 80.54%
appwrite docker backend-as-a-service javascript flutter serverless backend hacktoberfest firebase self-hosted

appwrite's Introduction

Our Appwrite Init event has concluded. You can check out all the new and upcoming features on our Init website 🚀


Appwrite Logo

Appwrite is a backend platform for developing Web, Mobile, and Flutter applications. Built with the open source community and optimized for developer experience in the coding languages you love.

We're Hiring Hacktoberfest Discord Build Status Twitter Account

English | įŽ€äŊ“中文

Announcing Appwrite Cloud Public Beta! Sign up today!

Appwrite is an end-to-end backend server for Web, Mobile, Native, or Backend apps packaged as a set of Docker microservices. Appwrite abstracts the complexity and repetitiveness required to build a modern backend API from scratch and allows you to build secure apps faster.

Using Appwrite, you can easily integrate your app with user authentication and multiple sign-in methods, a database for storing and querying users and team data, storage and file management, image manipulation, Cloud Functions, and more services.


Appwrite - 100% open source alternative for Firebase | Product Hunt

Appwrite

Find out more at: https://appwrite.io

Table of Contents:

Installation

Appwrite is designed to run in a containerized environment. Running your server is as easy as running one command from your terminal. You can either run Appwrite on your localhost using docker-compose or on any other container orchestration tool, such as Kubernetes, Docker Swarm, or Rancher.

The easiest way to start running your Appwrite server is by running our docker-compose file. Before running the installation command, make sure you have Docker installed on your machine:

Unix

docker run -it --rm \
    --volume /var/run/docker.sock:/var/run/docker.sock \
    --volume "$(pwd)"/appwrite:/usr/src/code/appwrite:rw \
    --entrypoint="install" \
    appwrite/appwrite:1.5.4

Windows

CMD

docker run -it --rm ^
    --volume //var/run/docker.sock:/var/run/docker.sock ^
    --volume "%cd%"/appwrite:/usr/src/code/appwrite:rw ^
    --entrypoint="install" ^
    appwrite/appwrite:1.5.4

PowerShell

docker run -it --rm `
    --volume /var/run/docker.sock:/var/run/docker.sock `
    --volume ${pwd}/appwrite:/usr/src/code/appwrite:rw `
    --entrypoint="install" `
    appwrite/appwrite:1.5.4

Once the Docker installation is complete, go to http://localhost to access the Appwrite console from your browser. Please note that on non-Linux native hosts, the server might take a few minutes to start after completing the installation.

For advanced production and custom installation, check out our Docker environment variables docs. You can also use our public docker-compose.yml and .env files to manually set up an environment.

Upgrade from an Older Version

If you are upgrading your Appwrite server from an older version, you should use the Appwrite migration tool once your setup is completed. For more information regarding this, check out the Installation Docs.

One-Click Setups

In addition to running Appwrite locally, you can also launch Appwrite using a pre-configured setup. This allows you to get up and running quickly with Appwrite without installing Docker on your local machine.

Choose from one of the providers below:

DigitalOcean Logo
DigitalOcean
Gitpod Logo
Gitpod
Akamai Logo
Akamai Compute

Getting Started

Getting started with Appwrite is as easy as creating a new project, choosing your platform, and integrating its SDK into your code. You can easily get started with your platform of choice by reading one of our Getting Started tutorials.

Services

  • Account - Manage current user authentication and account. Track and manage the user sessions, devices, sign-in methods, and security logs.
  • Users - Manage and list all project users when building backend integrations with Server SDKs.
  • Teams - Manage and group users in teams. Manage memberships, invites, and user roles within a team.
  • Databases - Manage databases, collections, and documents. Read, create, update, and delete documents and filter lists of document collections using advanced filters.
  • Storage - Manage storage files. Read, create, delete, and preview files. Manipulate the preview of your files to perfectly fit your app. All files are scanned by ClamAV and stored in a secure and encrypted way.
  • Functions - Customize your Appwrite server by executing your custom code in a secure, isolated environment. You can trigger your code on any Appwrite system event either manually or using a CRON schedule.
  • Realtime - Listen to real-time events for any of your Appwrite services including users, storage, functions, databases, and more.
  • Locale - Track your user's location and manage your app locale-based data.
  • Avatars - Manage your users' avatars, countries' flags, browser icons, and credit card symbols. Generate QR codes from links or plaintext strings.

For the complete API documentation, visit https://appwrite.io/docs. For more tutorials, news and announcements check out our blog and Discord Server.

SDKs

Below is a list of currently supported platforms and languages. If you would like to help us add support to your platform of choice, you can go over to our SDK Generator project and view our contribution guide.

Client

  • ✅   Web (Maintained by the Appwrite Team)
  • ✅   Flutter (Maintained by the Appwrite Team)
  • ✅   Apple - Beta (Maintained by the Appwrite Team)
  • ✅   Android (Maintained by the Appwrite Team)

Server

  • ✅   NodeJS (Maintained by the Appwrite Team)
  • ✅   PHP (Maintained by the Appwrite Team)
  • ✅   Dart - (Maintained by the Appwrite Team)
  • ✅   Deno - Beta (Maintained by the Appwrite Team)
  • ✅   Ruby (Maintained by the Appwrite Team)
  • ✅   Python (Maintained by the Appwrite Team)
  • ✅   Kotlin - Beta (Maintained by the Appwrite Team)
  • ✅   Apple - Beta (Maintained by the Appwrite Team)
  • ✅   .NET - Experimental (Maintained by the Appwrite Team)

Community

Looking for more SDKs? - Help us by contributing a pull request to our SDK Generator!

Architecture

Appwrite Architecture

Appwrite uses a microservices architecture that was designed for easy scaling and delegation of responsibilities. In addition, Appwrite supports multiple APIs, such as REST, WebSocket, and GraphQL to allow you to interact with your resources by leveraging your existing knowledge and protocols of choice.

The Appwrite API layer was designed to be extremely fast by leveraging in-memory caching and delegating any heavy-lifting tasks to the Appwrite background workers. The background workers also allow you to precisely control your compute capacity and costs using a message queue to handle the load. You can learn more about our architecture in the contribution guide.

Contributing

All code contributions, including those of people having commit access, must go through a pull request and be approved by a core developer before being merged. This is to ensure a proper review of all the code.

We truly ❤ī¸ pull requests! If you wish to help, you can learn more about how you can contribute to this project in the contribution guide.

Security

For security issues, kindly email us at [email protected] instead of posting a public issue on GitHub.

Follow Us

Join our growing community around the world! Check out our official Blog. Follow us on Twitter, Facebook Page, Facebook Group, Dev Community or join our live Discord server for more help, ideas, and discussions.

License

This repository is available under the BSD 3-Clause License.

appwrite's People

Contributors

2002bishwajeet avatar abnegate avatar adityaoberai avatar armino-dev avatar bobcatprogrammer avatar brandonroberts avatar christyjacob4 avatar elad2412 avatar eldadfux avatar everly-gif avatar fanatic75 avatar fogelito avatar gepd avatar gewenyu99 avatar guptapratik02 avatar kodumbeats avatar lohanidamodar avatar loks0n avatar meldiron avatar pineappleionic avatar rdmchr avatar shimonewman avatar singhbhaskar avatar stnguyen90 avatar tacoelho avatar torstendittmann avatar tusharxoxoxo avatar vermakhushboo avatar vocalfan avatar wess avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

appwrite's Issues

[bug] Project UID Copy to clipboard button is empty

Description

Under a project settings, the button that is supposed to copy the Project UID is not working. After pressing it I get an empty string on paste.

Reproduce

  1. Go to a project settings page
  2. Click on Copy to clipboard button

Desktop

  • OS: MacOS Mojave 10.14
  • Browser: Firefox 7.0.2 (64-bit)

Help Translate Appwrite Locale and Email templates

Currently, Appwrite locale and email templates support 44 locales. We need help supporting more languages and improving current translations.

Translating is as easy as adding a few PHP file with new locale as prefix in file names.

Update (#Hacktoberfest 20)

Please submit any PRs against branch 0.7.x with the updated file structure, as shown below âŦ‡ī¸

Structure

List of file required for new locale are:

Email Templates
app/config/locale/translations/templates/en.email.auth.confirm.tpl
app/config/locale/translations/templates/en.email.auth.invitation.tpl
app/config/locale/translations/templates/en.email.auth.recovery.tpl

Locale Lists and Settings
app/config/locale/translations/en.php
app/config/locale/translations/en.continents.php
app/config/locale/translations/en.countries.php

Configuration and Loading
Add the new language to Appwrite config file: /app/config/locale/codes.php (order by ABC)
Load the new translation here: ./app/init.php (line: 224) (order by ABC)

Make sure to keep PHP array keys exactly the same.

Template Status

✅ = Updated - You can still submit PRs with fixes or improvements
⛔ī¸ = Outdated - Update to match languages that are marked as updated
🆘 = Missing - No translation has yet been contributed (fallback to english)

New locales are always welcomed.

Locale Phrases Countries Continents Template - confirm Template - invite Template - recovery
af ✅ ✅ ✅ ✅ ✅ ✅
ar ✅ ✅ ✅ ✅ ✅ ✅
bn ✅ ✅ ✅ ✅ ✅ ✅
cat ✅ ✅ ✅ ✅ ✅ ✅
cz ✅ ✅ ✅ ✅ ✅ ✅
de ✅ ✅ ✅ ✅ ✅ ✅
en ✅ ✅ ✅ ✅ ✅ ✅
es ✅ ✅ ✅ ✅ ✅ ✅
fi ✅ ✅ ✅ ✅ ✅ ✅
fo ✅ ✅ ✅ ✅ ✅ ✅
fr ✅ ✅ ✅ ✅ ✅ ✅
gr ✅ ✅ ✅ ✅ ✅ ✅
he ✅ ✅ ✅ ✅ ✅ ✅
hi ✅ ✅ ✅ ✅ ✅ ✅
hu ✅ ✅ ✅ ✅ ✅ ✅
hy ✅ ✅ ✅ ✅ ✅ ✅
id ✅ ✅ ✅ ✅ ✅ ✅
is ✅ ✅ ✅ ✅ ✅ ✅
it ✅ ✅ ✅ ✅ ✅ ✅
ja ✅ ✅ ✅ ✅ ✅ ✅
jv ✅ ✅ ✅ ✅ ✅ ✅
km ✅ ✅ ✅ ✅ ✅ ✅
ko ✅ ✅ ✅ ✅ ✅ ✅
lt ✅ ✅ ✅ ✅ ✅ ✅
ml ✅ ✅ ✅ ✅ ✅ ✅
mr ✅ ✅ ✅ ✅ ✅ ✅
ms ✅ ✅ ✅ ✅ ✅ ✅
nl ✅ ✅ ✅ ✅ ✅ ✅
no ✅ ✅ ✅ ✅ ✅ ✅
np ✅ ✅ ✅ ✅ ✅ ✅
ph ✅ ✅ ✅ ✅ ✅ ✅
pl ✅ ✅ ✅ ✅ ✅ ✅
pt-br ✅ ✅ ✅ ✅ ✅ ✅
pt-pt ✅ ✅ ✅ ✅ ✅ ✅
ro ✅ ✅ ✅ ✅ ✅ ✅
ru ✅ ✅ ✅ ✅ ✅ ✅
si ✅ ✅ ✅ ✅ ✅ ✅
sl ✅ ✅ ✅ ✅ ✅ ✅
sq ✅ ✅ ✅ ✅ ✅ ✅
sv ✅ ✅ ✅ ✅ ✅ ✅
ta ✅ ✅ ✅ ✅ ✅ ✅
th ✅ ✅ ✅ ✅ ✅ ✅
tr ✅ ✅ ✅ ✅ ✅ ✅
ua ✅ ✅ ✅ ✅ ✅ ✅
vi ✅ ✅ ✅ ✅ ✅ ✅
zh-cn ✅ ✅ ✅ ✅ ✅ ✅
zh-tw ✅ ✅ ✅ ✅ ✅ ✅

Create one project

No redirection when I create one project and no alert information which specifies that my project is created. So, when I wait, I ought to create another project before I see my projects.

[bug] Wrong path /auth/oauth in docs

Description
According to the docs here the request for OAuth providers is /auth/oauth/{provider}. Even if the the provider is setup correctly, it returns Error 412: Provider is undefined, configure provider app ID and app secret key to continue.

Turns out that the route that works as expected is /auth/oauth/{provider}?project={project_id}&success={link}&failure={link}. If that is the intended behaviour, then the docs need to be changed and the wrong path should return an error stating the missing parameters, rather than Error 412 which is confusing for this case.

Reproduce

  • Setup a provider at Users/Providers
  • Try to login at the given path /auth/oauth/{provider}

Desktop

  • OS: MacOS Mojave 10.14
  • Browser: Firefox 7.0.2 (64-bit) / Chrome 74.0.3729.157
  • Appwrite: v0.2.0

I can fix the docs shortly, but I need to know what is the intended behaviour.

[BUG] Database UI doesn't update on click

What's the issue

I came across a minor UI issue while using the appwrite dashboard. The Collection preview doesn't show up automatically when selecting a collection. The page needs to be refreshed for it to show up, as seen in the screenshots.

Also, Once a preview has shown up, when you select another collection, the preview doesn't update and the page needs to be refreshed again.

Steps to reproduce

  1. Select A project on the appwrite dashboard
  2. Click the Database Navbar Option
  3. Click on any collection

Expected Behaviour

test1

Actual Behaviour

test

Possible Fix

The onClick Listener must be having some issue

Configuration

  1. Appwrite v0.3.0
  2. Chrome Version 76.0.3809.132 (Official Build) (64-bit)

I would like to work on this issue.

[DISCUSSION] Discord VS. Gitter

I have been approached by a few members of our community and asked to consider moving the community chat from Gitter to Discord.

I wanted to get some of your opinions about the changes and whether we should make it.

In my own opinion, I love the way Gitter integrates with Github. I think Gitter lacks some more advanced features, and the UI doesn't feel as good as it can be. I have also tried installing the Gitter app for iOS but had no success logging in.

Discord seems to the more popular chat tool for communities right now and does offer excellent and cross-platform UI and apps with some cool and advanced features.

I really love to know what you think about this one.

about openpyxl

I have a question that how to make the axis above scale in python openpyxl

[DISCUSSION] Benchmarking Solution for Appwrite

We have a temporary solution for benchmarking the API performance using Apache AB. I want to have a better solution, maybe as part of the CI or a separate repository. Apache AB is nice but requires a lot of manual work to be be done.

Any suggestion for modern open source tools that can do this kind of job?

The most important thing for us is to test the API performance for every new release (or every commit?), maybe on different hardware, if possible (not a must), and have an automated flow as much as possible.

Any suggestions and insights will be greatly appreciated.

[DISCUSSION] Appwrite sudo/root mode (gathering users feedback)

Hi,
I had the chance to test Appwrite, thanks for the great project.
One thing that I can't find is, there are no installation-wide settings on the console. For example, it would be great if we could limit new signups after the first one and control who can create projects on that particular Appwrite installation.

Appwrite sdk - android

Hi mobile app dev here.

When i check appwrite.io , i couldn't find any docs for Android SDK . I wanted to contribute by adding tutorials and getting started by reading the code, but to me, it looks like there isn't the libraries/sdks available for android.

Is this a case? If not, can you point me to some android code which could be used for implementing a server via this sdk for a sample mobile app?

Some comments from a user

@eldadfux great project!

Some notes:

  1. I would like to see some use cases for every feature
  2. How would you recommend to deploy it to production? on top of k8? AWS ECS ?
    Maybe some docs on that?
  3. How would the uploaded files be persistent? I would want to upload it to AWS / GCP instead of docker volume.
  4. Just an Idea- maybe you can have some build in integrations with Cloudinary for instance?
  5. Cloud functions & Realtime features?

Error when building on Mac OS

I tried building the docker images from Mac OS Mojave, but got the following error:

 ---> Using cache
 ---> 6426cc624a50
Step 23/38 : RUN echo "upload_max_filesize = 4M" > /etc/php/7.3/fpm/conf.d/appwrite.ini
 ---> Using cache
 ---> 99e962e6f8c6
Step 24/38 : ADD ./docker/nginx.conf /etc/nginx/nginx.conf
 ---> Using cache
 ---> 73a882a5e42b
Step 25/38 : ADD ./docker/ssl/nginx.crt /etc/nginx/ssl/nginx.crt
 ---> Using cache
 ---> 34eef6a96cda
Step 26/38 : ADD ./docker/ssl/nginx.key /etc/nginx/ssl/nginx.key
 ---> Using cache
 ---> 7021855c6f4a
Step 27/38 : RUN mkdir -p /var/run/php
 ---> Using cache
 ---> ef38618f3eb5
Step 28/38 : ADD ./docker/www.conf /etc/php/7.3/fpm/pool.d/www.conf
 ---> Using cache
 ---> 36561753c444
Step 29/38 : ADD ./docker/supervisord.conf /etc/supervisord.conf
 ---> Using cache
 ---> 812872157578
Step 30/38 : ADD ./docker/entrypoint.sh /entrypoint.sh
 ---> Using cache
 ---> a26c1c55dace
Step 31/38 : RUN chmod 775 /entrypoint.sh
 ---> Using cache
 ---> 114796cf3448
Step 32/38 : ADD ./app /usr/share/nginx/html/app
 ---> edc3ea67b66a
Step 33/38 : ADD ./public /usr/share/nginx/html/public
 ---> 25a63d99c57a
Step 34/38 : ADD ./src /usr/share/nginx/html/src
 ---> 9eca4401b521
Step 35/38 : ADD ./vendor /usr/share/nginx/html/vendor
ERROR: Service 'appwrite' failed to build: ADD failed: stat /var/lib/docker/tmp/docker-builder533278007/vendor: no such file or directory

OS: MacOS Mojave 10.14.6
Docker Desktop: 2.1.0.3 (38240)
Engine: 19.03.2
Compose: 1.24.1

Missing some Norwegian Translations đŸ‡ŗ🇴

The Norwegian translation was the first one to be added, and we forgot to mention we needed to translate the 'app/config/locale/en.php' file. This is the only file missing before we can add the 'no' locale in the next version.

Unable to create database document

First of all, thank you for your awesome work!!

I currently tring to create a set of service for Angular that will communicate with the REST API of Appwrite.

When I'm trying to create a new document in a collection from the database, I got a PHP error:

Warning: Illegal string offset '$permissions' in /usr/share/nginx/html/app/controllers/database.php on line 388

Notice: Array to string conversion in /usr/share/nginx/html/app/controllers/database.php on line 388

Fatal error: Uncaught TypeError: Argument 1 passed to Database\Database::createDocument() must be of the type array, string given, 
called in /usr/share/nginx/html/app/controllers/database.php on line 430 and defined in /usr/share/nginx/html/src/Database/Database.php:184 Stack trace: 
#0 /usr/share/nginx/html/app/controllers/database.php(430): Database\Database->createDocument('A"test":"test"}') 
#1 [internal function]: {closure}('5d7e5234e6d9d', 'A"test":"test"}', Array, Array, '', '', 'assign') 
#2 /usr/share/nginx/html/vendor/utopia-php/framework/src/App.php(401): call_user_func_array(Object(Closure), Array) 
#3 /usr/share/nginx/html/app/app.php(792): Utopia\App->run(Object(Utopia\Request), Object(Utopia\Response)) 
#4 /usr/share/nginx/html/public/index.php(27): include('/usr/share/ngin...') 
#5 {main} thrown in /usr/share/nginx/html/src/Database/Database.php on line 18

This error appear if I'm using a REST client or if I call the backend from my service.

This is my request :

  • Method: POST
  • path: /v1/database/{collectionId}/documents
  • headers :
{
  "content-type": "application/json",
  "x-appwrite-key":"API_KEY",
  "x-appwrite-project":"PROJECT_ID"
 }
  • body:
{
  "data":"{\"test\":\"test\"}",
  "read":[],
  "write":[],
  "parentDocument":"",
  "parentProperty":"",
  "parentPropertyType":"assign"
}

Is it me that is missing something from the documentation about the structure of the data to send or is this really a bug?

ERROR: Couldn't connect to Docker daemon at http+docker://localhost - is it running?

I'm setting up the project and following the setup guide. however I bump into an error which is not mentioned on the documentation and would save time for few seconds of searching on the solution if its already on the setup guide. here's what I encounter when setting up.

image

So basically I need to add sudo on docker-compose to make it work. changing the setup guide from.

git clone [email protected]:appwrite/appwrite.git

cd appwrite

composer update --ignore-platform-reqs --optimize-autoloader --no-dev --no-plugins --no-scripts

npm install

docker-compose up -d

to this.

git clone [email protected]:appwrite/appwrite.git

cd appwrite

composer update --ignore-platform-reqs --optimize-autoloader --no-dev --no-plugins --no-scripts

npm install

docker-compose up -d //or use `sudo docker-compose up -d` if encountered docker error 

Solution reference: docker/compose#4181

Create a Demo TODO List App Using React TODOMVC as Base

We need to create a demo app that will demonstrate how to integrate Appwrite in a basic React JS project.

For this demo, we will use React TODO MVC app as base:
https://github.com/tastejs/todomvc/tree/gh-pages/examples/react

To show off some of the Appwrite capabilities, we will extend the demo app with some Appwrite APIs.

  1. Init Appwrite JS SDK in the TODO MVC source code.
  2. Use Appwrite account service to check if the user is logged in or not.
  3. If the user is logged out (401 response from the account API), show a modal screen covering the app (and blocking its usage) with a login form. Allow the user to login using 3 of our OAuth providers.
  4. After login user should be redirected back to our app.
  5. When the user is logged in, he will be able to use the original TODO MVC app.
  6. The basic TODO MVC app saves the user changes to the browser localStorage API. Replace the localStorage API with the Appwrite Database service. Each task the user adds should be saved with read & write permissions allowing only the user itself to view or edit his tasks.
  7. Add the username at the top right corner of the TODO MVC app to indicate he has logged in successfully.
  8. Add a logout button near the username from stage 7 to allow the user to sign out of his project account.

For this task, we will provide a ready to use Appwrite project UID and a list of whitelisted domains for development and production environments. You can also use a self-hosted Appwrite instance and initialize the Appwrite project, allowed domains, and database collection structures.

docker-compose volumes

Why do we have to mount app, public, src and vendor while we have added them to the docker image itself?
Also, I would recommend to use named volumes instead of the current way.
Let me know about your thoughts so I can work on it if anything needs to be done.

volumes:
- ./app:/usr/share/nginx/html/app
- ./public:/usr/share/nginx/html/public
- ./src:/usr/share/nginx/html/src
- ./vendor:/usr/share/nginx/html/vendor
- ./docker/nginx.conf:/etc/nginx/nginx.conf:rw
- ./storage/uploads:/storage/uploads:rw
- ./storage/cache:/storage/cache:rw

[bug] - all login params are required

Calling from JS aw.auth.login(this.username, this.password);

yields back

{"message":"Invalid success: URL host must be one of: https://appwrite.io, https://appwrite.test, http://appwrite.test, https://localhost, http://localhost, http://localhost/v1","code":400,"file":"/usr/share/nginx/html/vendor/utopia-php/framework/src/App.php","line":456,"trace":[{"file":"/usr/share/nginx/html/vendor/utopia-php/framework/src/App.php","line":395,"function":"validate","class":"Utopia\App","type":"->","args":["success",{"default":null,"validator":{},"description":"URL to redirect back to your app after a successful login attempt.","optional":true,"value":null},"null"]},{"file":"/usr/share/nginx/html/app/app.php","line":793,"function":"run","class":"Utopia\App","type":"->","args":[{},{}]},{"file":"/usr/share/nginx/html/public/index.php","line":27,"args":["/usr/share/nginx/html/app/app.php"],"function":"include"}],"version":"latest"}

The 'success' and 'failure' URLs are still required by the backend.

This might be related to
utopia-php/http@5ac8c91#diff-58980ac23a3a9a0b92abd9805eed1e78

in Utopia forcing default values? It's a bit hard to follow as I'm not sure what 'param' method is doing here:

->param('success', null, function () use ($clients) {return new Host($clients);}, 'Redirect when registration succeed', true)

Is param() call creating/invoking a validator directly?

The docs/examples are somewhat out of sync as well, as docs show

appwrite.users.login()

but it should be

appwrite.auth.login()

[DISCUSSION] Default read/write permissions for Document Creation

Currently the Appwrite sdk requires you to explicitly pass the read and write permissions of any document that is created by a user.

test

The expected format for the read / write permissions requires you to supply the user ID of the current logged in user. This would result in an additional request being placed just to fetch user ID.

What I'm suggesting is a default setting where the read and write permissons default to the current user taking away the overhead on the developer to fetch the USER ID.

If required, additional permissions can be passed allowing other users to access the document but it must always have the current user as one of the permissions. It is logical that a user who writes a document will also want to read it at some point so I feel it would be a useful enhancement.

We really want community feedback on this to check if there are any possible drawbacks to this approach and other implications that it may cause.

Currently I'm using the following code to create a document

class DB {
  constructor(sdk, collectionId) {
    this.sdk = sdk;
    this.collectionId = collectionId;
    this.user = null;
    this.read = null;
    this.write = null;
  }

  // user.roles[1] is ["userID" : "5awe2edfefwef" .... ]
  // Which im using to set the read and write permissions for the current user.
  setUser(user) {
    this.user = user;
    this.read = user && [user.roles[1]];
    this.write = user && [user.roles[1]];
  }
  addTodo(data) {
    const promise = this.sdk.database.createDocument(this.collectionId, data, this.read, this.write);
    console.log('[INFO] Adding Todo');
    return promise.then(function(response) {
      return response;
    }, function(error) {
      return error;
    });
  }
}

The setUser function is called by my authentication controller upon successful login to set the read and write permisson variables in the DB controller.

Here's what I'm suggesting

class DB {
  constructor(sdk, collectionId) {
    this.sdk = sdk;
    this.collectionId = collectionId;
  }

  addTodo(data) {
    const promise = this.sdk.database.createDocument(this.collectionId, data);
    console.log('[INFO] Adding Todo');
    return promise.then(function(response) {
      return response;
    }, function(error) {
      return error;
    });
  }
}

SQLSTATE[HY000] [1130] Host '172.19.0.8' is not allowed to connect to this MariaDB server

After freshly setting up appwrite on my local and try to test the sign up functionality. I encountered the error "SQLSTATE[HY000] [1130] Host '172.19.0.8' is not allowed to connect to this MariaDB server. Screenshot below:
image

Docker Running

image

Initial checking on MariaDB.

image

Here's a video on how to recreate the issue.
https://www.loom.com/share/98b4c62fc0864d2c81e0a902aa226078

I execute the all.sql and set root password to password but still cant connect.
image

UPDATE -> RESOLVED
so after executing all.sql and set a root password. all you need to do is to create user with % which means "every IP are allowed"

mysql> CREATE USER 'root'@'%' IDENTIFIED BY 'password';
mysql> grant all on *.* to 'root'@'%';

Help us add support for more SDKs!

We use our SDK generator project to auto-generate SDKs from our API spec JSON file.

All information on how to add new templates for a new language are in here:
https://github.com/appwrite/sdk-generator/blob/master/CONTRIBUTING.md

You can also use one of our existing language templates as a base for a new one.

We currently have support for:

  • PHP
  • Javascript
  • NodeJS (Still needs help for adding file upload requests)
  • Ruby (* BETA - Still needs some code review and testing)
  • Python (* BETA - Still needs some code review and testing)
  • Dart (* BETA - Still needs to add support for strict typing, default values and file upload)

Any new coding language is WELCOMED!

Project Repo:
https://github.com/appwrite/sdk-generator

Help us choose JS coding standards!

Currently we are using the PHP-FIG for our PHP coding standards but we don't have any standards to follow when it comes to JS code writing.

What in your opinion will be most suitable? It is important that the new standards we will use will be popular in the community and will have great good ecosystem around them.

Can't sign up

When I'm try to create an account it throws me an JSON responds

{"message":"SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo failed: Name or service not known","code":2002,"file":"/usr/share/nginx/html/app/init.php","line":68,"trace":[{"file":"/usr/share/nginx/html/app/init.php","line":68,"function":"__construct","class":"PDO","type":"->","args":["mysql:host=mariadb;dbname=appwrite;charset=utf8mb4","root","password",{"1002":"SET NAMES utf8mb4","2":5}]},{"file":"/usr/share/nginx/html/vendor/utopia-php/registry/src/Registry/Registry.php","line":72,"function":"{closure}","args":[]},{"file":"/usr/share/nginx/html/app/app.php","line":196,"function":"get","class":"Utopia\Registry\Registry","type":"->","args":["db"]},{"function":"{closure}","args":[]},{"file":"/usr/share/nginx/html/vendor/utopia-php/abuse/src/Abuse/Adapters/TimeLimit.php","line":263,"function":"call_user_func","args":[{}]},{"file":"/usr/share/nginx/html/vendor/utopia-php/abuse/src/Abuse/Adapters/TimeLimit.php","line":159,"function":"getPDO","class":"Utopia\Abuse\Adapters\TimeLimit","type":"->","args":[]},{"file":"/usr/share/nginx/html/vendor/utopia-php/abuse/src/Abuse/Adapters/TimeLimit.php","line":233,"function":"count","class":"Utopia\Abuse\Adapters\TimeLimit","type":"->","args":["url:localhost/v1/auth/register,ip:172.18.0.1",1567558800]},{"file":"/usr/share/nginx/html/app/app.php","line":216,"function":"remaining","class":"Utopia\Abuse\Adapters\TimeLimit","type":"->","args":[]},{"function":"{closure}","args":[]},{"file":"/usr/share/nginx/html/vendor/utopia-php/framework/src/App.php","line":387,"function":"call_user_func_array","args":[{},[]]},{"file":"/usr/share/nginx/html/app/app.php","line":793,"function":"run","class":"Utopia\App","type":"->","args":[{},{}]},{"file":"/usr/share/nginx/html/public/index.php","line":27,"args":["/usr/share/nginx/html/app/app.php"],"function":"include"}],"version":"latest"}

Help required in setting up the environment.

git clone not working with the provided command in bash shell.

root@18e92e5c793d:/home/workspace# git clone [email protected]:appwrite/appwrite.git
Cloning into 'appwrite'...
error: cannot run ssh: No such file or directory
fatal: unable to fork

However, it is working with git clone https://github.com/appwrite/appwrite.git
By the way, can you please provide what are the permissions to run the above command.
Screenshot from 2019-10-02 08-58-47
Screenshot from 2019-10-02 09-17-18

[DISCUSSION] New User Login Methods

We are starting to think about new login methods that will be available for future releases.
We would love to get the community feedback regarding new ideas for user signups:

These are some of the ideas we have, and we would like to get more.

  • OTP / Email code
  • SMS
  • Email
  • Anonymous login
  • 2FA (should work only with email/password or with any method?)
  • Hardware U2F keys
  • WebAuthn API
  • Existing OAuth Access token

If you have reference for implementations in other projects or apps that will be great, also any technical docs could be awesome as well.

ERROR: Couldn't connect to Docker daemon at http+docker://localhost - is it running?

I'm setting up the project and following the setup guide. however I bump into an error which is not mentioned on the documentation and would save time for few seconds of searching on the solution if its already on the setup guide. here's what I encounter when setting up.

image

So basically I need to add sudo on docker-compose to make it work. changing the setup guide from.

git clone [email protected]:appwrite/appwrite.git

cd appwrite

composer update --ignore-platform-reqs --optimize-autoloader --no-dev --no-plugins --no-scripts

npm install

docker-compose up -d

to this.

git clone [email protected]:appwrite/appwrite.git

cd appwrite

composer update --ignore-platform-reqs --optimize-autoloader --no-dev --no-plugins --no-scripts

npm install

docker-compose up -d //or use `sudo docker-compose up -d` if encountered docker error 

Solution reference: docker/compose#4181

New & Organised RFC Process

We want to create a better process for suggesting new features and services that integrate with Appwrite. Currently, we are thinking about a process similar to what React, and Gatsby is doing, but any alternatives or other examples will be great. We would love to get your ideas.

register hangs.

  1. Follow instructions to install the application from the GitHub README.
  2. Navigate to localhost
  3. Go through register form, press signup.

The app will hang, never returns and spins.

10.14.6 (Mojave)
Model Name: MacBook Pro
Model Identifier: MacBookPro14,2
Processor Name: Intel Core i7
Processor Speed: 3.5 GHz
Number of Processors: 1
Total Number of Cores: 2
L2 Cache (per Core): 256 KB
L3 Cache: 4 MB
Hyper-Threading Technology: Enabled
Memory: 16 GB

Documentation unclear

The documentation is very unclear on how to init a project and there's not proper difference explained between web and server, for some people it may be the same, I created a project and not sure how to initialise it in my vue project.

[bug] Empty modal after wrong input

Description
After wrongfully trying to create a user in the Users menu and getting Failed to creat user alert, the add user modal is not working anymore. It is just empty.

For instance, I try to create a user with a short password.

Screenshot_2019-10-23 Appwrite - Users

The response of the request is 400 error and the Invalid password message, which is legit.

{
    "message":"Invalid password: Password must be between 6 and 32 chars and contain ...",
    "code":400,
    "file":"\/usr\/share\/nginx\/html\/vendor\/utopia-php\/framework\/src\/App.php",
    "line":456
}

But afterwards, any time I try to press on the + button to create a new user, the model is empty.

Screenshot_2019-10-23 Appwrite - Users(1)

Reproduce

  • Got to Users menu
  • Press + button to add a new user
  • Wrongfully add a user
  • Get the red alert with Failed to add user
  • Press again on + button to try again

Desktop

  • OS: MacOS Mojave 10.14
  • Browser: Firefox 7.0.2 (64-bit)

Can't fire up the container

I'm running macOS with docker-toolbox installed from cask

Here's error log. Any ideas ?

mk8:appwrite fosteman$ docker-compose up -d
Building appwrite
Step 1/38 : FROM ubuntu:18.04
 ---> a2a15febcdf3
Step 2/38 : LABEL maintainer="[email protected]"
 ---> Using cache
 ---> 2f7e986b8f2a
Step 3/38 : ENV TZ=Asia/Tel_Aviv
 ---> Using cache
 ---> ff4296ad2c08
Step 4/38 : ENV _APP_ENV production
 ---> Using cache
 ---> 3bc182a05268
Step 5/38 : ENV _APP_HOME https://appwrite.io
 ---> Using cache
 ---> 2c96d913595a
Step 6/38 : ENV _APP_EDITION community
 ---> Using cache
 ---> ee86d11a9c61
Step 7/38 : ENV _APP_OPENSSL_KEY_V1 your-secret-key
 ---> Using cache
 ---> 8e79c4df045b
Step 8/38 : ENV _APP_REDIS_HOST redis
 ---> Using cache
 ---> 77e7ed8e5c4c
Step 9/38 : ENV _APP_REDIS_PORT 6379
 ---> Using cache
 ---> 330df3f29ce0
Step 10/38 : ENV _APP_DB_HOST mariadb
 ---> Using cache
 ---> d4d260b0907a
Step 11/38 : ENV _APP_DB_PORT 3306
 ---> Using cache
 ---> 45def8bc1c4d
Step 12/38 : ENV _APP_DB_USER root
 ---> Using cache
 ---> 51488cbfdb0c
Step 13/38 : ENV _APP_DB_PASS password
 ---> Using cache
 ---> 8940b8e58122
Step 14/38 : ENV _APP_DB_SCHEMA appwrite
 ---> Using cache
 ---> 3ad5e394540b
Step 15/38 : ENV _APP_INFLUXDB_HOST influxdb
 ---> Using cache
 ---> 9929c5e3d5f7
Step 16/38 : ENV _APP_INFLUXDB_PORT 8086
 ---> Using cache
 ---> 4d33b6ce60dc
Step 17/38 : ENV _APP_STATSD_HOST telegraf
 ---> Using cache
 ---> 8eab1ae4de35
Step 18/38 : ENV _APP_STATSD_PORT 8125
 ---> Using cache
 ---> 88be20f531a4
Step 19/38 : ENV _APP_SMTP_HOST smtp
 ---> Using cache
 ---> 2976cc4d531f
Step 20/38 : ENV _APP_SMTP_PORT 25
 ---> Using cache
 ---> ca5f792fd2a4
Step 21/38 : RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
 ---> Using cache
 ---> 1b6e306eb1e0
Step 22/38 : RUN   apt-get update --fix-missing &&   apt-get install -y software-properties-common &&   LC_ALL=C.UTF-8 add-apt-repository -y ppa:ondrej/php &&   apt-get update --fix-missing &&   apt-get install -y htop supervisor openssl wget php7.3 php7.3-fpm php7.3-mysqlnd php7.3-curl php7.3-imagick php7.3-mbstring php7.3-dom php7.3-dev webp &&   echo "deb http://nginx.org/packages/mainline/ubuntu/ wily nginx" >> /etc/apt/sources.list.d/nginx.list &&   echo "deb-src http://nginx.org/packages/mainline/ubuntu/ wily nginx" >> /etc/apt/sources.list.d/nginx.list &&   wget -q http://nginx.org/keys/nginx_signing.key &&   apt-key add nginx_signing.key &&   apt-get update --fix-missing &&   apt-get install -y nginx &&   wget -q https://github.com/phpredis/phpredis/archive/3.1.2.tar.gz &&   tar -xf 3.1.2.tar.gz &&   cd phpredis-3.1.2 &&   phpize7.3 &&   ./configure &&   make && make install &&   echo extension=redis.so >> /etc/php/7.3/fpm/conf.d/redis.ini &&   echo extension=redis.so >> /etc/php/7.3/cli/conf.d/redis.ini &&   cd ../ &&   rm -rf phpredis-3.1.2 &&   rm -rf 3.1.2.tar.gz &&   apt-get purge -y --auto-remove php7.3-dev &&   apt-get purge -y --auto-remove software-properties-common &&   apt-get clean &&   rm -rf /var/lib/apt/lists/*
 ---> Using cache
 ---> 7e0f5b20f2fc
Step 23/38 : RUN echo "upload_max_filesize = 4M" > /etc/php/7.3/fpm/conf.d/appwrite.ini
 ---> Using cache
 ---> f26e2d6eb7e4
Step 24/38 : ADD ./docker/nginx.conf /etc/nginx/nginx.conf
 ---> Using cache
 ---> 95a205f4ce14
Step 25/38 : ADD ./docker/ssl/nginx.crt /etc/nginx/ssl/nginx.crt
 ---> Using cache
 ---> 0f7fba10ecb6
Step 26/38 : ADD ./docker/ssl/nginx.key /etc/nginx/ssl/nginx.key
 ---> Using cache
 ---> 21bd810fb2cd
Step 27/38 : RUN mkdir -p /var/run/php
 ---> Using cache
 ---> 6ce0f56a8432
Step 28/38 : ADD ./docker/www.conf /etc/php/7.3/fpm/pool.d/www.conf
 ---> Using cache
 ---> b3e284e2f94e
Step 29/38 : ADD ./docker/supervisord.conf /etc/supervisord.conf
 ---> Using cache
 ---> fb0406435e6c
Step 30/38 : ADD ./docker/entrypoint.sh /entrypoint.sh
 ---> Using cache
 ---> 5252ab2b6c67
Step 31/38 : RUN chmod 775 /entrypoint.sh
 ---> Using cache
 ---> 2c0a155817c6
Step 32/38 : ADD ./app /usr/share/nginx/html/app
 ---> Using cache
 ---> b15fe51f8931
Step 33/38 : ADD ./public /usr/share/nginx/html/public
 ---> Using cache
 ---> 79d18ddba3a2
Step 34/38 : ADD ./src /usr/share/nginx/html/src
 ---> Using cache
 ---> fddbbe01ed1e
Step 35/38 : ADD ./vendor /usr/share/nginx/html/vendor
ERROR: Service 'appwrite' failed to build: ADD failed: stat /var/lib/docker/tmp/docker-builder117379281/vendor: no such file or directory
mk8:appwrite fosteman$ stat
499798432 797 crw--w---- 1 fosteman tty 268435457 0 "Sep 15 13:00:00 2019" "Sep 15 13:00:00 2019" "Sep 15 13:00:00 2019" "Dec 31 19:00:00 1969" 131072 0 0 (stdin)
mk8:appwrite fosteman$ 

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤ī¸ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.