1
0
Fork 0
mirror of synced 2024-06-18 02:34:54 +12:00

Merge branch 'master' of github.com:appwrite/appwrite

This commit is contained in:
Eldad Fux 2020-10-15 07:30:53 +03:00
commit f07ef1bde3
32 changed files with 434 additions and 50 deletions

44
.github/ISSUE_TEMPLATE/bug.md vendored Normal file
View file

@ -0,0 +1,44 @@
---
name: 🐛 Bug Report
about: Submit a bug report to help us improve
labels: "bug"
---
## 🐛 Bug Report
(A clear and concise description of what the bug is)
## Have you spent some time to check if this issue has been raised before?
(Have you googled for a similar issue or checked our older issues for a similar bug)
## To Reproduce
(Write your steps here:)
## Expected behavior
<!--
How did you expect your project to behave?
Its fine if youre not sure your understanding is correct.
Write down what you thought would happen.
-->
(Write what you thought would happen.)
## Actual Behavior
<!--
Did something go wrong?
Is something broken, or not behaving as you expected?
Describe this section in detail, and attach screenshots if possible.
Don't only say "it doesn't work"!
-->
(Write what happened. Add screenshots, if applicable.)
## Your Environment
<!-- Include as many relevant details about the environment you experienced the bug in -->
(Write Environment, Operating system and version etc.)

17
.github/ISSUE_TEMPLATE/documentation.md vendored Normal file
View file

@ -0,0 +1,17 @@
---
name: 📚 Documentation
about: Report an issue related to documentation
labels: "documentation"
---
## 📚 Documentation
(A clear and concise description of what the issue is.)
## Have you spent some time to check if this issue has been raised before?
(Have you googled for a similar issue or checked our older issues for a similar bug)
### Have you read the [Code of Conduct](https://github.com/appwrite/appwrite/blob/master/CODE_OF_CONDUCT.md)?
(Write your answer here.)

21
.github/ISSUE_TEMPLATE/feature.md vendored Normal file
View file

@ -0,0 +1,21 @@
---
name: 🚀 Feature
about: Submit a proposal for a new feature
labels: "feature"
---
## 🚀 Feature
(A clear and concise description of what the feature is.)
## Have you spent some time to check if this issue has been raised before?
(Have you googled for a similar issue or checked our older issues for a similar bug)
### Have you read the [Code of Conduct](https://github.com/appwrite/appwrite/blob/master/CODE_OF_CONDUCT.md)?
(Write your answer here.)
## Pitch
(Please explain why this feature should be implemented and how it would be used. Add examples, if applicable.)

26
.github/PULL_REQUEST_TEMPLATE.md vendored Normal file
View file

@ -0,0 +1,26 @@
<!--
Thank you for sending the PR! We appreciate you spending the time to work on these changes.
Help us understand your motivation by explaining why you decided to make this change.
You can learn more about contributing to appwrite here: https://github.com/appwrite/appwrite/blob/master/CONTRIBUTING.md
Happy contributing!
-->
## What does this PR do?
(Provide a description of what this PR does.)
## Test Plan
(Write your test plan here. If you changed any code, please provide us with clear instructions on how you verified your changes work.)
## Related PRs and Issues
(If this PR is related to any other PR or resolves any issue or related to any issue link all related PR and issues here.)
### Have you read the [Contributing Guidelines on issues](https://github.com/appwrite/appwrite/blob/master/CONTRIBUTING.md)?
(Write your answer here.)

View file

@ -10,7 +10,7 @@
- Added option to join a user to any team from the console
- Added support for Brotli compression (@PedroCisnerosSantana, @Rohitub222)
- New UI micro-interactions and CSS fixes (@AnatoleLucet)
- UI performance & accessibility improvments (#406)
- UI performance & accessibility improvements (#406)
- New Doctor CLI to debug the Appwrite server ([#415](https://github.com/appwrite/appwrite/issues/415))
- All emails are now sent asynchronously for improved performance (@TorstenDittmann)
- Updated grid for OAuth2 providers list in the console
@ -28,11 +28,11 @@
- Fixed a UI bug preventing float values in numeric fields
- Fixed scroll positioning when moving rules order up & down
- Fixed missing validation for database documents key length (32 chars)
- Grammer fix for pt-br email templates (@rubensdemelo)
- Grammar fix for pt-br email templates (@rubensdemelo)
- Fixed update form labels and tooltips for Flutter Android apps
- Fixed missing custom scopes param for OAuth2 session create API route
- Fixed wrong JSON validation when creating and updating database documnets
- Fixed bug where max file size was limited to max of 10MB
- Fixed wrong JSON validation when creating and updating database documents
- Fixed bug where max file size was limited to a max of 10MB
- Fixed bug preventing the deletion of the project logo
- Fixed Bug when trying to overwrite OAuth cookie in the Flutter SDK
- Fixed OAuth redirect when using the self-hosted instance default success URL ([#454](https://github.com/appwrite/appwrite/issues/454))
@ -43,7 +43,7 @@
## Breaking Changes
- **Deprecated** `first` and `last` query params for documents list route in the database API
- **Deprecated** Deprectaed Pubjabi Translations ('pn')
- **Deprecated** Deprecated Punjabi Translations ('pn')
## Security
@ -142,7 +142,7 @@
- Allow non-web platform to skip origin header
- Limited console dashboard to show max 5 alerts at the same time
- Added more webhooks events
- Normailized all webhooks event names
- Normalized all webhooks event names
- Added support for SameSite cookie option with fallback cookie for old clients
- Added a new Discord OAuth adapter
- Added a new Twitch OAuth adapter

View file

@ -10,6 +10,52 @@ If you are worried or dont know where to start, check out our next section ex
Help us keep Appwrite open and inclusive. Please read and follow our [Code of Conduct](/CODE_OF_CONDUCT.md).
## Submit a Pull Request 🚀
Branch naming convention is as following
`TYPE-ISSUE_ID-DESCRIPTION`
example:
```
doc-548-submit-a-pull-request-section-to-contribution-guide
```
When `TYPE` can be:
- **feat** - is a new feature
- **doc** - documentation only changes
- **cicd** - changes related to CI/CD system
- **fix** - a bug fix
- **refactor** - code change that neither fixes a bug nor adds a feature
**All PRs must include a commit message with the changes description!**
For the initial start, fork the project and use git clone command to download the repository to your computer. A standard procedure for working on an issue would be to:
1. `git pull`, before creating a new branch, pull the changes from upstream. Your master needs to be up to date.
```
$ git pull
```
2. Create new branch from `master` like: `doc-548-submit-a-pull-request-section-to-contribution-guide`<br/>
```
$ git checkout -b [name_of_your_new_branch]
```
3. Work - commit - repeat ( be sure to be in your branch )
4. Push changes to GitHub
```
$ git push origin [name_of_your_new_branch]
```
5. Submit your changes for review
If you go to your repository on GitHub, you'll see a `Compare & pull request` button. Click on that button.
6. Start a Pull Request
Now submit the pull request and click on `Create pull request`.
7. Get a code review approval/reject
8. After approval, merge your PR
9. GitHub will automatically delete the branch after the merge is done. (they can still be restored).
## Setup From Source
To set up a working **development environment**, just fork the project git repository and install the backend and frontend dependencies using the proper package manager and create run the docker-compose stack.
@ -32,6 +78,59 @@ After finishing the installation process, you can start writing and editing code
Appwrite's current structure is a combination of both [Monolithic](https://en.wikipedia.org/wiki/Monolithic_application) and [Microservice](https://en.wikipedia.org/wiki/Microservices) architectures, but our final goal, as we grow, is to be using only microservices.
### File Structure
```bash
.
├── app # Main application
│ ├── config # Config files
│ ├── controllers # API & dashboard controllers
│ │ ├── api
│ │ ├── shared
│ │ └── web
│ ├── db # DB schemas
│ ├── sdks # SDKs generated copies (used for generating code examples)
│ ├── tasks # Server CLI commands
│ ├── views # HTML server-side templates
│ └── workers # Background workers
├── bin # Server executables (tasks & workers)
├── docker # Docker related resources and configs
├── docs # Docs and tutorials
│ ├── examples
│ ├── references
│ ├── sdks
│ ├── services
│ ├── specs
│ └── tutorials
├── public # Public files
│ ├── dist
│ ├── fonts
│ ├── images
│ ├── scripts
│ └── styles
├── src # Supporting libraries (each lib has one role, common libs are released as individual projects)
│ └── Appwrite
│ ├── Auth
│ ├── Database
│ ├── Docker
│ ├── Event
│ ├── Extend
│ ├── Network
│ ├── OpenSSL
│ ├── Preloader
│ ├── Resize
│ ├── Storage
│ ├── Swoole
│ ├── Task
│ ├── Template
│ ├── URL
│ └── Utopia
└── tests # End to end & unit tests
├── e2e
├── resources
└── unit
```
---
![Appwrite](docs/specs/overview.drawio.svg)
---
@ -78,9 +177,9 @@ Appwrite uses [PHP's Composer](https://getcomposer.org/) for managing dependenci
Appwrite is following the [PHP-FIG standards](https://www.php-fig.org/). Currently, we are using both PSR-0 and PSR-4 for coding standards and autoloading standards. Soon we will also review the project for support with PSR-12 (Extended Coding Style).
We use prettier for our JS coding standards and for auto-formatting our code.
We use prettier for our JS coding standards and auto-formatting our code.
## Scalability, Speed and Performance
## Scalability, Speed, and Performance
Appwrite is built to scale. Please keep in mind that the Appwrite stack can run in different environments and different scales.
@ -117,7 +216,7 @@ For us to find the right balance, please open an issue explaining your ideas bef
This will allow the Appwrite community to have sufficient discussion about the new feature value and how it fits in the product roadmap and vision.
This is also important for the Appwrite lead developers to be able to give technical input and different emphasize regarding the feature design and architecture.
This is also important for the Appwrite lead developers to be able to give technical input and different emphasis regarding the feature design and architecture.
## Build
@ -145,9 +244,9 @@ docker exec appwrite test
## Code Maintenance
We use some automation tools to help us keep a healthy code base.
We use some automation tools to help us keep a healthy codebase.
Improve PHP exeution time by using [fully-qualified function calls](https://veewee.github.io/blog/optimizing-php-performance-by-fq-function-calls/):
Improve PHP execution time by using [fully-qualified function calls](https://veewee.github.io/blog/optimizing-php-performance-by-fq-function-calls/):
```bash
php-cs-fixer fix src/ --rules=native_function_invocation --allow-risky=yes
@ -178,7 +277,7 @@ Pull requests are great, but there are many other areas where you can help Appwr
### Blogging & Speaking
Blogging, speaking about, or creating tutorials about one of Appwrites many features. Mention [@appwrite_io](https://twitter.com/appwrite_io) on Twitter and/or email team [at] appwrite [dot] io so we can give pointers and tips and help you spread the word by promoting your content on the different Appwrite communication channels. Please add your blog posts and videos of talks to our [Awesome Appwrite]() repo on GitHub.
Blogging, speaking about, or creating tutorials about one of Appwrites many features. Mention [@appwrite_io](https://twitter.com/appwrite_io) on Twitter and/or email team [at] appwrite [dot] io so we can give pointers and tips and help you spread the word by promoting your content on the different Appwrite communication channels. Please add your blog posts and videos of talks to our [Awesome Appwrite](https://github.com/appwrite/awesome-appwrite) repo on GitHub.
### Presenting at Meetups
@ -198,5 +297,5 @@ Submitting documentation updates, enhancements, designs, or bug fixes. Spelling
### Helping Someone
Searching for Appwrite on Discord, GitHub or StackOverflow and helping someone else who needs help. You can also help by reaching others how to contribute to Appwrite's repo!
Searching for Appwrite on Discord, GitHub, or StackOverflow and helping someone else who needs help. You can also help by reaching others how to contribute to Appwrite's repo!

View file

@ -14,11 +14,11 @@
[![Twitter Account](https://badgen.net/twitter/follow/appwrite_io?label=twitter)](https://twitter.com/appwrite_io)
[![Follow Appwrite on StackShare](https://badgen.net/badge/follow%20on/stackshare/blue)](https://stackshare.io/appwrite)
Appwrite is an end-to-end backend server for Web, Mobile, Native, or Backend apps packaged as a set of Docker microservices. Appwrite abstract the complexity and repetitiveness required to build a modern backend API from scratch to allow you to build secure apps faster.
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 & multiple sign-in methods, a database for storing and querying users and team data, storage and file management, image manipulation, schedule CRON tasks, and [more services](https://appwrite.io/docs).
[https://appwrite.io](https://appwrite.io)
Find out more at: [https://appwrite.io](https://appwrite.io)
![Appwrite](public/images/github.png)
@ -29,6 +29,7 @@ Table of Contents:
- [Windows](#windows)
- [CMD](#cmd)
- [PowerShell](#powershell)
- [Upgrade from an Older Version](#upgrade-from-an-older-version)
- [Getting Started](#getting-started)
- [Services](#services)
- [SDKs](#sdks)
@ -41,7 +42,7 @@ Table of Contents:
## Installation
Appwrite backend server is designed to run in a container 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 like Kubernetes, Docker Swarm or Rancher.
Appwrite backend server is designed to run in a container 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 like 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](https://www.docker.com/products/docker-desktop) installed on your machine:
@ -82,15 +83,19 @@ Once the Docker installation completes, go to http://localhost to access the App
For advanced production and custom installation, check out our Docker [environment variables](docs/tutorials/environment-variables.md) docs. You can also use our public [docker-compose.yml](https://appwrite.io/docker-compose.yml) file to manually set up and 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](https://appwrite.io/docs/installation).
## Getting Started
Getting started with Appwrite is as easy as creating a new project, choosing your platform and integrating its SDK in your code. You can easily get started with your platform of choice by reading one of our Getting Started tutorials.
Getting started with Appwrite is as easy as creating a new project, choosing your platform, and integrating its SDK in your code. You can easily get started with your platform of choice by reading one of our Getting Started tutorials.
* [Getting Started for Web](https://appwrite.io/docs/getting-started-for-web)
* [Getting Started for Flutter](https://appwrite.io/docs/getting-started-for-flutter)
* [Getting Started for Server](https://appwrite.io/docs/getting-started-for-server)
* Getting Started for Android (soon...)
* Getting Started for iOS (soon...)
* Getting Started for Android (Coming soon...)
* Getting Started for iOS (Coming soon...)
### Services
@ -131,7 +136,7 @@ We truly ❤️ pull requests! If you wish to help, you can learn more about how
## Security
For security issues, kindly email us [security@appwrite.io](mailto:security@appwrite.io) instead of posting a public issue in GitHub.
For security issues, kindly email us at [security@appwrite.io](mailto:security@appwrite.io) instead of posting a public issue in GitHub.
## Follow Us

View file

@ -11,4 +11,4 @@
## Reporting a Vulnerability
For security issues, kindly email us security@appwrite.io instead of posting a public issue in GitHub.
For security issues, kindly email us at security@appwrite.io instead of posting a public issue in GitHub.

View file

@ -15,4 +15,6 @@ return [
'targeta-shopping' => __DIR__.'/credit-cards/tarjeta-shopping.png',
'union-china-pay' => __DIR__.'/credit-cards/union-china-pay.png',
'visa' => __DIR__.'/credit-cards/visa.png',
'mir' => __DIR__.'/credit-cards/mir.png',
'maestro' => __DIR__.'/credit-cards/maestro.png',
];

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 626 KiB

View file

@ -44,7 +44,7 @@ return [
'CR' => 'Costa Rica',
'CU' => 'Kuba',
'CY' => 'Ciprus',
'CZ' => 'Tsjeggiese Republiek',
'CZ' => 'Tsjeggië',
'DE' => 'Duitsland',
'DJ' => 'Djiboeti',
'DM' => 'Dominica',
@ -195,4 +195,4 @@ return [
'ZA' => 'Suid-Afrika',
'ZM' => 'Zambia',
'ZW' => 'Zimbabwe',
];
];

View file

@ -44,7 +44,7 @@ return [
'CR' => 'Costa Rica',
'CU' => 'Cuba',
'CY' => 'Chipre',
'CZ' => 'República Checa',
'CZ' => 'Chequia',
'DE' => 'Alemania',
'DJ' => 'Yibuti',
'DM' => 'Dominica',

View file

@ -44,7 +44,7 @@ return [
'CR' => 'Kosta Rika',
'CU' => 'Kuba',
'CY' => 'Kýpros',
'CZ' => 'Kekkoslovakia',
'CZ' => 'Kekkia',
'DE' => 'Týskland',
'DJ' => 'Djibouti',
'DM' => 'Dominika',

View file

@ -44,7 +44,7 @@ return [
'CR' => 'Costa Rica',
'CU' => 'Cuba',
'CY' => 'Chypre',
'CZ' => 'République Tchèque',
'CZ' => 'Tchéquie',
'DE' => 'Allemagne',
'DJ' => 'Djibouti',
'DM' => 'Dominique',

View file

@ -13,7 +13,6 @@ return [
'AU' => 'ऑस्ट्रेलिया',
'AT' => 'ऑस्ट्रिया',
'AZ' => 'अजरबैजान',
'BI' => 'बुरुंडी',
'BE' => 'बेल्जियम',
'BJ' => 'बेनिन',

View file

@ -44,7 +44,7 @@ return [
'CR' => 'Costa Rica',
'CU' => 'Cuba',
'CY' => 'Cipro',
'CZ' => 'Repubblica Ceca',
'CZ' => 'Cechia',
'DE' => 'Germania',
'DJ' => 'Gibuti',
'DM' => 'Dominica',

View file

@ -44,7 +44,7 @@ return [
'CR' => 'Kosta Rika',
'CU' => 'Kuba',
'CY' => 'Qipro',
'CZ' => 'Republika Czecheke',
'CZ' => 'Çekia',
'DE' => 'Gjermani',
'DJ' => 'Djibouti',
'DM' => 'Dominica',
@ -195,4 +195,4 @@ return [
'ZA' => 'Afrika e Jugut',
'ZM' => 'Zambia',
'ZW' => 'Zimbabve',
];
];

View file

@ -44,7 +44,7 @@ return [
'CR' => 'Kosta Rika',
'CU' => 'Küba',
'CY' => 'Güney Kıbrıs Rum Kesimi',
'CZ' => 'Çek Cumhuriyeti',
'CZ' => 'Çekya',
'DE' => 'Almanya',
'DJ' => 'Cibuti',
'DM' => 'Dominika',

View file

@ -224,5 +224,14 @@ return [ // Ordered by ABC.
'form' => false,
'beta' => false,
'mock' => true,
],
'wordpress' => [
'name' => 'WordPress',
'developers' => 'https://developer.wordpress.com/docs/oauth2/',
'icon' => 'icon-wordpress',
'enabled' => true,
'form' => false,
'beta' => false,
'mock' => false
]
];

View file

@ -3,7 +3,7 @@
/**
* Init
*
* Inializes both Appwrite API entry point, queue workers, and CLI tasks.
* Initializes both Appwrite API entry point, queue workers, and CLI tasks.
* Set configuration, framework resources, app constants
*
*/

View file

@ -236,16 +236,16 @@
</form>
</span>
<img data-ls-attrs="src={{env.API}}/avatars/browsers/{{session.client.short_name|lowercase}}?width=120&height=120&project={{env.PROJECT}},title={{session.client.name}},alt={{session.client.name}}" class="avatar trans pull-start margin-end" />
<img onerror="this.onerror=null;this.src='/images/unknown.svg'" data-ls-attrs="src={{env.API}}/avatars/browsers/{{session.client.short_name|lowercase}}?width=120&height=120&project={{env.PROJECT}},title={{session.client.name}},alt={{session.client.name}}" class="avatar trans pull-start margin-end" />
<span data-ls-bind="{{session.client.name}}"></span> <span data-ls-bind="{{session.client.version}}"></span> on <span data-ls-bind="{{session.model}}"></span> <span data-ls-bind="{{session.OS.name}}"></span> <span data-ls-bind="{{session.OS.version}}"></span>
<span data-ls-if="({{session.client.name}})" data-ls-bind="{{session.client.name}}"></span> <span data-ls-if="(!{{session.client.name}})">Unknown</span> <span data-ls-bind="{{session.client.version}}"></span> on <span data-ls-bind="{{session.model}}"></span> <span data-ls-if="(!{{session.OS.name}})">Unknown</span> <span data-ls-if="({{session.OS.name}})" data-ls-bind="{{session.OS.name}}"></span> <span data-ls-bind="{{session.OS.version}}"></span>
&nbsp;
<span data-ls-if="true == {{session.current}}">
<span class="tag green">Current Session</span>
</span>
<div class="margin-top-small">
<img data-ls-attrs="src={{env.API}}/avatars/flags/{{session.geo.isoCode}}?width=80&height=80&project={{env.PROJECT}}" class="avatar xxs margin-end-small inline" />
<img onerror="this.onerror=null;this.src='/images/unknown.svg'" data-ls-attrs="src={{env.API}}/avatars/flags/{{session.geo.isoCode}}?width=80&height=80&project={{env.PROJECT}}" class="avatar xxs margin-end-small inline" />
<small data-ls-bind="{{session.ip}}"></small> / <small data-ls-bind="{{session.geo.country}}"></small>
</div>
</li>
@ -294,11 +294,11 @@
<td data-title="Date: "><span data-ls-bind="{{log.time|date-time}}"></span></td>
<td data-title="Event: "><span data-ls-bind="{{log.event}}"></span></td>
<td data-title="Client: ">
<img data-ls-attrs="src={{env.API}}/avatars/browsers/{{log.client.short_name|lowercase}}?width=80&height=80&project={{env.PROJECT}},title={{log.client.name}},alt={{log.client.name}}" class="avatar xxs inline margin-end-small" />
<img onerror="this.onerror=null;this.src='/images/unknown.svg'" data-ls-attrs="src={{env.API}}/avatars/browsers/{{log.client.short_name|lowercase}}?width=80&height=80&project={{env.PROJECT}},title={{log.client.name}},alt={{log.client.name}}" class="avatar xxs inline margin-end-small" />
<span data-ls-bind="{{log.client.name}} {{log.client.version}} on {{log.model}} {{log.OS.name}} {{log.OS.version}}"></span>
</td>
<td data-title="Location: ">
<img data-ls-attrs="src={{env.API}}/avatars/flags/{{log.geo.isoCode}}?width=80&height=80&project={{env.PROJECT}}" class="avatar xxs inline margin-end-small" />
<img onerror="this.onerror=null;this.src='/images/unknown.svg'" data-ls-attrs="src={{env.API}}/avatars/flags/{{log.geo.isoCode}}?width=80&height=80&project={{env.PROJECT}}" class="avatar xxs inline margin-end-small" />
<span data-ls-bind="{{log.geo.country}}"></span>
</td>
<td data-title="IP: "><span data-ls-bind="{{log.ip}}"></span></td>

View file

@ -179,12 +179,12 @@
<button class="danger">Logout</button>
</form>
<img data-ls-attrs="src={{env.API}}/avatars/browsers/{{session.client.short_name|lowercase}}?width=120&height=120&project={{env.PROJECT}},title={{session.client.name}},alt={{session.client.name}}" class="avatar trans pull-start margin-end" />
<img onerror="this.onerror=null;this.src='/images/unknown.svg'" data-ls-attrs="src={{env.API}}/avatars/browsers/{{session.client.short_name|lowercase}}?width=120&height=120&project={{env.PROJECT}},title={{session.client.name}},alt={{session.client.name}}" class="avatar trans pull-start margin-end" />
<span data-ls-bind="{{session.client.name}}"></span> <span data-ls-bind="{{session.client.version}}"></span> on <span data-ls-bind="{{session.model}}"></span> <span data-ls-bind="{{session.OS.name}}"></span> <span data-ls-bind="{{session.OS.version}}"></span>
<span data-ls-if="({{session.client.name}})" data-ls-bind="{{session.client.name}}"></span> <span data-ls-if="(!{{session.client.name}})">Unknown</span> <span data-ls-bind="{{session.client.version}}"></span> on <span data-ls-bind="{{session.model}}"></span> <span data-ls-if="(!{{session.OS.name}})">Unknown</span> <span data-ls-if="({{session.OS.name}})" data-ls-bind="{{session.OS.name}}"></span> <span data-ls-bind="{{session.OS.version}}"></span>
<div class="margin-top-small">
<img data-ls-attrs="src={{env.API}}/avatars/flags/{{session.geo.isoCode}}?width=80&height=80&project={{env.PROJECT}}" class="avatar xxs margin-end-small inline" />
<img onerror="this.onerror=null;this.src='/images/unknown.svg'" data-ls-attrs="src={{env.API}}/avatars/flags/{{session.geo.isoCode}}?width=80&height=80&project={{env.PROJECT}}" class="avatar xxs margin-end-small inline" />
<small data-ls-bind="{{session.ip}}"></small> / <small data-ls-bind="{{session.geo.country}}"></small>
</div>
</li>
@ -239,11 +239,11 @@
<td data-title="Date: "><span data-ls-bind="{{log.time|date-time}}"></span></td>
<td data-title="Event: "><span data-ls-bind="{{log.event}}"></span></td>
<td data-title="Client: ">
<img data-ls-attrs="src={{env.API}}/avatars/browsers/{{log.client.short_name|lowercase}}?width=80&height=80&project={{env.PROJECT}},title={{log.client.name}},alt={{log.client.name}}" class="avatar xxs inline margin-end-small" />
<img onerror="this.onerror=null;this.src='/images/unknown.svg'" data-ls-attrs="src={{env.API}}/avatars/browsers/{{log.client.short_name|lowercase}}?width=80&height=80&project={{env.PROJECT}},title={{log.client.name}},alt={{log.client.name}}" class="avatar xxs inline margin-end-small" />
<span data-ls-bind="{{log.client.name}} {{log.client.version}} on {{log.model}} {{log.OS.name}} {{log.OS.version}}"></span>
</td>
<td data-title="Location: ">
<img data-ls-attrs="src={{env.API}}/avatars/flags/{{log.geo.isoCode}}?width=80&height=80&project={{env.PROJECT}}" class="avatar xxs inline margin-end-small" />
<img onerror="this.onerror=null;this.src='/images/unknown.svg'" data-ls-attrs="src={{env.API}}/avatars/flags/{{log.geo.isoCode}}?width=80&height=80&project={{env.PROJECT}}" class="avatar xxs inline margin-end-small" />
<span data-ls-bind="{{log.geo.country}}"></span>
</td>
<td data-title="IP: "><span data-ls-bind="{{log.ip}}"></span></td>

View file

@ -28,9 +28,9 @@
<label>Password</label>
<input name="password" type="password" autocomplete="off" placeholder="" required data-forms-password-meter pattern=".{6,}" title="Six or more characters">
<label>Password Again</label>
<label>Confirm Password</label>
<input name="passwordAgain" type="password" autocomplete="off" placeholder="" required data-forms-password-meter pattern=".{6,}" title="Six or more characters">
<button type="submit" class="btn btn-primary"><i class="fa fa-sign-in"></i> Apply</button>
</form>
</div>
</div>

View file

@ -1,3 +1,3 @@
Use this endpoint to send a verification message to your user email address to confirm they are the valid owners of that address. Both the **userId** and **secret** arguments will be passed as query parameters to the URL you have provided to be attached to the verification email. The provided URL should redirect the user back to your app and allow you to complete the verification process by verifying both the **userId** and **secret** parameters. Learn more about how to [complete the verification process](/docs/client/account#updateAccountVerification).
Use this endpoint to send a verification message to your user email address to confirm they are the valid owners of that address. Both the **userId** and **secret** arguments will be passed as query parameters to the URL you have provided to be attached to the verification email. The provided URL should redirect the user back to your app and allow you to complete the verification process by verifying both the **userId** and **secret** parameters. Learn more about how to [complete the verification process](/docs/client/account#updateVerification).
Please note that in order to avoid a [Redirect Attack](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md), the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.

View file

@ -1,6 +1,6 @@
# Adding a New OAuth2 Provider
This document is part of the Appwrite contributors' guide. Before you continue reading this document make sure you have read the [Code of Conduct](../CODE_OF_CONDUCT.md) and the [Contributing Guide](../CONTRIBUTING.md).
This document is part of the Appwrite contributors' guide. Before you continue reading this document make sure you have read the [Code of Conduct](https://github.com/appwrite/appwrite/blob/master/CODE_OF_CONDUCT.md) and the [Contributing Guide](https://github.com/appwrite/appwrite/blob/master/CONTRIBUTING.md).
## Getting Started

View file

@ -22,7 +22,7 @@ This is your server private secret key that is used to encrypt all sensitive dat
### _APP_STORAGE_LIMIT
Maximun file size allowed for file upload. The deafult value is 100MB limitation. You should pass your size limit value in bytes.
Maximum file size allowed for file upload. The default value is 100MB limitation. You should pass your size limit value in bytes.
### _APP_STORAGE_ANTIVIRUS

View file

@ -0,0 +1 @@
### Thats Your Place To create Your First Issue

View file

@ -26,7 +26,7 @@ Appwrite was built with scalability in mind. Appwrite can potentially scale hori
Appwrite uses a few containers to run, where each container has its job. Most of the Appwrite containers are stateless, and in order to scale them, all you need is run multiple instances of them and setup a load balancer in front of them.
If you decide to set up a load balancer for a specific container, make sure that the containers that are trying to communicate with him are accessing him trough a load balancer and not directly. All connections between Appwrite different containers are set using Docker environment variables.
If you decide to set up a load balancer for a specific container, make sure that the containers that are trying to communicate with it are accessing it through a load balancer and not directly. All connections between Appwrite different containers are set using Docker environment variables.
There are three Appwrite containers that do keep their state are the MariaDB, Redis, and InfluxDB containers that are used for storing data, cache, and stats (in this order). To scale them out, all you need to do is set up a standard cluster (just like you would with any other app using these technologies) according to your needs and performance.
@ -34,7 +34,7 @@ There are three Appwrite containers that do keep their state are the MariaDB, Re
Sending emails is hard. There are a lot of SPAM rules and configurations to master in order to set a functional SMTP server. The SMTP server that comes packaged with Appwrite is great for development but needs some work done to function well against SPAM filters. You can find some guidelines in this [tutorial]([https://www.digitalocean.com/community/tutorials/how-to-use-an-spf-record-to-prevent-spoofing-improve-e-mail-reliability](https://www.digitalocean.com/community/tutorials/how-to-use-an-spf-record-to-prevent-spoofing-improve-e-mail-reliability)).
Another **easier option** is to use an SMTP as a service product like [Sendgrid]([https://sendgrid.com/](https://sendgrid.com/)) or [Mailgun]([https://www.mailgun.com/](https://www.mailgun.com/)). You can change Appwrite SMTP settings and credentials to any 3rrd party provider you like who support SMTP integration using our [Docker environment variables]([https://github.com/appwrite/appwrite/blob/master/docs/tutorials/environment-variables.md#smtp](https://github.com/appwrite/appwrite/blob/master/docs/tutorials/environment-variables.md#smtp)). Most services offer a decent free tier to get started with.
Another **easier option** is to use an SMTP as a service product like [Sendgrid]([https://sendgrid.com/](https://sendgrid.com/)) or [Mailgun]([https://www.mailgun.com/](https://www.mailgun.com/)). You can change Appwrite SMTP settings and credentials to any 3rd party provider you like who support SMTP integration using our [Docker environment variables]([https://github.com/appwrite/appwrite/blob/master/docs/tutorials/environment-variables.md#smtp](https://github.com/appwrite/appwrite/blob/master/docs/tutorials/environment-variables.md#smtp)). Most services offer a decent free tier to get started with.
## Backups
@ -42,4 +42,4 @@ Backups are highly recommended for any production environment. Currently, there
1. Create a script to backups and restore your MariaDB Appwrite schema. Note that trying to backup MariaDB using a docker volume backup can result in a corrupted copy of your data. It is recommended to use MariaDB or MySQL built-in tools for this.
2. Create a script to backups and restore your InfluxDB stats. If you dont care much about your server stats, you can skip this.
3. Create a script to backup Appwrite storage volume. There are many [online resources]([https://blog.ssdnodes.com/blog/docker-backup-volumes/](https://blog.ssdnodes.com/blog/docker-backup-volumes/)) explaining different ways to backup a docker volume. When running on multiple servers, it is very recommended to use an attachable storage point. Some cloud providers offer integrated backups to such attachable mount, some of them are GCP, AWS, DigitalOcean, and the list continues.
3. Create a script to backup Appwrite storage volume. There are many [online resources]([https://blog.ssdnodes.com/blog/docker-backup-volumes/](https://blog.ssdnodes.com/blog/docker-backup-volumes/)) explaining different ways to backup a docker volume. When running on multiple servers, it is very recommended to use an attachable storage point. Some cloud providers offer integrated backups to such attachable mount like GCP, AWS, DigitalOcean, and the list continues.

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

25
public/images/unknown.svg Normal file
View file

@ -0,0 +1,25 @@
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN"
"http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
<svg version="1.0" xmlns="http://www.w3.org/2000/svg"
width="1024.000000pt" height="1024.000000pt" viewBox="0 0 1024.000000 1024.000000"
preserveAspectRatio="xMidYMid meet">
<g transform="translate(0.000000,1024.000000) scale(0.100000,-0.100000)"
fill="#96b7eb" stroke="none">
<path d="M5000 10143 c-904 -20 -1805 -293 -2565 -776 -1163 -740 -1970 -1911
-2240 -3252 -68 -337 -96 -634 -96 -1000 0 -483 55 -896 180 -1350 268 -971
836 -1854 1609 -2501 868 -726 1911 -1129 3032 -1173 700 -27 1388 85 2020
331 1324 514 2364 1554 2878 2878 197 508 309 1052 331 1610 42 1074 -243
2099 -830 2983 -742 1118 -1887 1889 -3194 2152 -354 71 -756 106 -1125 98z
m375 -673 c778 -48 1359 -279 1826 -728 377 -361 594 -768 676 -1267 25 -156
25 -525 -1 -680 -36 -221 -88 -386 -182 -583 -175 -368 -480 -723 -1099 -1281
-310 -279 -556 -524 -649 -647 -84 -111 -194 -331 -235 -474 -51 -175 -81
-419 -97 -803 l-7 -157 -506 2 -506 3 1 300 c1 508 55 822 199 1160 175 408
417 696 1105 1316 645 582 814 806 890 1181 39 188 26 461 -31 653 -122 415
-477 811 -894 997 -252 113 -552 162 -849 138 -373 -29 -659 -142 -929 -368
-301 -253 -521 -690 -621 -1237 -19 -103 -25 -120 -42 -122 -10 -2 -253 26
-539 60 l-520 62 3 60 c3 73 43 289 83 447 98 390 273 757 497 1043 84 107
305 322 417 405 120 90 277 185 402 245 446 213 1020 311 1608 275z m355
-8130 l0 -600 -600 0 -600 0 0 600 0 600 600 0 600 0 0 -600z"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.5 KiB

View file

@ -0,0 +1,136 @@
<?php
namespace Appwrite\Auth\OAuth2;
use Appwrite\Auth\OAuth2;
// Reference Material
// https://developer.wordpress.com/docs/wpcc/
class WordPress extends OAuth2
{
/**
* @var array
*/
protected $user = [];
/**
* @var array
*/
protected $scopes = [
'auth',
];
/**
* @return string
*/
public function getName():string
{
return 'wordpress';
}
/**
* @return string
*/
public function getLoginURL():string
{
return 'https://public-api.wordpress.com/oauth2/authorize?'. \http_build_query([
'client_id' => $this->appID,
'redirect_uri' => $this->callback,
'response_type' => 'code',
'scope' => $this->getScopes(),
'state' => \json_encode($this->state)
]);
}
/**
* @param string $code
*
* @return string
*/
public function getAccessToken(string $code):string
{
$accessToken = $this->request(
'POST',
'https://public-api.wordpress.com/oauth2/token',
[],
\http_build_query([
'client_id' => $this->appID,
'redirect_uri' => $this->callback,
'client_secret' => $this->appSecret,
'grant_type' => 'authorization_code',
'code' => $code
])
);
$accessToken = \json_decode($accessToken, true);
if (isset($accessToken['access_token'])) {
return $accessToken['access_token'];
}
return '';
}
/**
* @param $accessToken
*
* @return string
*/
public function getUserID(string $accessToken):string
{
$user = $this->getUser($accessToken);
if (isset($user['ID'])) {
return $user['ID'];
}
return '';
}
/**
* @param $accessToken
*
* @return string
*/
public function getUserEmail(string $accessToken):string
{
$user = $this->getUser($accessToken);
if (isset($user['email']) && $user['verified']) {
return $user['email'];
}
return '';
}
/**
* @param $accessToken
*
* @return string
*/
public function getUserName(string $accessToken):string
{
$user = $this->getUser($accessToken);
if (isset($user['username'])) {
return $user['username'];
}
return '';
}
/**
* @param string $accessToken
*
* @return array
*/
protected function getUser(string $accessToken)
{
if (empty($this->user)) {
$this->user = \json_decode($this->request('GET', 'https://public-api.wordpress.com/rest/v1/me', ['Authorization: Bearer '.$accessToken]), true);
}
return $this->user;
}
}