I tried using the open source and self-hostable BaaS platform 'Appwrite'



When developing a web service or smartphone application, it is necessary to prepare a back-end server that manages accounts and data in addition to the application itself, but it takes considerable man-hours to build a back-end system from scratch. will do. This is where a service called 'Backend as a Service (BaaS)' that makes it easy to use commonly used backend systems from APIs is a service. Various BaaS have appeared with the spread of web applications and smartphone applications, but ' Appwrite ' is developed as open source and can be hosted by yourself, so it is a BaaS that can keep data in-house. .. I actually used it to see what it was like.

Appwrite --Open-Source End-to-End Backend Server

https://appwrite.io/

Go to the Appwrite page and click Get Started.



Then, you will be guided to the installation method using

Docker . This time, we will install it on a PC running Windows, so copy the 'PowerShell' code.



Open PowerShell, paste the code as is, and press Enter.



The data required to build the Docker image will be downloaded.



After the download is complete, you will need to make initial settings for Appwrite.



You will be asked to set the HTTP port number, HTTPS port number, secret key, host name, etc. used on the server, but this time all the settings were completed by repeatedly pressing the Enter key with the standard settings. When the setting is completed, docker compose will start, so wait for a while.



If 'App write installed successfully' is output, the setup is complete.



When I opened the browser and accessed 'http: // localhost /', I was automatically redirected to the account registration screen.



Enter your 'Name', 'Email Address' and 'Password', check the agreement to the terms of use, and click 'Sign Up'.



First, click 'Create Project' to create a new project.



Enter the project name and click 'Create'.



The dashboard screen will appear, so scroll down.



Click 'Add Platform' because there is an add platform menu at the bottom.



In addition to web apps, Appwrite also supports development using Flutter and native iOS / Android apps. In addition, there are plans to support Unity. This time I will try it with a web app, so click 'New Web App'.



Enter the 'App Name' and 'Host Name' and click 'Register'.



Next, we will make settings on the client side. Open 'Settings' from the menu on the left and copy 'Project ID' ...



Set it in the Project ID field of the code below in the 'User Registration' tutorial of Appwrite, name it appropriately and save it. This time I saved it as 'index.js'.

[code] import {Appwrite} from'appwrite';

// Initialize Web SDK
const appwrite = new Appwrite ();

appwrite
.setEndpoint ('http: // localhost / v1') // Appwrite endpoint
.setProject ('623f86ab9650e1d37f56') // project ID
;

// user registration
appwrite
.account.create ('unique ()','[email protected]','password','Jane Doe')
.then (response => {
console.log (response);
}, error => {
console.log (error);
}); [/ code]



In addition, execute the following code in preparation for using the Appwrite library.

[code] npm init -y
npm install appwrite [/ code]



This time it was a test use, so I ran it with

babel-node instead of the browser. When executed, the response shown below will be returned.



When I checked the 'Users' field of Appwrite, the user I entered earlier was registered.



As you can see, Appwrite is an easily self-hostable BaaS service. In addition to documenting the APIs that can be used, including user management, Appwrite has the following functions and features.

◆ Database
It saves the document in JSON format and also comes with search and access control features.

◆ Authentication / User
It is an authentication system that can use multiple login methods.

◆ Storage
You can upload, download and preview the file.

◆ Functions
You can customize your app with the ability to run back-end code in a secure quarantine environment.

◆ GEO & Location
You can get the user's location information.

◆ Console
You can visually check the usage status of the backend API on the web.

◆ Privacy
By using the self-host, the data will not be leaked to the outside.

◆ Security
End-to-end security is ensured for storage and transfer.

in Review,   Mobile,   Web Service,   Web Application, Posted by log1d_ts