-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- add CONTRIBUTING.md - add libs and apps readme - Update docs folder and add outline models and plugins document
- Loading branch information
Showing
7 changed files
with
264 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
# Contributing | ||
|
||
## About the architecture | ||
|
||
Most of the code is written using Typescript, the [official Typescript documentation](https://www.typescriptlang.org/docs/home.html) is a good resource to learn about it. | ||
|
||
The Flogo Web UI follows a regular client-server model and as such it is divided into two principal components: the server and the client. | ||
|
||
The server application (located under [`/apps/server`](/apps/server)) is a NodeJs application. Besides persisting data, the server application wraps the [Flogo CLI](https://github.com/project-flogo/cli) to interact with and underlying Flogo engine project and exposes its functionality to the client application. | ||
|
||
The client application (located under [`/apps/client`](/apps/client)) is implemented using the [Angular](https://angular.io/) framework and provides a broswer based UI to design Flogo applications. | ||
|
||
Communication between server and client is mostly done through a REST API exposed by the server. | ||
|
||
You can find more information in the [application docs](/docs) like an explanation of the | ||
[directory structure](./libs/). Also there's more information in the README file of the server and client apps. | ||
|
||
## Server Environment | ||
|
||
Before starting the server copy and rename the [`.env.example`](/.env.example) to `.env`. Add or modify/uncomment | ||
the environment variables defined in created `.env` file. | ||
|
||
You can alternatively set regular environment variables the way your OS supports them. | ||
|
||
## Testing | ||
|
||
### Before running the tests | ||
|
||
Make sure your dependencies are up to date: | ||
|
||
```sh | ||
yarn install | ||
``` | ||
|
||
### Running the tests | ||
|
||
From the project root: | ||
|
||
```sh | ||
yarn test | ||
``` | ||
|
||
This will run the unit test for all the sub packages. | ||
|
||
### Running tests for a single subpackage | ||
|
||
From the project root: | ||
|
||
```sh | ||
yarn test <name-of-the-package> | ||
``` | ||
|
||
For example | ||
|
||
```sh | ||
yarn test parser | ||
``` | ||
|
||
## Style guide and code conventions | ||
|
||
### Code formatting | ||
|
||
Flogo Web uses [Prettier](https://prettier.io/) for code formatting which will automatically format javascript, typescript, css, html and markdown files. | ||
|
||
The easiest way to format your code is directly in your code editor, refer to [Prettier's documentation for Editor Integration](https://prettier.io/docs/en/editors.html) for | ||
an explanation of how to set them up. | ||
|
||
Alternatively you can run the `format` script which will format, to all files in the project: | ||
|
||
```bash | ||
yarn format | ||
``` | ||
|
||
## Other tasks | ||
|
||
All the commands listed in the following subsections are specified as `<command>: description` and they can be run from | ||
the root of the project as: | ||
|
||
```sh | ||
yarn run <command> | ||
``` | ||
|
||
### Managing engine/local data | ||
|
||
- `clean:local`: Clean ALL your local data. This will remove the engine, database and logs. | ||
- `clean:engines`: Remove the local engines only. This will force the server to rebuild the engine on next startup. | ||
|
||
### Misc | ||
|
||
- `update-global-flogo`: Update global flogo-cli to the latest available | ||
|
||
Flogo Web uses npm/yarn scripts for its build process. Take a look at README.md of the packages as well as at the scripts section | ||
in the `package.json` of the root project and the subpackages to find other commands available. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# Flogo Web Client Application | ||
|
||
### Style Guides for Reference | ||
|
||
Refer to the following style guides if need be: | ||
|
||
- [JavaScript Style Guide](https://google-styleguide.googlecode.com/svn/trunk/javascriptguide.xml) | ||
- [HTML/CSS Style Guide](https://google-styleguide.googlecode.com/svn/trunk/htmlcssguide.xml) | ||
- [Angular Style Guide](https://angular.io/guide/styleguide) | ||
|
||
## Code conventions | ||
|
||
Follow the official [Angular Style Guide](https://angular.io/guide/styleguide). | ||
|
||
## Unit and Integration tests | ||
|
||
Read [angular's official testing guide](https://angular.io/guide/testing) and about the [different types of testing](https://vsavkin.com/three-ways-to-test-angular-2-components-dcea8e90bd8d). | ||
|
||
DO NOT import the TranslateModule directly, instead use the [language testing utilities](/libs/lib-client/language/testing) under `@flogo-web/lib-client/language/testing`. | ||
|
||
Run tests | ||
|
||
```bash | ||
# from project root | ||
yarn test client | ||
``` | ||
|
||
Run tests and watch for changes | ||
|
||
```bash | ||
# from project root | ||
yarn test client --watch | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
# Documents | ||
|
||
- [Project Structure](./project-structure.md) | ||
- [Interaction with the Flogo engine](./engine-interaction.md) | ||
- [Models](./models.md) | ||
- [Plugins](./plugins.md) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# Models | ||
|
||
This documents details the structure of the internal models in the Flogo Web UI and the differences when compared to the [Flogo core app model](https://github.com/project-flogo/core/blob/master/docs/model.md). | ||
|
||
The import and export process makes sure that a standard Flogo App Model can be converted into the internal Flogo Web app model and viceversa. | ||
|
||
## Unique Names and Id Normalization | ||
|
||
TBD | ||
|
||
## Apps | ||
|
||
[Application interface](../libs/core/src/lib/interfaces/app.ts) | ||
|
||
## Triggers | ||
|
||
[Triggers](../libs/core/src/lib/interfaces/trigger.ts) | ||
|
||
## Handlers | ||
|
||
[Handlers](../libs/core/src/lib/interfaces/trigger.ts) | ||
|
||
## Resources | ||
|
||
[Resources](../libs/core/src/lib/interfaces/resource.ts) | ||
|
||
## Contributions | ||
|
||
[Contributions](../libs/core/src/lib/interfaces/contributions) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# Plugins | ||
|
||
## What's a plugin | ||
|
||
## Server vs client | ||
|
||
## Server Plugins | ||
|
||
### How to create a server plugin | ||
|
||
### Server interface | ||
|
||
### Resource type | ||
|
||
### Resource hooks | ||
|
||
### How to register a server plugin | ||
|
||
## Client Plugins | ||
|
||
### How to create a client plugin | ||
|
||
### How to register a client plugin | ||
|
||
### Interacting with the client shell and its services | ||
|
||
<!-- Explanation about the plugin architecture --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters