hycop 0.3.32
hycop: ^0.3.32 copied to clipboard
Hycop Framework
Hycop is a package for web applications that want to use PAS services provided by firebase or appwrite.
Features #
Hycop allows you to use the following 6 services provided by firebase or appwrite .
Database RealTime Serverless function Account Storage *SocketIO
(*SocketIO is not a service provided by Firebase or Appwrite, but a service created by us.)
Getting started #
Example program will connect our demo server ( Firebase or Appwrite ) You can run demo program in example folder such as follows
% cd example % flutter run -d chrome
Usage #
Please refer to the follwing example pages
-
Database example/app/databse_example_page.dart
-
RealTime example/app/real_example_page.dart
-
Storage example/app/storage_example_page.dart
-
Serverless function example/app/function_example_page.dart
-
Account example/app/login_page.dart
example/app/register_page.dart
example/app/reset_password_confirm_page.dart
example/app/user_example_page.dart -
SocketIO example/app/socketio_example_page.dart
-
For Configuration example/assets/hycop_config_example.json
Example program will connect our demo server ( Firbase or Appwrite ) If you want to have your own firebase or Appwrite server, Follow the instruction below.
- Using Firebase Server Case, Create a firebase account as follows
1.1 In Firebase console
- Create Your Project
- Register Your app
- Create Your firestore database
- Create Your firebase database (realtime database)
- Create Your storage
- Create Your functions
1.2 In your source code
- Create a "hycop_config.json" file under the your assets folder and fill in the values. You can refer to "example/assets/hycop_config_example.json" file and you need to specify "hycop_config.json" in your pubspec.yaml file
- Using Appwrite Server Case, Create a Your own Appwrite Servera as follows
2.1 Install Docker Install Docker for your OS according to a commonly known method. Docker must be installed on a server with at least 4G of memory. A server can use https only if it has a domain name.
2.2 Install appwrite Install appwrite by referring to the description on the appwrite.io homepage.
2.3 Appwrite settings If you connect to the address of the appwrite server using a web browser, you can access the Appwrite console.
- When connecting for the first time, enter your ID and password.
- Create Project
- Create Database
Unlike firebase, the necessary collections must be created here. When creating a collections, do not forget to give appropriate read and write privileges. To use RealTime Service, the 'hycop_delta' collection must be created. To use Account Service, the 'hycop_user' collection must be created. The schemas for hycop_user and hycop_delta are in the 'example/assets/collection_hycop_delta.json' and 'example/assets/collection_hycop_user.json'file.
- Create API Key
- Create Function If necessary, you can create a Serverless function by following the instructions on the Appwrite.io page.
- You need to create 'hycop_config.json' file with firebase or appwrite server information and put it in your assets folder.
The 'hycop_config.json' file can be created by referring to the example/assets/hycop_config_example.json file. Of course you need to add the 'hycop_config.json' file to assets entry in your'pubspec.yaml' file.
Additional information #
Run #
cd example flutter run -d chrome --web-renderer html
or #
flutter run -d chrome --web-renderer canvaskit