Merge remote-tracking branch 'MasterApp/develop' into develop
No files matched your search
@@ -0,0 +1,26 @@
|
||||
# Logs
|
||||
logs
|
||||
*.log
|
||||
npm-debug.log*
|
||||
|
||||
# dotenv environment variables file
|
||||
.env
|
||||
.env.prod
|
||||
|
||||
# Visual Studio Code
|
||||
.vscode
|
||||
|
||||
#Mac specific files
|
||||
.DS_Store
|
||||
client/package-lock.json
|
||||
|
||||
|
||||
docker-compose\.demo\.yml
|
||||
|
||||
docker-compose\.demo_with_prisma\.yml
|
||||
|
||||
env_demo/
|
||||
|
||||
client/\.env-demo
|
||||
|
||||
docker-compose\.demo\.prisma\.yml
|
||||
@@ -0,0 +1,34 @@
|
||||
# Changelog
|
||||
All notable changes to this project will be documented in this file.
|
||||
|
||||
## [Unreleased]
|
||||
### Changed
|
||||
- [List changes here for upcoming release]
|
||||
|
||||
## 0.1.4 - 2019-01-17
|
||||
### Change
|
||||
- Both: Migrate to superalgos.org
|
||||
|
||||
## 0.1.3 - 2018-12-17
|
||||
### Change
|
||||
- Client: Fix newsletter signup notification integration
|
||||
|
||||
## 0.1.2 - 2018-12-16
|
||||
### Change
|
||||
- Client: Upgrade Material-ui to fix webpack deepmerge import bug
|
||||
|
||||
## 0.1.1 - 2018-12-16
|
||||
### Changed
|
||||
- Update Master Client integration with Notifications Module
|
||||
|
||||
## 0.1.0 - 2018-12-14
|
||||
### Added
|
||||
- Notifications Module - Sending notifications such as emails, messages to client, etc
|
||||
- Reintroduced CORS whitelist
|
||||
- Created CHANGELOG — for the logging of changes
|
||||
|
||||
### Removed
|
||||
- Removed Sendgrid Mutations (moved to notifications module)
|
||||
|
||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
@@ -0,0 +1,46 @@
|
||||
# Contributor Covenant Code of Conduct
|
||||
|
||||
## Our Pledge
|
||||
|
||||
In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.
|
||||
|
||||
## Our Standards
|
||||
|
||||
Examples of behavior that contributes to creating a positive environment include:
|
||||
|
||||
* Using welcoming and inclusive language
|
||||
* Being respectful of differing viewpoints and experiences
|
||||
* Gracefully accepting constructive criticism
|
||||
* Focusing on what is best for the community
|
||||
* Showing empathy towards other community members
|
||||
|
||||
Examples of unacceptable behavior by participants include:
|
||||
|
||||
* The use of sexualized language or imagery and unwelcome sexual attention or advances
|
||||
* Trolling, insulting/derogatory comments, and personal or political attacks
|
||||
* Public or private harassment
|
||||
* Publishing others' private information, such as a physical or electronic address, without explicit permission
|
||||
* Other conduct which could reasonably be considered inappropriate in a professional setting
|
||||
|
||||
## Our Responsibilities
|
||||
|
||||
Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.
|
||||
|
||||
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
|
||||
|
||||
## Scope
|
||||
|
||||
This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.
|
||||
|
||||
## Enforcement
|
||||
|
||||
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team using the online form in the contacts page of the superalgos.org website. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
|
||||
|
||||
Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.
|
||||
|
||||
## Attribution
|
||||
|
||||
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version]
|
||||
|
||||
[homepage]: http://contributor-covenant.org
|
||||
[version]: http://contributor-covenant.org/version/1/4/
|
||||
@@ -0,0 +1,9 @@
|
||||
# Contributing
|
||||
|
||||
We are thrilled you are interested in contributing to this repository. Your help may be essential to the project's success and we want you in!
|
||||
|
||||
Superalgos is a collective project, currently at a very early stage. We not only welcome contributions but may even choose to incentivize relevant contributions via the project's native crypto token.
|
||||
|
||||
Please read the [Join the Dev Team]( https://superalgos.org/developers-join-dev-team.shtml) page in our website to learn more about how you may become a relevant member of the Community and even make a living out of contributing code to the project.
|
||||
|
||||
Contributions are deemed _voluntary work_, irrespective of the incentives that may be in place, and are subject to the conditions described in the LICENSE
|
||||
@@ -0,0 +1,201 @@
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright [yyyy] [name of copyright owner]
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
@@ -0,0 +1,78 @@
|
||||
# MasterApp
|
||||
The Master App is an application layer that wraps the client-side web modules of the various Superalgos platform modules (Users, Teams, KeyVault, Events, etc).
|
||||
It provides, to these modules, an authentication layer and GraphQL data layer, among other commonly used utilities and APIs.
|
||||
|
||||
Each client-side module is published as an NPM package and their function is best described as a
|
||||
React higher-order component encasing their given module use cases.
|
||||
|
||||
## Developing with the Master App
|
||||
|
||||
### Getting Started
|
||||
|
||||
Clone the repo.
|
||||
|
||||
```
|
||||
git clone https://github.com/Superalgos/MasterApp.git
|
||||
cd MasterApp
|
||||
```
|
||||
|
||||
**Setup Server**
|
||||
|
||||
```
|
||||
cd server
|
||||
npm install
|
||||
```
|
||||
Rename `.env.example` to `.env`
|
||||
|
||||
Start the server:
|
||||
|
||||
```
|
||||
npm run start
|
||||
```
|
||||
The Graphql Playground will be viewable at [http://localhost:4100/graphql](http://localhost:4100/graphql)
|
||||
|
||||
**Setup Client**
|
||||
|
||||
In another CLI window, navigate to the MasterApp/client
|
||||
|
||||
```
|
||||
cd ../client
|
||||
npm install
|
||||
```
|
||||
|
||||
Rename `.env.example` to `.env`. Get Auth0 Client ID from team member
|
||||
|
||||
Start the client:
|
||||
|
||||
```
|
||||
npm run dev
|
||||
|
||||
# or if on windows
|
||||
npm run dev_win
|
||||
```
|
||||
|
||||
### Working with existing modules
|
||||
|
||||
Using the `npm link` command, we can develop a module locally before publishing as a package on npm.
|
||||
|
||||
In the client of the module to be developed:
|
||||
|
||||
```
|
||||
npm link
|
||||
```
|
||||
|
||||
Make note of the module package name — the name in the module's client package.json. *e.g. @superalgos/key-vault-client*
|
||||
|
||||
In the Master app client dir link the developing module:
|
||||
|
||||
```
|
||||
# in MasterApp/client
|
||||
npm link <module-package-name>
|
||||
|
||||
e.g.
|
||||
npm link @superalgos/key-vault-client
|
||||
```
|
||||
|
||||
### Starting a new module
|
||||
|
||||
*We are currently developing a boilerplate that will accelerate starting a new module and works easily within the MasterApp.*
|
||||
@@ -0,0 +1,12 @@
|
||||
# Ignore files to be uploaded to the image
|
||||
.env*
|
||||
.git
|
||||
.gitignore
|
||||
Dockerfile
|
||||
Dockerfile.prod
|
||||
README.md
|
||||
CODE_OF_CONDUCT.md
|
||||
CONTRIBUTING.md
|
||||
|
||||
/coverage
|
||||
/.nyc_output
|
||||
@@ -0,0 +1,12 @@
|
||||
NODE_ENV=production
|
||||
PORT=3100
|
||||
|
||||
PLATFORM_API_URL=http://localhost:4100/graphql
|
||||
CANVAS_URL=http://localhost:4101/
|
||||
|
||||
AUTH0_DOMAIN=superalgos.eu.auth0.com
|
||||
AUTH0_AUDIENCE=https://auth-local.superalgos.org
|
||||
AUTH0_ISSUER=https://superalgos.eu.auth0.com/
|
||||
AUTH0_CLIENTID=jfendNx2Vpa3LJa58x8lEmoPTG3nJV3B
|
||||
AUTH0_CALLBACK_URL=http://localhost:3100/callback
|
||||
AUTH0_LOGOUT_URL=http://localhost:3100
|
||||
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"settings": {
|
||||
"react": {
|
||||
"pragma": "React",
|
||||
"version": "16.0"
|
||||
}
|
||||
},
|
||||
"extends": ["standard", "standard-react"],
|
||||
"rules":{
|
||||
"react/prop-types": 0
|
||||
},
|
||||
"env": {
|
||||
"browser": true
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
[ignore]
|
||||
node_modules
|
||||
|
||||
[libs]
|
||||
flow-typed
|
||||
|
||||
[lints]
|
||||
|
||||
[options]
|
||||
module.name_mapper='.*\(.scss\)' -> 'empty/object'
|
||||
module.name_mapper='.*\(.css\)' -> 'empty/object'
|
||||
module.name_mapper='^src/\(.*\)$' -> '<PROJECT_ROOT>/src/\1'
|
||||
|
||||
suppress_comment=\\(.\\|\n\\)*\\$FlowIssue
|
||||
suppress_type=$FlowIssue
|
||||
suppress_type=$FlowFixMe
|
||||
suppress_type=$FixMe
|
||||
|
||||
[strict]
|
||||
@@ -0,0 +1,29 @@
|
||||
# Logs
|
||||
logs
|
||||
*.log
|
||||
npm-debug.log*
|
||||
|
||||
# Dependency directories
|
||||
node_modules/
|
||||
|
||||
# Optional npm cache directory
|
||||
.npm
|
||||
|
||||
# dotenv environment variables file
|
||||
.env
|
||||
.env.dev
|
||||
.env.prod
|
||||
|
||||
# Build folder js files
|
||||
build*
|
||||
dist/
|
||||
|
||||
# Visual Studio Code
|
||||
.vscode
|
||||
|
||||
#Mac specific files
|
||||
.DS_Store
|
||||
|
||||
#yalc npm link
|
||||
.yalc
|
||||
yalc.lock
|
||||
@@ -0,0 +1,46 @@
|
||||
# Contributor Covenant Code of Conduct
|
||||
|
||||
## Our Pledge
|
||||
|
||||
In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.
|
||||
|
||||
## Our Standards
|
||||
|
||||
Examples of behavior that contributes to creating a positive environment include:
|
||||
|
||||
* Using welcoming and inclusive language
|
||||
* Being respectful of differing viewpoints and experiences
|
||||
* Gracefully accepting constructive criticism
|
||||
* Focusing on what is best for the community
|
||||
* Showing empathy towards other community members
|
||||
|
||||
Examples of unacceptable behavior by participants include:
|
||||
|
||||
* The use of sexualized language or imagery and unwelcome sexual attention or advances
|
||||
* Trolling, insulting/derogatory comments, and personal or political attacks
|
||||
* Public or private harassment
|
||||
* Publishing others' private information, such as a physical or electronic address, without explicit permission
|
||||
* Other conduct which could reasonably be considered inappropriate in a professional setting
|
||||
|
||||
## Our Responsibilities
|
||||
|
||||
Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.
|
||||
|
||||
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
|
||||
|
||||
## Scope
|
||||
|
||||
This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.
|
||||
|
||||
## Enforcement
|
||||
|
||||
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at feedback at superalgos dot org. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
|
||||
|
||||
Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.
|
||||
|
||||
## Attribution
|
||||
|
||||
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version]
|
||||
|
||||
[homepage]: http://contributor-covenant.org
|
||||
[version]: http://contributor-covenant.org/version/1/4/
|
||||
@@ -0,0 +1,45 @@
|
||||
# Contributing
|
||||
|
||||
We are thrilled you are interested in contributing to this repository. Your help may be essential to the project's success and we want you in!
|
||||
|
||||
Superalgos.org is an open source project, currently at a very early stage. Although this repository is not open source software yet, we do welcome contributions from the community.
|
||||
|
||||
Contributions are deemed _voluntary work_. There might be incentives in place for certain kinds of contributions. Contact us for more information in this regards.
|
||||
|
||||
In any case, contributors agree to provide an express grant of patent rights for their contributions. Submitting Pull Requests to this repository represents an express agreement with the terms of our Balanced Contributor Intellectual Property Agreement. This agreement is a direct implementation of GitHub's [Balanced Employee Intellectual Property Agreement 1.0.1](https://github.com/github/balanced-employee-ip-agreement/blob/master/Balanced_Employee_IP_Agreement.md).
|
||||
|
||||
# Balanced Contributor Intellectual Property Agreement 1.0.1
|
||||
|
||||
This BALANCED CONTRIBUTOR INTELLECTUAL PROPERTY AGREEMENT is between person or team submitting Pull Requests to this repository and Superalgos.org ("Company").
|
||||
|
||||
**What is this?** This is the Company's Intellectual Property Agreement ("Agreement"). If you've worked in the technology space before, there's a good chance that you've run across one or more of these in the past. This document is the official, entire and exclusive agreement on what intellectual property ("IP") is yours, and what belongs to the Company.
|
||||
|
||||
**Why is this?** The Company needs to be clear on what IP it owns and has rights to. Its customers, contributors, and investors depend on the Company having the legal rights to the products and services it is providing so that the Company can continue operating and doing business.
|
||||
|
||||
The Company also believes that it's important to be clear on what it doesn't own. The Company doesn't want you looking over your shoulder every time you work on something personal or worrying that the Company will someday seize your open source non-lethal mousetrap simulation software. In other words, the Company isn't interested in appropriating your personal projects.
|
||||
|
||||
**Read this.** Please read this document and be sure you understand it before you submit any Pull Requests. Due to legal risk and corporate obligations, the Company cannot, by and large, negotiate its terms. If you feel you have a particular circumstance that keeps you from signing, please let the Company's legal department ("Legal") know. And, of course, you're always free and encouraged to get your own legal counsel to explain anything you're not clear on.
|
||||
|
||||
Cool? Then, by submitting your first Pull Request, and as a condition of your contribution, you agree to the following:
|
||||
|
||||
1. **What the Company owns.** The Company owns any IP ("Company IP") that you create, or help create _as its contributor_, but only if it meets one or more of these additional conditions: The IP was (i) related to an existing or prospective Company product or service at the time you developed, invented, or created it, (ii) developed for use by the Company, or (iii) developed or promoted with existing Company IP or with the Company's endorsement. You hereby grant and assign, and will grant and assign, to the Company all rights and interests in all Company IP.
|
||||
|
||||
"Company IP" includes concepts, designs, developments, discoveries, ideas, improvements, inventions, trade secrets, trademarks, and works of authorship.
|
||||
|
||||
2. **What the Company doesn't own.** If you create IP that doesn't fit into one of the categories listed above, the Company doesn't own it. In other words, the Company doesn't own concepts, designs, developments, discoveries, ideas, improvements, inventions, trade secrets, trademarks, or works of authorship that you develop, invent, or create that do not meet any of the conditions in Section 1.
|
||||
|
||||
3. **Contribution of your IP to Company projects.** If you include your own IP � such as IP you created prior to working for the Company � into a Company product or service, it's still yours, of course, but you grant the Company a non-exclusive, irrevocable, fully paid-up, royalty-free, perpetual, sublicensable, transferable, worldwide license to use it without restriction in any way or implementation, in modified form, or as is, by itself, or incorporated into another product or service ("License"). If you include your name in any project over which the Company would have rights under this Agreement, such as in a copyright notice or a comment in code or documentation, then the License covers the rights associated with that use of your name as well.
|
||||
|
||||
4. **Your contributions to non-Company projects.** The Company recognizes that you may be engaged in work that requires you to submit IP to entities other than the Company, such as open source projects used by the Company. Please make sure that Legal is aware of what you're working on so that Legal can help with any licensing issues. If any project asks you to sign a contribution agreement, you should check with Legal before doing so. These agreements may be legally binding on the Company and so should be run through Legal first.
|
||||
|
||||
5. **Voluntary Works** All Company IP that you are involved with or create as part of your work for the Company is voluntary work which does not require compensation. There might be incentives in place for certain kinds of contributions. Feel free to contact the Company to learn more.
|
||||
|
||||
6. **No conflicts.** You agree that you don't have any outstanding agreements or obligations that conflict with those in this Agreement, and that you won't enter into conflicting agreements in the future.
|
||||
|
||||
7. **IP protection.** The Company might someday need to show the work that went into the development of IP that it uses or has used, or to make government filings to establish that it owns the IP or has rights over it. To help in those situations, you agree not to destroy any records you maintain relating to the development of any Company IP or IP under License (together, "All IP"), and, if the Company asks, to provide those records to the Company. You agree to help the Company secure and defend its rights in All IP. For your help the Company will compensate you at a reasonable rate. If the Company is unable to secure your help, you authorize the Company to act on your behalf (as your agent and attorney-in-fact) in securing all rights related to All IP.
|
||||
|
||||
8. **Confidentiality.** As an contributor or contractor of the Company, you will have access to sensitive confidential information that is important to the Company's business. You are responsible for keeping this information confidential, including after you end your work for the Company.
|
||||
|
||||
"Confidential Information" includes non-public technical details about our products or services, financial information, business strategies and forecasts, customer data, or any other information, data or know-how that is valuable to the Company because it is not publicly known.
|
||||
|
||||
The Company's Confidential Information is sensitive and we expect that you'll treat it as such. You agree to only use the Company's Confidential Information for the purpose of performing your contribution and for the benefit of the Company. You will do your best to keep Confidential Information secret. If you are not sure if something is Confidential Information, you should assume that it is, until you can confirm otherwise.
|
||||
@@ -0,0 +1,3 @@
|
||||
FROM duluca/minimal-nginx-web-server
|
||||
COPY ./default /etc/nginx/sites-enabled/default
|
||||
COPY ./build /var/www
|
||||
@@ -0,0 +1,5 @@
|
||||
FROM duluca/minimal-nginx-web-server
|
||||
COPY ./default /etc/nginx/sites-enabled/default
|
||||
COPY . /var/www
|
||||
CMD 'nginx'
|
||||
|
||||
@@ -0,0 +1,201 @@
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright [yyyy] [name of copyright owner]
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
@@ -0,0 +1,21 @@
|
||||
module.exports = (api) => {
|
||||
api.cache(true)
|
||||
|
||||
const presets = [
|
||||
'@babel/preset-env',
|
||||
'@babel/preset-react'
|
||||
]
|
||||
|
||||
const plugins = [
|
||||
'react-hot-loader/babel',
|
||||
'@babel/plugin-proposal-class-properties',
|
||||
'@babel/plugin-syntax-dynamic-import',
|
||||
'dynamic-import-node',
|
||||
['@babel/plugin-transform-runtime', { useESModules: true }]
|
||||
]
|
||||
|
||||
return {
|
||||
presets,
|
||||
plugins
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
server {
|
||||
listen 3100;
|
||||
|
||||
root /var/www;
|
||||
index index.html index.htm;
|
||||
|
||||
# Make site accessible from http://localhost/
|
||||
server_name localhost;
|
||||
|
||||
# Add 1 week expires header for static assets
|
||||
location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ {
|
||||
expires 1w;
|
||||
}
|
||||
|
||||
location / {
|
||||
# First attempt to serve request as file, then
|
||||
# as directory, then fall back to redirecting to index.html
|
||||
try_files $uri $uri/ /index.html;
|
||||
}
|
||||
|
||||
# If nginx can't find a file, fallback to the homepage.
|
||||
location @root {
|
||||
rewrite .* / redirect;
|
||||
}
|
||||
|
||||
include /etc/nginx/basic.conf;
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
version: '3'
|
||||
services:
|
||||
node:
|
||||
image: masterapp-client-dev:v1
|
||||
build:
|
||||
context: .
|
||||
dockerfile: ./Dockerfile.prod
|
||||
args:
|
||||
APP_PATH: /var/www
|
||||
environment:
|
||||
- NODE_ENV=production
|
||||
- APP_PATH=/var/www
|
||||
- PROD_GRAPHQL=https://platform-api-dev.advancedalgos.net/graphql
|
||||
- VIRTUAL_HOST=platform-dev.advancedalgos.net
|
||||
- LETSENCRYPT_HOST=platform-dev.advancedalgos.net
|
||||
- LETSENCRYPT_EMAIL=ssl-certificates@advancedalgos.org
|
||||
- VIRTUAL_PORT=3100
|
||||
container_name: masterapp-client-dev
|
||||
tty: true
|
||||
stdin_open: true
|
||||
working_dir: ${APP_PATH}
|
||||
command: ['nginx']
|
||||
restart: always
|
||||
expose:
|
||||
- 3100
|
||||
network_mode: webproxy
|
||||
networks:
|
||||
default:
|
||||
external:
|
||||
name: webproxy
|
||||
|
After Width: | Height: | Size: 758 B |
@@ -0,0 +1,69 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Superalgos Platform</title>
|
||||
<meta name="description"
|
||||
content="The system enabling a collective of humans and machines to collaborate and compete while co-building trading algorithms.">
|
||||
<meta http-equiv="x-ua-compatible" content="ie=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta name="mobile-web-app-capable" content="yes">
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
<link
|
||||
href="https://fonts.googleapis.com/css?family=Saira+Condensed:300,600|Saira:300,600&subset=latin-ext,vietnamese"
|
||||
rel="stylesheet">
|
||||
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.0.13/css/all.css"
|
||||
integrity="sha384-DNOHZ68U8hZfKXOrtjWvjxusGo9WQnrNx2sqG0tfsghAvtVlRW3tvkXWZh58N9jp" crossorigin="anonymous">
|
||||
<link rel="shortcut icon" type="image/png/ico" href="/favicon.ico" />
|
||||
|
||||
<script src="https://unpkg.com/apollo-client-browser@1.7.0"></script>
|
||||
<script src="https://unpkg.com/axios/dist/axios.min.js"></script>
|
||||
|
||||
<script type="text/javascript" src="<%= process.env.CANVAS_URL %>Scripts/require.js"></script>
|
||||
<script type="text/javascript" src="<%= process.env.CANVAS_URL %>Scripts/AppPreLoader.js"></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
function loadCanvas() {
|
||||
if (window.canvasApp.visible === undefined) {
|
||||
window.canvasApp = {
|
||||
version: '1.0.0', // This is used to avoid catching problems at the browser level.
|
||||
sessionToken: '',
|
||||
executingAt: 'Master App',
|
||||
visible: false,
|
||||
topMargin: 130,
|
||||
urlPrefix: '<%= process.env.CANVAS_URL %>',
|
||||
graphQL: {
|
||||
masterAppApiUrl: '<%= process.env.PLATFORM_API_URL %>',
|
||||
},
|
||||
context: {}
|
||||
};
|
||||
|
||||
try {
|
||||
loadAdvancedAlgosPlatform();
|
||||
}
|
||||
catch (err) {
|
||||
console.log("[ERROR] MasterApp -> Index -> CanvasApp can not be started. Please check that AAWeb is running.");
|
||||
console.log("[ERROR] MasterApp -> Index -> err = " + err);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function onResize() {
|
||||
if (window.canvasApp === undefined) { return }
|
||||
if (window.canvasApp.eventHandler === undefined) { return }
|
||||
window.canvasApp.eventHandler.raiseEvent('Browser Resized')
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body id="body" onload="loadCanvas()" style=" margin: 0; height: 100%;" onresize="onResize()">
|
||||
|
||||
<div id="masterApp"></div>
|
||||
<div id="canvasApp"></div>
|
||||
<div id="textAreaDiv"></div>
|
||||
<div id="inputDiv"></div>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -0,0 +1,114 @@
|
||||
{
|
||||
"name": "@superalgos/master-app",
|
||||
"version": "0.1.0",
|
||||
"description": "Responsible for loading all web modules and running them.",
|
||||
"author": "Superalgos, ltd.",
|
||||
"license": "Apache-2.0",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/Superalgos/MasterApp.git"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/Superalgos/MasterApp/issues"
|
||||
},
|
||||
"homepage": "https://github.com/Superalgos/MasterApp#readme",
|
||||
"main": "src/index.js",
|
||||
"scripts": {
|
||||
"dev": "NODE_ENV=development webpack-dev-server --hot --port 3100 --config ./webpack.config.js",
|
||||
"build": "NODE_ENV=production webpack --mode production --config ./webpack.config.js",
|
||||
"dev_win": "webpack-dev-server --hot --port 3100 --config ./webpack.config.js",
|
||||
"build_win": "webpack --mode production --config ./webpack.config.js",
|
||||
"lint": "prettier-standard 'src/**/*.js'",
|
||||
"flow-coverage": "npm run flow-coverage:build && npm run flow-coverage:open",
|
||||
"flow-coverage:build": "flow-coverage-report --strict-coverage ",
|
||||
"flow-coverage:open": "concurrently \"cd flow-coverage && http-server -c-1 \" \"open http://127.0.0.1:8080\"",
|
||||
"flow": "flow"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.1.2",
|
||||
"@babel/plugin-proposal-class-properties": "^7.1.0",
|
||||
"@babel/plugin-syntax-dynamic-import": "^7.0.0",
|
||||
"@babel/plugin-transform-runtime": "^7.1.0",
|
||||
"@babel/preset-env": "^7.1.0",
|
||||
"@babel/preset-react": "^7.0.0",
|
||||
"@superalgos/cockpit-client": "0.0.5",
|
||||
"@superalgos/events-client": "0.0.2",
|
||||
"@superalgos/key-vault-client": "0.0.32",
|
||||
"@superalgos/logs-client": "0.0.1",
|
||||
"@superalgos/operations-client": "0.0.41",
|
||||
"@superalgos/strategizer-client": "0.0.18",
|
||||
"@superalgos/teams-client": "0.0.40",
|
||||
"@superalgos/users-client": "0.0.27",
|
||||
"@superalgos/web-components": "0.0.23",
|
||||
"autoprefixer": "^9.2.0",
|
||||
"babel-loader": "^8.0.4",
|
||||
"babel-preset-flow": "6.23.0",
|
||||
"connect-history-api-fallback": "^1.5.0",
|
||||
"css-loader": "^1.0.0",
|
||||
"debug": "^4.1.0",
|
||||
"dotenv-webpack": "^1.5.7",
|
||||
"eslint": "^5.7.0",
|
||||
"eslint-config-standard": "^12.0.0",
|
||||
"eslint-config-standard-react": "^7.0.2",
|
||||
"eslint-plugin-flowtype": "^2.42.0",
|
||||
"eslint-plugin-import": "^2.14.0",
|
||||
"eslint-plugin-node": "^7.0.1",
|
||||
"eslint-plugin-promise": "^4.0.1",
|
||||
"eslint-plugin-react": "^7.11.1",
|
||||
"eslint-plugin-standard": "^4.0.0",
|
||||
"file-loader": "^2.0.0",
|
||||
"flow-bin": "0.79.1",
|
||||
"html-webpack-harddisk-plugin": "^0.2.0",
|
||||
"html-webpack-plugin": "^3.2.0",
|
||||
"koa-connect": "^2.0.1",
|
||||
"node-sass": "^4.12.0",
|
||||
"postcss-loader": "^3.0.0",
|
||||
"prettier-standard": "^8.0.1",
|
||||
"react-hot-loader": "^4.3.11",
|
||||
"script-ext-html-webpack-plugin": "^2.0.1",
|
||||
"webpack": "^4.20.2",
|
||||
"webpack-cli": "^3.1.2",
|
||||
"webpack-dev-server": "^3.1.14",
|
||||
"webpack-merge": "^4.1.4"
|
||||
},
|
||||
"standard": {
|
||||
"parser": "babel-eslint",
|
||||
"ignore": [
|
||||
"dist/",
|
||||
"build/"
|
||||
]
|
||||
},
|
||||
"dependencies": {
|
||||
"@fortawesome/fontawesome-svg-core": "^1.2.8",
|
||||
"@fortawesome/free-brands-svg-icons": "^5.5.0",
|
||||
"@fortawesome/free-solid-svg-icons": "^5.5.0",
|
||||
"@fortawesome/react-fontawesome": "^0.1.3",
|
||||
"@material-ui/core": "^3.6.2",
|
||||
"@material-ui/icons": "^3.0.1",
|
||||
"apollo-cache-inmemory": "^1.3.5",
|
||||
"apollo-client": "^2.5.1",
|
||||
"apollo-link": "^1.2.3",
|
||||
"apollo-link-context": "^1.0.9",
|
||||
"apollo-link-error": "^1.1.1",
|
||||
"apollo-link-http": "^1.5.5",
|
||||
"auth0-lock": "^11.10.0",
|
||||
"babel-plugin-dynamic-import-node": "^2.2.0",
|
||||
"classnames": "^2.2.6",
|
||||
"esm": "^3.2.25",
|
||||
"graphql": "^14.0.2",
|
||||
"graphql-tag": "^2.10.0",
|
||||
"jwt-decode": "^2.2.0",
|
||||
"mini-css-extract-plugin": "^0.4.4",
|
||||
"npm": "^6.9.0",
|
||||
"optimize-css-assets-webpack-plugin": "^5.0.1",
|
||||
"prop-types": "^15.6.2",
|
||||
"query-string": "^6.2.0",
|
||||
"react": "^16.8.6",
|
||||
"react-apollo": "^2.5.2",
|
||||
"react-dom": "^16.8.4",
|
||||
"react-redux": "^5.1.0",
|
||||
"react-router-dom": "^4.3.1",
|
||||
"redux": "^4.0.1",
|
||||
"uglifyjs-webpack-plugin": "^2.0.1"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
module.exports = {
|
||||
plugins: [
|
||||
require('autoprefixer')
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,101 @@
|
||||
import { ApolloProvider } from 'react-apollo'
|
||||
import React from 'react'
|
||||
import { Route, BrowserRouter, Switch } from 'react-router-dom'
|
||||
import { hot } from 'react-hot-loader'
|
||||
|
||||
import MuiThemeProvider from '@material-ui/core/styles/MuiThemeProvider'
|
||||
import CssBaseline from '@material-ui/core/CssBaseline'
|
||||
import { withStyles } from '@material-ui/core/styles'
|
||||
import { theme, globalStyles } from './styles'
|
||||
import './styles/styles.scss'
|
||||
|
||||
import { client } from './graphql/apollo'
|
||||
import Auth from './auth'
|
||||
|
||||
import { Layout, Home, Charts, Callback, EmailSignupConfirm } from './views'
|
||||
|
||||
import Users from '@superalgos/users-client'
|
||||
import Teams from '@superalgos/teams-client'
|
||||
import Events from '@superalgos/events-client'
|
||||
import KeyVault from '@superalgos/key-vault-client'
|
||||
import Operations from '@superalgos/operations-client'
|
||||
import Strategizer from '@superalgos/strategizer-client'
|
||||
import Logs from '@superalgos/logs-client'
|
||||
import Cockpit from '@superalgos/cockpit-client'
|
||||
|
||||
export const auth = new Auth(
|
||||
result => console.log('Authentication successful.'),
|
||||
client
|
||||
)
|
||||
|
||||
export const MasterApp = props => (
|
||||
<BrowserRouter>
|
||||
<ApolloProvider client={client}>
|
||||
<MuiThemeProvider theme={theme}>
|
||||
<CssBaseline />
|
||||
<Layout auth={auth}>
|
||||
<Switch>
|
||||
<Route exact path='/' component={Home} />
|
||||
<Route
|
||||
path='/callback'
|
||||
render={props => {
|
||||
return <Callback {...props} />
|
||||
}}
|
||||
/>
|
||||
<Route
|
||||
path='/email-verification'
|
||||
render={props => {
|
||||
console.log(props.location)
|
||||
return (
|
||||
<EmailSignupConfirm
|
||||
{...props}
|
||||
tokenParam={props.location.search}
|
||||
/>
|
||||
)
|
||||
}}
|
||||
/>
|
||||
<Route
|
||||
path='/charts'
|
||||
render={props => <Charts {...props} auth={auth} />}
|
||||
/>
|
||||
<Route
|
||||
path='/users'
|
||||
render={props => <Users {...props} auth={auth} />}
|
||||
/>
|
||||
<Route
|
||||
path='/teams'
|
||||
render={props => <Teams {...props} auth={auth} />}
|
||||
/>
|
||||
<Route
|
||||
path='/events'
|
||||
render={props => <Events {...props} auth={auth} />}
|
||||
/>
|
||||
<Route
|
||||
path='/keys'
|
||||
render={props => <KeyVault {...props} auth={auth} />}
|
||||
/>
|
||||
<Route
|
||||
path='/clones'
|
||||
render={props => <Operations {...props} auth={auth} />}
|
||||
/>
|
||||
<Route
|
||||
path='/strategizer'
|
||||
render={props => <Strategizer {...props} auth={auth} />}
|
||||
/>
|
||||
<Route
|
||||
path='/logs'
|
||||
render={props => <Logs {...props} auth={auth} />}
|
||||
/>
|
||||
<Route
|
||||
path='/cockpit'
|
||||
render={props => <Cockpit {...props} auth={auth} />}
|
||||
/>
|
||||
</Switch>
|
||||
</Layout>
|
||||
</MuiThemeProvider>
|
||||
</ApolloProvider>
|
||||
</BrowserRouter>
|
||||
)
|
||||
|
||||
const StyledMasterApp = withStyles(globalStyles)(MasterApp)
|
||||
export default hot(module)(StyledMasterApp)
|
||||
|
After Width: | Height: | Size: 436 KiB |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 360 96"><defs><style>.cls-1{fill:#fff;}.cls-2{fill:#e3493c;}</style></defs><title>Superalgos-logo-horz-dark</title><g id="Layer_4" data-name="Layer 4"><path class="cls-1" d="M105.33,66.86a30.85,30.85,0,0,1-3.58-.6V61.84a49.59,49.59,0,0,0,5.92.42,11.06,11.06,0,0,0,2.47-.21,2.63,2.63,0,0,0,1.37-.78,3.4,3.4,0,0,0,.65-1.64,17.68,17.68,0,0,0,.18-2.83,24.15,24.15,0,0,0-.18-3.61,2.16,2.16,0,0,0-.8-1.45,6.77,6.77,0,0,0-2.24-.81l-4.41-.88a3.53,3.53,0,0,1-2.78-2.62,23,23,0,0,1-.7-6.57,16.26,16.26,0,0,1,1-6.24,6,6,0,0,1,2.86-3.17,11.16,11.16,0,0,1,4.91-.93,25.48,25.48,0,0,1,4,.28c1.19.2,2,.36,2.57.5v4.46a17,17,0,0,0-2.08-.28c-1-.09-2-.13-3-.13a11.47,11.47,0,0,0-2.78.26,2.19,2.19,0,0,0-1.37.93,3.69,3.69,0,0,0-.63,1.59,17.44,17.44,0,0,0-.15,2.57,20.72,20.72,0,0,0,.15,3,2.29,2.29,0,0,0,.6,1.3,3.23,3.23,0,0,0,1.48.59l3.9.83a7.33,7.33,0,0,1,2.78,1.15,4.9,4.9,0,0,1,1.63,2.59,19.4,19.4,0,0,1,.57,5.77,21.38,21.38,0,0,1-.85,6.83,5.84,5.84,0,0,1-2.68,3.38,10.64,10.64,0,0,1-4.93,1A36.1,36.1,0,0,1,105.33,66.86Z"/><path class="cls-1" d="M143.91,30.93V51a72.1,72.1,0,0,1-.5,10.12,6.77,6.77,0,0,1-2.31,4.52q-1.82,1.41-6,1.41t-6-1.41a6.68,6.68,0,0,1-2.29-4.49A77.15,77.15,0,0,1,126.3,51V30.93h5.3V53.27c0,2.91.06,4.93.18,6.08a3.46,3.46,0,0,0,.88,2.31,3.76,3.76,0,0,0,2.42.6,3.83,3.83,0,0,0,2.46-.6,3.51,3.51,0,0,0,.89-2.31c.12-1.15.18-3.17.18-6.08V30.93Z"/><path class="cls-1" d="M153.51,30.93h9.19a8.12,8.12,0,0,1,5.15,1.38,6.6,6.6,0,0,1,2.26,3.82,31.56,31.56,0,0,1,.54,6.54,31.4,31.4,0,0,1-.52,6.39,6.7,6.7,0,0,1-2.26,3.9,7.89,7.89,0,0,1-5.17,1.45h-3.89V66.67h-5.3Zm8.36,18.71a3.57,3.57,0,0,0,2.32-.6,3.32,3.32,0,0,0,.93-2,28.88,28.88,0,0,0,.23-4.37,28.19,28.19,0,0,0-.23-4.33,3.29,3.29,0,0,0-.93-2,3.63,3.63,0,0,0-2.32-.6h-3.06V49.64Z"/><path class="cls-1" d="M179.28,66.67V30.93h14.07v4.83h-8.73V46.21h7.64V51h-7.64v10.8h8.73v4.83Z"/><path class="cls-1" d="M214.78,66.67l-3.27-13.29h-4V66.67h-5.29V30.93h9.4a8.5,8.5,0,0,1,5.14,1.3A6.17,6.17,0,0,1,219,35.89a29.17,29.17,0,0,1,.55,6.27,26.68,26.68,0,0,1-.63,6.44,5.71,5.71,0,0,1-2.59,3.63l3.89,14.44Zm-1.69-18.54a3,3,0,0,0,.93-1.87,24.61,24.61,0,0,0,.24-4,24.07,24.07,0,0,0-.24-4,2.87,2.87,0,0,0-1-1.87,3.67,3.67,0,0,0-2.28-.58H207.5V48.7h3.28A3.69,3.69,0,0,0,213.09,48.13Z"/><path class="cls-2" d="M243.19,66.67l-1.51-8.57h-7l-1.46,8.57H228l6.44-35.74h7.68l6.45,35.74Zm-4.84-29.92H238l-2.75,16.63h5.82Z"/><path class="cls-2" d="M257,66.67V30.93h5.35V61.79h7.84v4.88Z"/><path class="cls-2" d="M286.87,51.4V46.73H295V66.05a22.89,22.89,0,0,1-3.64.75,30.25,30.25,0,0,1-4,.29q-4.05,0-6-1.43t-2.76-5.25a63.23,63.23,0,0,1-.77-11.61,60.57,60.57,0,0,1,.8-11.58q.81-3.8,2.88-5.25c1.39-1,3.5-1.45,6.34-1.45a26,26,0,0,1,3.66.28,27.48,27.48,0,0,1,3.46.71V36c-1-.17-2.05-.32-3.12-.44a23.88,23.88,0,0,0-2.44-.18,9.28,9.28,0,0,0-4.24.68c-.77.44-1.32,1.56-1.63,3.35A63.63,63.63,0,0,0,283,48.8q0,6.35.29,9a6.46,6.46,0,0,0,1.17,3.64,3.93,3.93,0,0,0,3,.93,10.23,10.23,0,0,0,2.7-.31V51.4Z"/><path class="cls-2" d="M306.66,65.58q-1.91-1.5-2.39-5a95.6,95.6,0,0,1-.5-11.74,95.52,95.52,0,0,1,.5-11.73,7.43,7.43,0,0,1,2.39-5q1.89-1.5,6.26-1.5t6.31,1.5a7.52,7.52,0,0,1,2.39,5,98.19,98.19,0,0,1,.49,11.73,98.27,98.27,0,0,1-.49,11.74q-.5,3.54-2.39,5t-6.31,1.51Q308.55,67.09,306.66,65.58Zm8.9-4c.49-.45.82-1.56,1-3.32s.26-4.92.26-9.46-.09-7.69-.26-9.45-.5-2.88-1-3.32a3.9,3.9,0,0,0-2.64-.68,3.83,3.83,0,0,0-2.63.68c-.47.44-.79,1.55-1,3.32s-.26,4.92-.26,9.45.09,7.69.26,9.46.49,2.87,1,3.32a3.83,3.83,0,0,0,2.63.68A3.9,3.9,0,0,0,315.56,61.58Z"/><path class="cls-2" d="M334.69,66.86a30.48,30.48,0,0,1-3.58-.6V61.84a49.59,49.59,0,0,0,5.92.42,11,11,0,0,0,2.46-.21,2.66,2.66,0,0,0,1.38-.78,3.5,3.5,0,0,0,.65-1.64,17.68,17.68,0,0,0,.18-2.83,24.15,24.15,0,0,0-.18-3.61,2.13,2.13,0,0,0-.81-1.45,6.69,6.69,0,0,0-2.23-.81l-4.41-.88a3.51,3.51,0,0,1-2.78-2.62,23,23,0,0,1-.7-6.57,16.26,16.26,0,0,1,1-6.24,6,6,0,0,1,2.85-3.17,11.19,11.19,0,0,1,4.91-.93,25.52,25.52,0,0,1,4,.28c1.19.2,2,.36,2.57.5v4.46a17,17,0,0,0-2.08-.28c-1-.09-2-.13-3-.13a11.47,11.47,0,0,0-2.78.26,2.24,2.24,0,0,0-1.38.93,3.56,3.56,0,0,0-.62,1.59,17.23,17.23,0,0,0-.16,2.57,20.35,20.35,0,0,0,.16,3,2.17,2.17,0,0,0,.6,1.3,3.19,3.19,0,0,0,1.48.59l3.89.83a7.26,7.26,0,0,1,2.78,1.15,4.91,4.91,0,0,1,1.64,2.59,19.4,19.4,0,0,1,.57,5.77,21.33,21.33,0,0,1-.86,6.83,5.79,5.79,0,0,1-2.67,3.38,10.66,10.66,0,0,1-4.94,1A35.92,35.92,0,0,1,334.69,66.86Z"/><path class="cls-2" d="M46.72,59c1.23-.38,9.08.88,10.13,1.62,3.3,2.33,8.14,3.58,10.08,1.2s-.09-6.47-3.19-9.59c-.92-.94-3.89-8.18-3.75-9.47.44-4.09-.9-9-3.94-9.46s-5.91,3.86-6.64,7.56c-.25,1.29-5.32,7.5-6.48,8-3.67,1.7-7.14,5.24-6,8.11S43.15,60.05,46.72,59Z"/><path class="cls-2" d="M60.38,16.76c4.93.21,7,10.25,6.21,18.12-.25,2.5,5.56,16.57,6.58,18.88A7.82,7.82,0,0,0,76.37,57C72.61,46.77,72.28,38.6,73,36.69c3.21-8.85,1.8-20.77-3-23.53-3.25-1.87-10.33-2.62-14.85,4.8A7.33,7.33,0,0,1,60.38,16.76Z"/><path class="cls-2" d="M20.91,59.57c-2.28-4.39,5.38-11.2,12.6-14.45C35.8,44.09,45.07,32,46.57,30a7.77,7.77,0,0,0,1.17-4.37c-7,8.35-13.86,Line truncated
|
||||
|
After Width: | Height: | Size: 5.2 KiB |
|
After Width: | Height: | Size: 2.5 KiB |
|
After Width: | Height: | Size: 6.4 KiB |
|
After Width: | Height: | Size: 3.0 KiB |
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<browserconfig>
|
||||
<msapplication>
|
||||
<tile>
|
||||
<square150x150logo src="/mstile-150x150.png"/>
|
||||
<TileColor>#da532c</TileColor>
|
||||
</tile>
|
||||
</msapplication>
|
||||
</browserconfig>
|
||||
|
After Width: | Height: | Size: 502 B |
|
After Width: | Height: | Size: 758 B |
|
After Width: | Height: | Size: 15 KiB |
@@ -0,0 +1,9 @@
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png">
|
||||
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">
|
||||
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png">
|
||||
<link rel="manifest" href="/site.webmanifest">
|
||||
<link rel="mask-icon" href="/safari-pinned-tab.svg" color="#e3493c">
|
||||
<meta name="apple-mobile-web-app-title" content="Superalgos">
|
||||
<meta name="application-name" content="Superalgos">
|
||||
<meta name="msapplication-TileColor" content="#da532c">
|
||||
<meta name="theme-color" content="#ffffff">
|
||||
|
After Width: | Height: | Size: 2.5 KiB |
@@ -0,0 +1 @@
|
||||
<svg version="1" xmlns="http://www.w3.org/2000/svg" width="1365.333" height="1365.333" viewBox="0 0 1024.000000 1024.000000"><path d="M685.9 27.4c-.2.2-3 .7-6.1 1-12.6 1.5-34.6 8.5-45.2 14.5-2 1.2-5.3 3.1-7.3 4.2-14.3 8.1-30.2 22.3-43.5 38.8-5.9 7.4-16.2 22.1-15.5 22.1.2 0 3.6-1.7 7.5-3.9 17.4-9.6 28.8-12.1 52.2-11.7 13.4.3 17.7.8 23.1 2.5 25.1 8 45.2 36.6 58.9 83.7 1.8 6 3.3 11.6 3.5 12.4 2.3 10.8 3.5 17.1 4 20 .3 1.9 1 6 1.5 9 1.2 7.3 1.8 11.3 2.5 18.5.4 3.3.8 7.6 1.1 9.5 1.6 14.3 2.2 51.4 1 69.5-1.4 21.3-1.5 26-.5 31 .5 2.7 1.2 6.3 1.5 8 2.3 12.9 20.6 69 33.4 102.5 1.6 4.1 4.8 12.4 7.1 18.5 17.1 45.2 47.3 118.6 49.1 119.3.4.2.8.9.8 1.5.1 3.8 18.3 22 29.2 29.1 4.7 3.1 8.8 5.6 9 5.6.3 0-3.2-10.9-7.7-24.3-4.5-13.3-8.4-25.3-8.7-26.7-.4-1.4-2-7.2-3.7-13-4.3-14.5-12.2-45.3-13.7-54-.3-1.4-.7-3.3-1-4.2-.3-1-.7-3-1-4.5-.2-1.6-.9-4.8-1.4-7.3-.5-2.5-1.4-7.2-2-10.5-.5-3.3-1.2-7.1-1.5-8.5-.3-1.4-1-5.7-1.5-9.5-.6-3.9-1.2-8.1-1.5-9.5-.3-2.3-.7-5.4-2-16.3-3.1-25.8-3.8-58.6-1.5-73.2.7-4.4 2.2-10.7 3.5-14 2.3-6.1 9-28.9 9.9-33.5.3-1.4 1.2-5.2 2-8.5s1.7-7.4 1.9-9c.3-1.7 1.4-8.2 2.6-14.6 1.1-6.3 2.3-14.7 2.6-18.5.4-3.8.9-8.3 1.1-9.9 2.2-16.2 2.2-69.4 0-83.5-.2-1.4-.7-5-1.1-8-6.7-56.6-26.4-102.4-53.1-123.1-11.1-8.5-31-16.4-49.9-19.7-9.6-1.7-38.4-2.9-39.6-1.8zM465 215.4c-2.3 3-9.7 11.7-14.5 17-1.1 1.2-5.6 6.2-10 11.1-8.3 9.3-43.9 45.2-53.5 54-51.1 46.9-108.8 86-132.5 90-2.2.4-4.4.8-5 .9-.5.2-2.8.6-5 1.1-24.5 4.7-70 20.4-91 31.3-2.7 1.4-5.2 2.6-5.5 2.7-.7.1-12.3 6.2-16.7 8.7-2.1 1.2-5.4 3.1-7.5 4.2C62.4 471.4 16.3 519 4.3 559.8.9 571.3.5 590 3.4 603.5c2.6 12.1 7.2 25.6 11.8 35 19.6 39.1 52.7 65.8 95.3 76.8 5.5 1.4 12 2.9 14.5 3.2 2.5.4 5.4.9 6.5 1.1 2.8.5 11.7 1.4 19.5 1.9l6.4.4-3.4-2.1c-20.8-12.5-29.7-21.3-39-38.3-1.8-3.3-4.3-7.8-5.5-10-6.1-11.2-8.2-22.8-6.4-35.1 7.4-48 72.3-111.2 159.4-155 10.5-5.3 21-11.2 23.5-13.1 8.7-6.7 26.9-25.3 45.4-46.3 1.7-2 4.9-5.6 7.1-8.1 2.2-2.4 6-6.9 8.5-9.8 2.5-3 5-5.9 5.5-6.5.6-.6 3-3.6 5.5-6.6 6.5-8 7.1-8.6 15.2-18.5 12.7-15.4 51.5-64.5 61.3-77.6 1.1-1.5 5.9-7.8 10.6-14 11.5-15.2 13.3-18.1 16.8-26.9 3-7.7 3.5-9.3 5.1-19 1.2-7.1 1.9-21.9 1.1-22.4-.3-.2-1.7 1.1-3.1 2.8zM563.9 315c-21.5 5.4-43.9 28.6-59.4 61.3-5.2 11-10.1 24.9-12.5 35.7-2 8.8-6.1 16.2-21 37.4-1.8 2.6-17.8 23.2-20.7 26.6-14.7 17.6-22.4 26.2-31.2 35.1-8.7 8.6-12.2 11.3-19.6 15.2-16.7 8.7-25.6 14.5-37 23.8-22.2 18.1-36.8 38.2-41 56.4-1.6 6.6-2.2 17.6-1.1 19.3.3.5.7 2.1 1 3.7.8 4.3 5.3 12.7 9.1 16.8 10.1 11.1 27.7 18.5 50.5 21.3 12.2 1.5 36.1.8 49-1.6 11.6-2 12.6-2.3 20.5-4.5s31.7-2.2 43.5 0c.8.2 4.4.6 8 1 3.6.4 7.4.9 8.4 1.1 1.1.2 4.2.6 6.9.9 2.8.3 5.3.8 5.6.9.3.2 2.9.7 5.6 1 9.1 1.3 39 7.5 47.9 10.1 8.9 2.6 18.5 7 20.6 9.6 1.9 2.3 30.1 16.5 39.5 20 9.1 3.3 26.6 7.7 33.7 8.6 9.2 1.1 23.9.7 30-.7 19.5-4.6 33.3-18.5 36.3-36.7.7-4.2.8-19 .1-20.1-.2-.4-.7-2.4-1-4.6-1-6.1-5.5-18.3-10.3-28.1-4.2-8.3-15.4-26.1-20.1-31.6-5.8-7-14.5-17-18.6-21.4-2.6-2.8-6.5-8-8.7-11.7-6.3-10.8-17.6-35.1-25.4-55.3-1.5-3.9-3.3-8.4-4-10-1.4-3.5-4.9-12.8-5-13.5 0-.3-1.2-3.7-2.5-7.5-1.3-3.9-2.5-7.5-2.6-8-.1-.6-.9-3.5-1.8-6.6-2.6-8.9-2.8-10-2.6-17.4.7-25.5.3-39.3-1.3-49.5-.3-1.4-.8-4.5-1.2-7-.3-2.4-.8-4.7-1-5.1-.2-.3-.7-2.1-1-4-.9-5.4-6.3-20.6-9.7-27.3-7.5-14.9-16.6-24.9-27.5-30.3-6.3-3.1-8.3-3.6-16-3.9-4.8-.2-10.4.1-12.4.6zM340 752.1c-12.3 2.1-18.9 4.4-31.5 10.7-10.5 5.3-11.8 4.4 13 9.2 69 13.5 135.5 34.9 186.8 60.2 24.5 12.1 41 22.8 49.7 32.3 24.3 26.6 37.9 39.4 60 56.6 50.3 39.2 116.2 69.8 162.5 75.5 2.8.3 6.8.9 9 1.3 4.8.9 28.3.6 34-.3 23.2-4 37.1-11.8 56.6-31.7 33-33.8 46.8-81.2 37.4-128.4-3.2-16-8-29.9-16.2-46.5l-4.2-8.5-.1 8c-.1 4.4-.3 8.7-.4 9.5-.2.8-.6 3.8-1 6.6-1.8 14.4-15.1 40.8-26.4 52.7-17.8 18.7-53.6 23.1-99.2 12.2-5.8-1.4-11.5-2.7-12.6-3-1.2-.3-7.7-2.3-14.5-4.6-36.3-12-78-32.8-111.4-55.7-6-4.1-13-8.4-15.5-9.4-2.5-1.1-5.4-2.3-6.5-2.8-5.6-2.4-39.7-11.2-52.5-13.5-1.9-.3-4.2-.7-5-.9-.8-.1-4-.8-7-1.4-9.8-2-26.4-5.1-30-5.6-3-.5-29.1-4.8-37-6.1-1.4-.2-4.3-.7-6.5-1-6.9-1.1-9.8-1.5-15.5-2.5-3-.5-8.2-1.2-11.5-1.6-3.3-.3-6.2-.7-6.5-.9-.3-.2-4.4-.9-9-1.5-4.7-.6-9.6-1.3-11-1.5-1.4-.2-6.3-.9-11-1.5s-9.6-1.3-11-1.5c-5.9-.8-10.8-1.5-15-2-5.1-.6-9.4-1.2-16-2.1-7.1-.9-20.1-1.1-25-.3z"/></svg>
|
||||
|
After Width: | Height: | Size: 4.0 KiB |
@@ -0,0 +1,19 @@
|
||||
{
|
||||
"name": "Superalgos",
|
||||
"short_name": "Superalgos",
|
||||
"icons": [
|
||||
{
|
||||
"src": "/android-chrome-192x192.png",
|
||||
"sizes": "192x192",
|
||||
"type": "image/png"
|
||||
},
|
||||
{
|
||||
"src": "/android-chrome-512x512.png",
|
||||
"sizes": "512x512",
|
||||
"type": "image/png"
|
||||
}
|
||||
],
|
||||
"theme_color": "#ffffff",
|
||||
"background_color": "#ffffff",
|
||||
"display": "standalone"
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
export const AUTH_CONFIG = {
|
||||
api_audience: process.env.AUTH0_AUDIENCE,
|
||||
domain: process.env.AUTH0_DOMAIN,
|
||||
clientId: process.env.AUTH0_CLIENTID,
|
||||
callbackUrl: process.env.AUTH0_CALLBACK_URL,
|
||||
logoutUrl: process.env.AUTH0_LOGOUT_URL
|
||||
}
|
||||
@@ -0,0 +1,326 @@
|
||||
import Auth0Lock from 'auth0-lock'
|
||||
import gql from 'graphql-tag'
|
||||
import { getItem, setItem } from '../utils/local-storage'
|
||||
import { validObject, deleteCookie, slugify, isEmpty } from '../utils/js-helpers'
|
||||
import Log from '../utils/log'
|
||||
import { client } from '../graphql/apollo'
|
||||
import { AUTH_CONFIG } from './Auth0' // create by renaming Auth0.sample.js to Auth0.js and setting vars
|
||||
|
||||
const AUTHENTICATE = gql`
|
||||
mutation authenticate($idToken: String!) {
|
||||
users_Authenticate(idToken: $idToken) {
|
||||
alias
|
||||
authId
|
||||
}
|
||||
}
|
||||
`
|
||||
|
||||
const VERIFY_TEAM_INVITE = gql`
|
||||
mutation verifyTeamInvite($token: String!) {
|
||||
verifyTeamInvite(token: $token) {
|
||||
email
|
||||
team {
|
||||
slug
|
||||
}
|
||||
}
|
||||
}
|
||||
`
|
||||
const GET_TEAMS_BY_OWNER = gql`
|
||||
query teamsByOwnerQuery {
|
||||
teams_TeamsByOwner {
|
||||
id
|
||||
name
|
||||
slug
|
||||
}
|
||||
}
|
||||
`
|
||||
|
||||
const CREATE_TEAM = gql`
|
||||
mutation CreateTeamMutation($name: String!, $slug: String!, $botName: String!, $botSlug: String!) {
|
||||
teams_CreateTeam(name: $name, slug: $slug, botName: $botName, botSlug: $botSlug) {
|
||||
id
|
||||
name
|
||||
slug
|
||||
}
|
||||
}
|
||||
`
|
||||
|
||||
export const defaultOptions = {
|
||||
oidcConformant: true,
|
||||
autoclose: true,
|
||||
allowedConnections: ['Username-Password-Authentication', 'github'],
|
||||
auth: {
|
||||
sso: true,
|
||||
redirectUrl: window.location.origin + '/callback',
|
||||
responseType: 'token id_token',
|
||||
audience: `${AUTH_CONFIG.api_audience}`,
|
||||
params: {
|
||||
scope: `openid profile email user_metadata app_metadata picture`
|
||||
}
|
||||
},
|
||||
theme: {
|
||||
logo: 'https://aadevelop.blob.core.windows.net/module-master/assets/logos/Superalgos-mark-auth0-lock.png',
|
||||
primaryColor: '#e3493c'
|
||||
},
|
||||
languageDictionary: {
|
||||
title: 'Superalgos Platform'
|
||||
},
|
||||
avatar: null,
|
||||
mustAcceptTerms: true
|
||||
}
|
||||
|
||||
export const inviteOptions = {
|
||||
oidcConformant: true,
|
||||
autoclose: false,
|
||||
allowedConnections: ['Username-Password-Authentication', 'github'],
|
||||
allowShowPassword: true,
|
||||
auth: {
|
||||
sso: false,
|
||||
redirectUrl: window.location.origin + '/callback',
|
||||
responseType: 'token id_token',
|
||||
audience: `${AUTH_CONFIG.api_audience}`,
|
||||
params: {
|
||||
state: '',
|
||||
scope: `email`
|
||||
}
|
||||
},
|
||||
prefill: { email: '' },
|
||||
languageDictionary: {
|
||||
title: 'Superalgos Platform'
|
||||
},
|
||||
avatar: null,
|
||||
mustAcceptTerms: true
|
||||
}
|
||||
|
||||
let lock = new Auth0Lock(
|
||||
AUTH_CONFIG.clientId,
|
||||
AUTH_CONFIG.domain,
|
||||
defaultOptions
|
||||
)
|
||||
|
||||
class Auth {
|
||||
constructor(cb, apolloClient) {
|
||||
this.handleAuthentication()
|
||||
// binds functions to keep this context
|
||||
this.apolloClient = apolloClient
|
||||
this.cb = cb.bind(this)
|
||||
this.login = this.login.bind(this)
|
||||
this.loginInvite = this.loginInvite.bind(this)
|
||||
this.logout = this.logout.bind(this)
|
||||
this.isAuthenticated = this.isAuthenticated.bind(this)
|
||||
this.checkSession = this.checkSession.bind(this)
|
||||
}
|
||||
|
||||
login() {
|
||||
// Call the show method to display the widget.
|
||||
Log.info('logging in')
|
||||
lock.show()
|
||||
}
|
||||
|
||||
async loginInvite(jwt) {
|
||||
let email
|
||||
let team
|
||||
try {
|
||||
const data = await client.mutate({
|
||||
mutation: VERIFY_TEAM_INVITE,
|
||||
variables: { token: jwt }
|
||||
})
|
||||
|
||||
Log.info('auth.loginInvite')
|
||||
Log.info(await data.data.verifyTeamInvite)
|
||||
|
||||
setItem('invite', JSON.stringify(data.data.verifyTeamInvite))
|
||||
|
||||
email = data.data.verifyTeamInvite.email
|
||||
team = data.data.verifyTeamInvite.team.slug
|
||||
} catch (err) {
|
||||
return Log.error(err, 'loginInvite err: ')
|
||||
}
|
||||
inviteOptions.prefill.email = email
|
||||
inviteOptions.auth.params.state = `${email}|${team}`
|
||||
let lockInvite = new Auth0Lock(
|
||||
AUTH_CONFIG.clientId,
|
||||
AUTH_CONFIG.domain,
|
||||
inviteOptions
|
||||
)
|
||||
lockInvite.show()
|
||||
}
|
||||
|
||||
handleAuthentication() {
|
||||
// Add a callback for Lock's `authenticated` event
|
||||
lock.on('authenticated', async (authResult) => {
|
||||
if (authResult && authResult.accessToken && authResult.idToken) {
|
||||
// Set the time that the access token will expire at
|
||||
let expiresAt = JSON.stringify(
|
||||
authResult.expiresIn * 1000 + new Date().getTime()
|
||||
)
|
||||
const data = {
|
||||
status: `success`,
|
||||
accessToken: authResult.accessToken,
|
||||
idToken: authResult.idToken,
|
||||
expiresAt
|
||||
}
|
||||
Log.info('setSession idTokenPayload:')
|
||||
Log.info(authResult.idTokenPayload)
|
||||
|
||||
try {
|
||||
setItem('access_token', authResult.accessToken)
|
||||
setItem('id_token', authResult.idToken)
|
||||
setItem('expires_at', expiresAt)
|
||||
setItem('user', JSON.stringify(user))
|
||||
await this.signinOrCreateAccount({ ...data })
|
||||
this.cb(data)
|
||||
const user = {
|
||||
authId: authResult.idTokenPayload.sub,
|
||||
alias: authResult.idTokenPayload.nickname
|
||||
}
|
||||
|
||||
setItem('access_token', authResult.accessToken)
|
||||
setItem('id_token', authResult.idToken)
|
||||
setItem('expires_at', expiresAt)
|
||||
setItem('user', JSON.stringify(user))
|
||||
window.location.href = '/'
|
||||
return true
|
||||
} catch (err) {
|
||||
console.log('Sign in or create account error.')
|
||||
window.localStorage.removeItem('access_token')
|
||||
window.localStorage.removeItem('id_token')
|
||||
window.localStorage.removeItem('expires_at')
|
||||
window.localStorage.removeItem('user')
|
||||
return false
|
||||
}
|
||||
}
|
||||
})
|
||||
// Add a callback for Lock's `authorization_error` event
|
||||
lock.on('authorization_error', err => {
|
||||
const data = { status: `error`, errMessage: err.error }
|
||||
this.cb(data)
|
||||
})
|
||||
}
|
||||
|
||||
checkSession() {
|
||||
return new Promise((resolve, reject) => {
|
||||
// Add a callback for Lock's `authenticated` event
|
||||
lock.checkSession(
|
||||
{
|
||||
responseType: 'token id_token',
|
||||
audience: AUTH_CONFIG.api_audience,
|
||||
scope: 'openid email profile',
|
||||
connection: 'github',
|
||||
prompt: 'none'
|
||||
},
|
||||
function (err, authResult) {
|
||||
if (!err) {
|
||||
resolve(authResult)
|
||||
} else {
|
||||
reject(err)
|
||||
}
|
||||
}
|
||||
)
|
||||
})
|
||||
}
|
||||
|
||||
async signinOrCreateAccount({ accessToken, idToken, expiresAt }) {
|
||||
const response = await client.mutate({
|
||||
mutation: AUTHENTICATE,
|
||||
variables: { idToken }
|
||||
})
|
||||
Log.info('auth.signinOrCreateAccount data:')
|
||||
Log.info(response)
|
||||
const user = {
|
||||
authId: response.data.users_Authenticate.authId,
|
||||
alias: response.data.users_Authenticate.alias
|
||||
}
|
||||
if (validObject(user, 'alias')) {
|
||||
Log.info(user.alias)
|
||||
const existingTeam = await client.query({
|
||||
query: GET_TEAMS_BY_OWNER
|
||||
})
|
||||
Log.info(existingTeam)
|
||||
Log.info(existingTeam.data.teams_TeamsByOwner)
|
||||
if (validObject(existingTeam.data, 'teams_TeamsByOwner') && isEmpty(existingTeam.data.teams_TeamsByOwner)) {
|
||||
const slug = slugify(user.alias)
|
||||
const newTeam = await client.mutate({
|
||||
mutation: CREATE_TEAM,
|
||||
variables: {
|
||||
name: slug,
|
||||
slug: slug,
|
||||
botName: `bot-${slug}`,
|
||||
botSlug: `bot-${slug}`
|
||||
}
|
||||
})
|
||||
Log.info(newTeam)
|
||||
Log.info(newTeam.data.teams_CreateTeam)
|
||||
if (!validObject(newTeam.data, 'teams_CreateTeam') || isEmpty(newTeam.data.teams_CreateTeam)) {
|
||||
throw newTeam.data.error
|
||||
}
|
||||
Log.info('Team and Bot Creation Success')
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
logout() {
|
||||
// Clear access token and ID token from local storage
|
||||
window.localStorage.removeItem('access_token')
|
||||
window.localStorage.removeItem('user')
|
||||
window.localStorage.removeItem('name')
|
||||
window.localStorage.removeItem('ecosystem')
|
||||
deleteCookie('ajs_anonymous_id')
|
||||
deleteCookie('ajs_user_id')
|
||||
deleteCookie('current_tenant')
|
||||
|
||||
lock.logout({ returnTo: AUTH_CONFIG.logoutUrl })
|
||||
}
|
||||
|
||||
async isAuthenticated() {
|
||||
// check session and run Auth0 SS0
|
||||
const getUser = await getItem('authUser')
|
||||
const getExpires = await getItem('expires_at')
|
||||
let user = JSON.parse(getUser)
|
||||
|
||||
if (new Date().getTime() < getExpires * 1000) {
|
||||
console.log(
|
||||
'handleAuth.user exp: ',
|
||||
user,
|
||||
getExpires,
|
||||
window.location.href
|
||||
)
|
||||
|
||||
return user
|
||||
}
|
||||
|
||||
// TODO improve to check the session validation on client side
|
||||
const checkSSO = await this.checkSession()
|
||||
.then(result => {
|
||||
console.log('handleAuth.checksessions: ', result)
|
||||
const user = {
|
||||
authId: result.idTokenPayload.sub,
|
||||
alias: result.idTokenPayload.nickname
|
||||
}
|
||||
setItem('authUser', JSON.stringify(user))
|
||||
// user confirmed, log into client
|
||||
this.setSession(result)
|
||||
return result.idTokenPayload
|
||||
})
|
||||
.catch(err => {
|
||||
if (err.error === 'login_required') {
|
||||
// If graphql error, update session
|
||||
// otherwise send to login
|
||||
// return this.login()
|
||||
}
|
||||
return err
|
||||
})
|
||||
|
||||
if (/manage|profile|create|dashboard/.test(window.location.href) && !user) {
|
||||
this.login()
|
||||
}
|
||||
|
||||
if (validObject(checkSSO, 'error')) {
|
||||
return false
|
||||
} else {
|
||||
return checkSSO
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export default Auth
|
||||
@@ -0,0 +1,121 @@
|
||||
import gql from 'graphql-tag'
|
||||
|
||||
export const ECOSYSTEM_QUERY = gql`
|
||||
query {
|
||||
web_GetEcosystem {
|
||||
id
|
||||
devTeams {
|
||||
codeName
|
||||
displayName
|
||||
host {
|
||||
url
|
||||
storage
|
||||
container
|
||||
accessKey
|
||||
}
|
||||
bots {
|
||||
codeName
|
||||
displayName
|
||||
type
|
||||
profilePicture
|
||||
repo
|
||||
configFile
|
||||
products{
|
||||
codeName
|
||||
displayName
|
||||
description
|
||||
dataSets{
|
||||
codeName
|
||||
type
|
||||
validPeriods
|
||||
filePath
|
||||
fileName
|
||||
dataRange{
|
||||
filePath
|
||||
fileName
|
||||
}
|
||||
}
|
||||
exchangeList{
|
||||
name
|
||||
}
|
||||
plotter{
|
||||
devTeam
|
||||
codeName
|
||||
moduleName
|
||||
repo
|
||||
}
|
||||
}
|
||||
}
|
||||
plotters {
|
||||
codeName
|
||||
displayName
|
||||
modules{
|
||||
codeName
|
||||
moduleName
|
||||
description
|
||||
profilePicture
|
||||
panels{
|
||||
codeName
|
||||
moduleName
|
||||
event
|
||||
}
|
||||
}
|
||||
repo
|
||||
configFile
|
||||
}
|
||||
}
|
||||
hosts {
|
||||
codeName
|
||||
displayName
|
||||
host {
|
||||
url
|
||||
storage
|
||||
container
|
||||
accessKey
|
||||
}
|
||||
competitions {
|
||||
codeName
|
||||
displayName
|
||||
description
|
||||
startDatetime
|
||||
finishDatetime
|
||||
formula
|
||||
plotter{
|
||||
devTeam
|
||||
codeName
|
||||
host{
|
||||
url
|
||||
storage
|
||||
container
|
||||
accessKey
|
||||
}
|
||||
moduleName
|
||||
repo
|
||||
}
|
||||
rules
|
||||
prizes
|
||||
participants
|
||||
repo
|
||||
configFile
|
||||
}
|
||||
plotters {
|
||||
codeName
|
||||
displayName
|
||||
modules{
|
||||
codeName
|
||||
moduleName
|
||||
description
|
||||
profilePicture
|
||||
panels{
|
||||
codeName
|
||||
moduleName
|
||||
event
|
||||
}
|
||||
}
|
||||
repo
|
||||
configFile
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`
|
||||
@@ -0,0 +1,92 @@
|
||||
import { ApolloClient } from 'apollo-client'
|
||||
import { HttpLink } from 'apollo-link-http'
|
||||
import { InMemoryCache } from 'apollo-cache-inmemory'
|
||||
import { ApolloLink, Observable } from 'apollo-link'
|
||||
import { onError } from 'apollo-link-error'
|
||||
import { setContext } from 'apollo-link-context'
|
||||
|
||||
import { getItem } from '../utils/local-storage'
|
||||
|
||||
const httpLink = new HttpLink({ uri: process.env.PLATFORM_API_URL })
|
||||
|
||||
const authRetryLink = onError(
|
||||
({ graphQLErrors, networkError, operation, forward }) => {
|
||||
if (graphQLErrors) {
|
||||
// User access token has expired
|
||||
// console.log('authLink: ', graphQLErrors) // check for error message to intercept and resend with Auth0 access token
|
||||
if (graphQLErrors[0].message === 'Context creation failed: jwt expired') {
|
||||
window.localStorage.removeItem('access_token')
|
||||
window.localStorage.removeItem('user')
|
||||
window.localStorage.removeItem('name')
|
||||
location.reload()
|
||||
} else if (graphQLErrors[0].message === 'Not logged in') {
|
||||
// We assume we have auth0 access token needed to run the async request
|
||||
// Let's refresh token through async request
|
||||
return new Observable(observer => {
|
||||
getItem('access_token')
|
||||
.then(accessToken => {
|
||||
operation.setContext(({ headers = {} }) => ({
|
||||
headers: {
|
||||
// Re-add old headers
|
||||
...headers,
|
||||
// Switch out old access token for new one
|
||||
Authorization: `Bearer ${accessToken}` || null
|
||||
}
|
||||
}))
|
||||
})
|
||||
.then(() => {
|
||||
const subscriber = {
|
||||
next: observer.next.bind(observer),
|
||||
error: observer.error.bind(observer),
|
||||
complete: observer.complete.bind(observer)
|
||||
}
|
||||
|
||||
// Retry last failed request
|
||||
forward(operation).subscribe(subscriber)
|
||||
|
||||
// TODO improve with redux
|
||||
location.reload()
|
||||
})
|
||||
.catch(error => {
|
||||
// No auth0 access token available, we force user to login
|
||||
observer.error(error)
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
)
|
||||
|
||||
const authLink = setContext((_, { headers }) => {
|
||||
// get the authentication token from local storage if it exists
|
||||
const token = localStorage.getItem('access_token')
|
||||
return {
|
||||
headers: {
|
||||
...headers,
|
||||
Authorization: token ? `Bearer ${token}` : ``
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
const cache = new InMemoryCache({ addTypename: false }).restore(window.__APOLLO_STATE__)
|
||||
|
||||
const defaultOptions = {
|
||||
watchQuery: {
|
||||
fetchPolicy: 'cache-and-network',
|
||||
errorPolicy: 'all'
|
||||
},
|
||||
query: {
|
||||
fetchPolicy: 'network-only',
|
||||
errorPolicy: 'all'
|
||||
},
|
||||
mutate: {
|
||||
errorPolicy: 'all'
|
||||
}
|
||||
}
|
||||
|
||||
export const client = new ApolloClient({
|
||||
link: ApolloLink.from([authRetryLink, authLink, httpLink]), // replaced link with httpLink
|
||||
cache,
|
||||
defaultOptions,
|
||||
connectToDevTools: true
|
||||
})
|
||||
@@ -0,0 +1,20 @@
|
||||
/* eslint-disable no-unused-vars */
|
||||
import React from 'react'
|
||||
import ReactDOM from 'react-dom'
|
||||
import MasterApp from './App'
|
||||
import { createStore } from 'redux'
|
||||
import { Provider } from 'react-redux'
|
||||
import rootReducer from './reducers/rootReducer'
|
||||
|
||||
const store = createStore(rootReducer)
|
||||
|
||||
if (process.env.NODE_ENV !== 'production') {
|
||||
window.localStorage.setItem('debug', 'advanced-algos:*')
|
||||
}
|
||||
|
||||
ReactDOM.render(
|
||||
<Provider store={store}>
|
||||
<MasterApp />
|
||||
</Provider>,
|
||||
document.getElementById('masterApp')
|
||||
)
|
||||
@@ -0,0 +1,27 @@
|
||||
const initState = {
|
||||
context: {
|
||||
masterApp: {
|
||||
footer: {
|
||||
visible: true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const rootReducer = (state = initState, action) => {
|
||||
if (action.type === 'HIDE_FOOTER') {
|
||||
let newState = JSON.parse(JSON.stringify(state))
|
||||
newState.context.masterApp.footer.visible = false
|
||||
return newState
|
||||
}
|
||||
|
||||
if (action.type === 'SHOW_FOOTER') {
|
||||
let newState = JSON.parse(JSON.stringify(state))
|
||||
newState.context.masterApp.footer.visible = true
|
||||
return newState
|
||||
}
|
||||
|
||||
return state
|
||||
}
|
||||
|
||||
export default rootReducer
|
||||
@@ -0,0 +1,81 @@
|
||||
import { createMuiTheme } from '@material-ui/core/styles'
|
||||
|
||||
export const theme = createMuiTheme({
|
||||
breakpoints: {
|
||||
values: {
|
||||
xs: 0,
|
||||
sm: 768,
|
||||
md: 992,
|
||||
lg: 1200,
|
||||
xl: 1920
|
||||
}
|
||||
},
|
||||
palette: {
|
||||
primary: {
|
||||
main: '#303036',
|
||||
light: '#acb4b6'
|
||||
},
|
||||
secondary: {
|
||||
main: '#CC5835',
|
||||
light: '#e3493c'
|
||||
} // <--RUSTED_RED ~ GOLDEN_ORANGE --> #F0A202
|
||||
},
|
||||
typography: {
|
||||
fontFamily: '"Saira","Saira Condensed", sans-serif',
|
||||
useNextVariants: true
|
||||
},
|
||||
overrides: {
|
||||
Paper: {
|
||||
root: {
|
||||
backgroundColor: '#ffffff'
|
||||
},
|
||||
elevation: 0,
|
||||
square: true
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
export const globalStyles = theme => ({
|
||||
'@global': {
|
||||
body: {
|
||||
backgroundColor: theme.palette.common.white
|
||||
}
|
||||
},
|
||||
appBar: {
|
||||
position: 'relative'
|
||||
},
|
||||
toolbarTitle: {
|
||||
flex: 1
|
||||
},
|
||||
layout: {
|
||||
width: 'auto',
|
||||
marginLeft: theme.spacing.unit * 3,
|
||||
marginRight: theme.spacing.unit * 3,
|
||||
[theme.breakpoints.up(900 + theme.spacing.unit * 3 * 2)]: {
|
||||
width: 900,
|
||||
marginLeft: 'auto',
|
||||
marginRight: 'auto'
|
||||
}
|
||||
},
|
||||
heroContent: {
|
||||
maxWidth: 600,
|
||||
margin: '0 auto',
|
||||
padding: `${theme.spacing.unit * 8}px 0 ${theme.spacing.unit * 6}px`
|
||||
},
|
||||
cardHeader: {
|
||||
backgroundColor: theme.palette.grey[200]
|
||||
},
|
||||
cardPricing: {
|
||||
display: 'flex',
|
||||
justifyContent: 'center',
|
||||
alignItems: 'baseline',
|
||||
marginBottom: theme.spacing.unit * 2
|
||||
},
|
||||
cardActions: {
|
||||
[theme.breakpoints.up('sm')]: {
|
||||
paddingBottom: theme.spacing.unit * 2
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
export default theme
|
||||
@@ -0,0 +1,495 @@
|
||||
$break-lg: 1200px;
|
||||
$break-md: 992px;
|
||||
$break-sm: 768px;
|
||||
$break-xs: 540px;
|
||||
|
||||
$height-nav-bar: 131px;
|
||||
|
||||
$height-not-top: 87px;
|
||||
|
||||
$image-height-big: 60px;
|
||||
$image-height-small: 45px;
|
||||
|
||||
$text-height: 25px;
|
||||
|
||||
$mobile-handle-height: 45px;
|
||||
|
||||
$transition-time: 0.3s;
|
||||
|
||||
$advanced-algos-red: rgb(245,88,88);
|
||||
|
||||
@function strip-unit($value) {
|
||||
@return $value / ($value * 0 + 1);
|
||||
}
|
||||
|
||||
@mixin fluid-type($min-vw, $max-vw, $min-font-size, $max-font-size) {
|
||||
$u1: unit($min-vw);
|
||||
$u2: unit($max-vw);
|
||||
$u3: unit($min-font-size);
|
||||
$u4: unit($max-font-size);
|
||||
|
||||
@if $u1 == $u2 and $u1 == $u3 and $u1 == $u4 {
|
||||
& {
|
||||
|
||||
font-size: $min-font-size;
|
||||
@media screen and (min-width: $min-vw) {
|
||||
font-size: calc(#{$min-font-size} + #{strip-unit($max-font-size - $min-font-size)} * ((100vw - #{$min-vw}) / #{strip-unit($max-vw - $min-vw)}));
|
||||
}
|
||||
|
||||
@media screen and (min-width: $max-vw) {
|
||||
font-size: $max-font-size;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
body{
|
||||
padding-right: 0 !important;
|
||||
overflow-y: scroll;
|
||||
|
||||
&::-webkit-scrollbar-track {
|
||||
border: 1px solid #000;
|
||||
padding: 2px 0;
|
||||
background-color: #404040;
|
||||
}
|
||||
|
||||
&::-webkit-scrollbar {
|
||||
width: 10px;
|
||||
}
|
||||
|
||||
&::-webkit-scrollbar-thumb {
|
||||
border-radius: 10px;
|
||||
box-shadow: inset 0 0 6px rgba(0,0,0,.3);
|
||||
background-color: #737272;
|
||||
border: 1px solid #000;
|
||||
}
|
||||
pre {
|
||||
white-space: pre-wrap;
|
||||
margin: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.container{
|
||||
padding: 15px 15px 15px 15px;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
|
||||
width: 100%;
|
||||
@media screen and (min-width: $break-sm) {
|
||||
width: 768px;
|
||||
}
|
||||
@media screen and (min-width: $break-md) {
|
||||
width: 970px;
|
||||
}
|
||||
@media screen and (min-width: $break-lg) {
|
||||
width: 1170px;
|
||||
}
|
||||
}
|
||||
|
||||
header.menu{
|
||||
transition: $transition-time;
|
||||
&.notOnTop{
|
||||
background-color: rgba(0, 0, 0, 0.6);
|
||||
border-bottom: 1px solid rgba(210, 217, 224, 0.5);
|
||||
height: $height-not-top;
|
||||
.container{
|
||||
border-bottom: 0px;
|
||||
img.logo{
|
||||
margin-top: ( $height-not-top - $image-height-small ) / 2;
|
||||
height: $image-height-small;
|
||||
}
|
||||
.mobileHandle{
|
||||
margin-top: ( $height-not-top - $mobile-handle-height ) / 2 ;
|
||||
margin-bottom: ( $height-not-top - $mobile-handle-height ) / 2 ;
|
||||
}
|
||||
nav.links{
|
||||
@media screen and (min-width: $break-lg) {
|
||||
ul.primaryMenu{
|
||||
li.primaryLink{
|
||||
padding-top: ( $height-not-top - $text-height ) / 2;
|
||||
padding-bottom: ( $height-not-top - $text-height ) / 2;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
position: fixed;
|
||||
height: $height-nav-bar;
|
||||
width: 100vw;
|
||||
z-index: 125;
|
||||
|
||||
.container{
|
||||
padding-top: 0px;
|
||||
padding-bottom: 0px;
|
||||
height: 100%;
|
||||
border-bottom: 1px solid rgba(142, 144, 146, 0.3);
|
||||
img.logo{
|
||||
transition: $transition-time;
|
||||
margin-top: ( $height-nav-bar - $image-height-big ) / 2 ;
|
||||
height: $image-height-big;
|
||||
@media screen and (max-width: $break-xs) {
|
||||
height: $image-height-small;
|
||||
margin-top: ( $height-nav-bar - $image-height-small ) / 2 ;
|
||||
}
|
||||
}
|
||||
.mobileHandle.openedMobile{
|
||||
&:before{
|
||||
content: "";
|
||||
position: absolute;
|
||||
left: 16px;
|
||||
top: 17px;
|
||||
width: 1em;
|
||||
height: 0.15em;
|
||||
background: $advanced-algos-red;
|
||||
box-shadow:
|
||||
0 0.25em 0 0 $advanced-algos-red,
|
||||
0 0.5em 0 0 $advanced-algos-red;
|
||||
}
|
||||
}
|
||||
.mobileHandle:not(.openedMobile){
|
||||
&:before{
|
||||
content: "";
|
||||
position: absolute;
|
||||
left: 16px;
|
||||
top: 17px;
|
||||
width: 1em;
|
||||
height: 0.15em;
|
||||
background: rgba(210, 217, 224, 0.9);
|
||||
box-shadow:
|
||||
0 0.25em 0 0 rgba(210, 217, 224, 0.9),
|
||||
0 0.5em 0 0 rgba(210, 217, 224, 0.9);
|
||||
}
|
||||
}
|
||||
.mobileHandle{
|
||||
&.openedMobile{
|
||||
color: $advanced-algos-red;
|
||||
border: 1px solid $advanced-algos-red;
|
||||
}
|
||||
transition: $transition-time;
|
||||
display: block;
|
||||
height: $mobile-handle-height;
|
||||
line-height: $mobile-handle-height;
|
||||
border: 1px solid rgba(210, 217, 224, 0.5);
|
||||
text-transform: uppercase;
|
||||
color: rgba(210, 217, 224, 0.9);
|
||||
text-align: center;
|
||||
float: right;
|
||||
width: auto;
|
||||
clear: none;
|
||||
margin-top: ( $height-nav-bar - $mobile-handle-height ) / 2 ;
|
||||
margin-bottom: ( $height-nav-bar - $mobile-handle-height ) / 2 ;
|
||||
margin-left: 0 !important;
|
||||
margin-right: 20px;
|
||||
margin: 41px 0 42px 20px;
|
||||
padding: 0 18px 0 40px;
|
||||
position: relative;
|
||||
text-decoration: none;
|
||||
border-radius: 31px;
|
||||
@media screen and (min-width: $break-lg) {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
nav.links{
|
||||
@media screen and (max-width: $break-lg - 1) {
|
||||
display: none;
|
||||
&.openedMobile{
|
||||
display: block;
|
||||
}
|
||||
ul.primaryMenu{
|
||||
padding-left: 20px;
|
||||
padding-right: 20px;
|
||||
background-color: rgba(0, 0, 0, 0.6);
|
||||
font-family: 'Saira';
|
||||
font-size: 12px;
|
||||
font-weight: 700;
|
||||
line-height: $text-height;
|
||||
text-transform: uppercase;
|
||||
list-style: none;
|
||||
li.primaryLink{
|
||||
min-width: 240px;
|
||||
min-height: 50px;
|
||||
border-bottom: 1px solid white;
|
||||
&.hasChildren{
|
||||
&:after{
|
||||
content: '';
|
||||
float: right;
|
||||
border: solid white;
|
||||
border-width: 0 2px 2px 0;
|
||||
padding: 3px;
|
||||
margin-top: -32px;
|
||||
margin-right: 7px;
|
||||
transform: rotate(45deg);
|
||||
-webkit-transform: rotate(45deg);
|
||||
}
|
||||
}
|
||||
&:last-child{
|
||||
border-bottom: 0;
|
||||
}
|
||||
a{
|
||||
text-transform: uppercase;
|
||||
display: block;
|
||||
font-size: 13px;
|
||||
height: 50px;
|
||||
line-height: 50px;
|
||||
font-weight: 700;
|
||||
letter-spacing: 1px;
|
||||
padding: 0 40px 0 30px;
|
||||
text-decoration: none;
|
||||
color: white;
|
||||
&:hover{
|
||||
color: $advanced-algos-red;
|
||||
}
|
||||
svg{
|
||||
padding-top: 10px;
|
||||
}
|
||||
}
|
||||
ul.subMenu{
|
||||
display: none;
|
||||
list-style: none;
|
||||
}
|
||||
&.selected{
|
||||
ul.subMenu{
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@media screen and (min-width: $break-lg) {
|
||||
display: block;
|
||||
float: right;
|
||||
ul.primaryMenu{
|
||||
margin: 0 4px 0 0;
|
||||
list-style: none;
|
||||
|
||||
font-family: 'Saira';
|
||||
font-size: 12px;
|
||||
font-weight: 700;
|
||||
line-height: $text-height;
|
||||
text-transform: uppercase;
|
||||
li.primaryLink{
|
||||
transition: $transition-time;
|
||||
display: block;
|
||||
float: left;
|
||||
position: relative;
|
||||
padding-top: ( $height-nav-bar - $text-height ) / 2;
|
||||
padding-bottom: ( $height-nav-bar - $text-height ) / 2;
|
||||
padding-left: 10px;
|
||||
padding-right: 10px;
|
||||
&.hasChildren{
|
||||
&:after{
|
||||
content: '';
|
||||
border: solid white;
|
||||
border-width: 0 2px 2px 0;
|
||||
display: inline-block;
|
||||
padding: 3px;
|
||||
margin-bottom: 2px;
|
||||
transform: rotate(45deg);
|
||||
-webkit-transform: rotate(45deg);
|
||||
}
|
||||
>a{
|
||||
margin-right:6px;
|
||||
}
|
||||
}
|
||||
a{
|
||||
color: white;
|
||||
&:hover{
|
||||
color: $advanced-algos-red;
|
||||
}
|
||||
text-decoration: none;
|
||||
&.selected{
|
||||
color: $advanced-algos-red;
|
||||
}
|
||||
svg{
|
||||
padding-top: 10px;
|
||||
margin-bottom: -2px;
|
||||
&.tutorialIcon {
|
||||
padding-top: 0px;
|
||||
}
|
||||
}
|
||||
}
|
||||
ul.subMenu{
|
||||
display: none;
|
||||
position: absolute;
|
||||
top: 100%;
|
||||
left: 0;
|
||||
|
||||
padding: 18px 30px;
|
||||
list-style: none;
|
||||
font-family: 'Saira';
|
||||
font-size: 12px;
|
||||
font-weight: 300;
|
||||
line-height: $text-height;
|
||||
|
||||
min-width: 240px;
|
||||
background-color: rgba(0, 0, 0, 0.6);
|
||||
li{
|
||||
height: 30px;
|
||||
}
|
||||
}
|
||||
&.selected{
|
||||
&>a{
|
||||
color: $advanced-algos-red;
|
||||
}
|
||||
ul.subMenu{
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.bannerTopBar{
|
||||
background-position: center center;
|
||||
background-size: cover;
|
||||
background-image: url(https://superalgos.org/img/photos/teams.jpg);
|
||||
width: 100%;
|
||||
height: 220px;
|
||||
&.big{
|
||||
height: 100vh;
|
||||
.caption{
|
||||
display: block;
|
||||
top: 42%;
|
||||
}
|
||||
&.landing {
|
||||
.caption{
|
||||
display: block;
|
||||
top: 25%;
|
||||
}
|
||||
}
|
||||
}
|
||||
&.medium{
|
||||
height: 50vh;
|
||||
.caption{
|
||||
display: block;
|
||||
top: 46%;
|
||||
}
|
||||
}
|
||||
.caption{
|
||||
display: none;
|
||||
position: relative;
|
||||
top: 50%;
|
||||
font-family: Saira;
|
||||
.title{
|
||||
color: white;
|
||||
font-size: 64px;
|
||||
line-height: 78px;
|
||||
font-weight: 100;
|
||||
@include fluid-type($break-xs, $break-lg, 26px, 64px);
|
||||
}
|
||||
.text{
|
||||
color: white;
|
||||
line-height: 30px;
|
||||
font-weight: 600;
|
||||
padding: 2em 20% 0.5em;
|
||||
@include fluid-type($break-xs, $break-lg, 18px, 20px);
|
||||
}
|
||||
.instructions{
|
||||
h4{
|
||||
color: white;
|
||||
margin-top: 25px;
|
||||
margin-bottom: 10px;
|
||||
font-size: 1.6em;
|
||||
a {
|
||||
color: white;
|
||||
text-decoration: none;
|
||||
font-size: 0.9em;
|
||||
&:hover {
|
||||
color: #f55858;
|
||||
}
|
||||
}
|
||||
}
|
||||
h5{
|
||||
color: white;
|
||||
margin-top:25px;
|
||||
}
|
||||
h6{
|
||||
color: white;
|
||||
font-weight: 600;
|
||||
a {
|
||||
color: white;
|
||||
text-decoration: none;
|
||||
&:hover {
|
||||
color: #f55858;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.homePage.container{
|
||||
padding-top: 70px;
|
||||
padding-bottom: 70px;
|
||||
.title{
|
||||
padding: 0 0 10px 0;
|
||||
@include fluid-type($break-xs, $break-lg, 24px, 45px);
|
||||
line-height: 55px;
|
||||
padding: 40px 0 0.5em 0;
|
||||
font-weight: 100;
|
||||
}
|
||||
.subtitle{
|
||||
padding-bottom: 5px;
|
||||
@include fluid-type($break-xs, $break-lg, 18px, 20px);
|
||||
line-height: 19px;
|
||||
font-weight: 100;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 1px;
|
||||
margin-bottom: 1em;
|
||||
|
||||
}
|
||||
.column{
|
||||
vertical-align: top;
|
||||
display: inline-block;
|
||||
width: 100%;
|
||||
padding: 10px;
|
||||
@media screen and (min-width: $break-sm) {
|
||||
width: 50%;
|
||||
}
|
||||
p{
|
||||
font-size: 16px;
|
||||
line-height: 25px;
|
||||
margin-bottom: 0.75em;
|
||||
margin-top: 0.75em;
|
||||
font-size: 16px;
|
||||
font-weight: 300;
|
||||
color: #5a6266;
|
||||
text-size-adjust: 100%;
|
||||
a{
|
||||
text-decoration: none;
|
||||
transition: all 0.3s ease-in-out 0s;
|
||||
color: #CC5835;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.toTop{
|
||||
position: fixed;
|
||||
height: 40px;
|
||||
width: 40px;
|
||||
bottom: 20px;
|
||||
right: 20px;
|
||||
z-index: 1;
|
||||
background-color: #1a1a1a;
|
||||
border-radius: 100%;
|
||||
&:after{
|
||||
content: '';
|
||||
float: right;
|
||||
border: solid white;
|
||||
border-width: 0 3px 3px 0;
|
||||
padding: 3px;
|
||||
margin-top: 18px;
|
||||
margin-right: 15px;
|
||||
transform: rotate(-135deg);
|
||||
-webkit-transform: rotate(-135deg);
|
||||
}
|
||||
}
|
||||
|
||||
h1, h2, h3, h4, h5, h6, p, a, ul li, ol li, blockquote {
|
||||
font-family: "Saira","Saira Condensed", sans-serif;
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
import { client } from '../graphql/apollo'
|
||||
import { ECOSYSTEM_QUERY } from '../graphql/EcosystemQuery'
|
||||
import Log from './log'
|
||||
|
||||
export async function setInitialEcosystem() {
|
||||
try {
|
||||
const ecosystem = await client.query({ query: ECOSYSTEM_QUERY })
|
||||
window.localStorage.setItem('ecosystem', JSON.stringify(ecosystem.data.web_GetEcosystem))
|
||||
} catch (error) {
|
||||
Log.error('Error getting the ecosystem: ' + error)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,70 @@
|
||||
export function isDefined (d) {
|
||||
return d !== null && typeof d !== 'undefined'
|
||||
}
|
||||
|
||||
export function isNotDefined (d) {
|
||||
return !isDefined(d)
|
||||
}
|
||||
|
||||
export const isArray = Array.isArray
|
||||
|
||||
export function isObject (d) {
|
||||
return isDefined(d) && typeof d === 'object' && !Array.isArray(d)
|
||||
}
|
||||
|
||||
export function isEmpty (obj) {
|
||||
for (var key in obj) {
|
||||
if (obj.hasOwnProperty(key)) return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
export function isString (value) {
|
||||
return typeof value === 'string' || value instanceof String
|
||||
}
|
||||
|
||||
export function validObject (object, ...keys) {
|
||||
return keys.reduce((a, b) => (a || {})[b], object) !== undefined
|
||||
}
|
||||
|
||||
export function mergeDeep (target, ...sources) {
|
||||
if (!sources.length) return target
|
||||
const source = sources.shift()
|
||||
|
||||
if (isObject(target) && isObject(source)) {
|
||||
for (const key in source) {
|
||||
if (isObject(source[key])) {
|
||||
if (!target[key]) Object.assign(target, { [key]: {} })
|
||||
mergeDeep(target[key], source[key])
|
||||
} else {
|
||||
Object.assign(target, { [key]: source[key] })
|
||||
}
|
||||
}
|
||||
}
|
||||
return mergeDeep(target, ...sources)
|
||||
}
|
||||
|
||||
export function deleteCookie (c) {
|
||||
document.cookie.split(';').forEach(function (c) {
|
||||
document.cookie = c
|
||||
.replace(/^ +/, '')
|
||||
.replace(/=.*/, '=;expires=' + new Date().toUTCString() + ';path=/')
|
||||
})
|
||||
}
|
||||
|
||||
export function slugify (string) {
|
||||
const a = 'àáäâãåèéëêìíïîòóöôùúüûñçßÿœæŕśńṕẃǵǹḿǘẍźḧ·/_,:;'
|
||||
const b = 'aaaaaaeeeeiiiioooouuuuncsyoarsnpwgnmuxzh------'
|
||||
const p = new RegExp(a.split('').join('|'), 'g')
|
||||
|
||||
return string
|
||||
.toString()
|
||||
.toLowerCase()
|
||||
.replace(/\s+/g, '-') // Replace spaces with -
|
||||
.replace(p, c => b.charAt(a.indexOf(c))) // Replace special characters
|
||||
.replace(/&/g, '-and-') // Replace & with 'and'
|
||||
.replace(/[^\w-]+/g, '') // Remove all non-word characters
|
||||
.replace(/--+/g, '-') // Replace multiple - with single -
|
||||
.replace(/^-+/, '') // Trim - from start of text
|
||||
.replace(/-+$/, '') // Trim - from end of text
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
const getItem = async name => window.localStorage.getItem(name)
|
||||
const setItem = async (name, value) => window.localStorage.setItem(name, value)
|
||||
const removeItem = async name => window.localStorage.removeItem(name)
|
||||
|
||||
export { getItem, setItem, removeItem }
|
||||
@@ -0,0 +1,39 @@
|
||||
import debug from 'debug'
|
||||
|
||||
const BASE = 'superalgos'
|
||||
const COLOURS = {
|
||||
info: 'blue',
|
||||
warn: 'orange',
|
||||
error: 'red'
|
||||
}
|
||||
|
||||
class Log {
|
||||
generateMessage (level, message, source) {
|
||||
// Set the prefix which will cause debug to enable the message
|
||||
const namespace = `${BASE}:${level}`
|
||||
const createDebug = debug(namespace)
|
||||
|
||||
// Set the colour of the message based on the level
|
||||
createDebug.color = COLOURS[level]
|
||||
|
||||
if (source) {
|
||||
createDebug(source, message)
|
||||
} else {
|
||||
createDebug(message)
|
||||
}
|
||||
}
|
||||
|
||||
info (message, source) {
|
||||
return this.generateMessage('info', message, source)
|
||||
}
|
||||
|
||||
warn (message, source) {
|
||||
return this.generateMessage('warn', message, source)
|
||||
}
|
||||
|
||||
error (message, source) {
|
||||
return this.generateMessage('error', message, source)
|
||||
}
|
||||
}
|
||||
|
||||
export default new Log()
|
||||
@@ -0,0 +1,12 @@
|
||||
import React from 'react'
|
||||
|
||||
import { BannerTopBar } from '../common'
|
||||
|
||||
const Callback = () => <BannerTopBar
|
||||
size='big'
|
||||
title=''
|
||||
text='Authenticating...'
|
||||
backgroundUrl='https://superalgos.org/img/photos/superalgos-platform.jpg'
|
||||
/>
|
||||
|
||||
export default Callback
|
||||
@@ -0,0 +1,77 @@
|
||||
import React, { Component } from 'react'
|
||||
|
||||
import { withStyles } from '@material-ui/core/styles'
|
||||
import { connect } from 'react-redux'
|
||||
import { BannerTopBar } from '../common'
|
||||
|
||||
const styles = theme => ({
|
||||
'@global': {
|
||||
body: {
|
||||
backgroundColor: theme.palette.common.white
|
||||
}
|
||||
},
|
||||
layout: {
|
||||
width: '100%',
|
||||
height: '100%'
|
||||
},
|
||||
heroContent: {
|
||||
textColor: theme.palette.common.white,
|
||||
maxWidth: 600,
|
||||
height: 800,
|
||||
margin: '0 auto',
|
||||
padding: `${theme.spacing.unit * 8}px 0 ${theme.spacing.unit * 6}px`
|
||||
}
|
||||
})
|
||||
|
||||
class Charts extends Component {
|
||||
componentDidMount () {
|
||||
if (window.canvasApp.visible === undefined) {
|
||||
loadCanvas() // This happens only once.
|
||||
}
|
||||
|
||||
window.canvasApp.visible = true
|
||||
let body = document.getElementById('body')
|
||||
body.style = 'margin: 0px; padding: 0px; border: 0px; overflow:hidden;'
|
||||
this.props.hideFooter()
|
||||
}
|
||||
|
||||
componentWillUnmount () {
|
||||
window.canvasApp.visible = false
|
||||
let body = document.getElementById('body')
|
||||
body.style = ''
|
||||
this.props.showFooter()
|
||||
}
|
||||
|
||||
render () {
|
||||
return (
|
||||
<BannerTopBar
|
||||
size='medium'
|
||||
title=''
|
||||
text='Charts loading...'
|
||||
backgroundUrl='https://superalgos.org/img/photos/superalgos-platform.jpg'
|
||||
/>
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
const mapStateToProps = state => {
|
||||
return {
|
||||
context: state.context
|
||||
}
|
||||
}
|
||||
|
||||
const mapDispatchToProps = dispatch => {
|
||||
return {
|
||||
hideFooter: () => {
|
||||
dispatch({ type: 'HIDE_FOOTER' })
|
||||
},
|
||||
showFooter: () => {
|
||||
dispatch({ type: 'SHOW_FOOTER' })
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export default connect(
|
||||
mapStateToProps,
|
||||
mapDispatchToProps
|
||||
)(withStyles(styles)(Charts))
|
||||
@@ -0,0 +1,30 @@
|
||||
import React from 'react'
|
||||
import PropTypes from 'prop-types'
|
||||
import Typography from '@material-ui/core/Typography'
|
||||
|
||||
const BannerTopBar = ({ size, backgroundUrl, title, text, children }) => (
|
||||
<div
|
||||
className={`bannerTopBar ${size}`}
|
||||
style={backgroundUrl ? { backgroundImage: `url(${backgroundUrl})` } : {}}
|
||||
>
|
||||
<div className='caption'>
|
||||
<Typography className='title' variant='h1' align='center'>
|
||||
{title}
|
||||
</Typography>
|
||||
<Typography className='text' variant='h2' align='center'>
|
||||
{text}
|
||||
</Typography>
|
||||
{children}
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
|
||||
BannerTopBar.propTypes = {
|
||||
children: PropTypes.node,
|
||||
backgroundUrl: PropTypes.string,
|
||||
size: PropTypes.string,
|
||||
title: PropTypes.oneOfType([PropTypes.string, PropTypes.array]),
|
||||
text: PropTypes.oneOfType([PropTypes.string, PropTypes.array])
|
||||
}
|
||||
|
||||
export default BannerTopBar
|
||||
@@ -0,0 +1,3 @@
|
||||
import BannerTopBar from './components/BannerTopBar'
|
||||
|
||||
export { BannerTopBar }
|
||||
@@ -0,0 +1,139 @@
|
||||
import React, { Component } from 'react'
|
||||
import PropTypes from 'prop-types'
|
||||
import classNames from 'classnames'
|
||||
import { withStyles } from '@material-ui/core/styles'
|
||||
import withWidth from '@material-ui/core/withWidth'
|
||||
import { Mutation } from 'react-apollo'
|
||||
|
||||
import Typography from '@material-ui/core/Typography'
|
||||
import Grid from '@material-ui/core/Grid'
|
||||
import Button from '@material-ui/core/Button'
|
||||
import InputBase from '@material-ui/core/InputBase'
|
||||
|
||||
import styles from './styles'
|
||||
|
||||
import NEWSLETTER_SIGNUP from '../graphql/NewsletterSignup'
|
||||
|
||||
import { isEmpty } from '../../../utils/js-helpers'
|
||||
|
||||
export class SignupForm extends Component {
|
||||
constructor (props) {
|
||||
super(props)
|
||||
|
||||
this.handleChange = this.handleChange.bind(this)
|
||||
this.handleSubmit = this.handleSubmit.bind(this)
|
||||
this.validate = this.validate.bind(this)
|
||||
|
||||
this.state = {
|
||||
email: '',
|
||||
emailError: '',
|
||||
success: false
|
||||
}
|
||||
}
|
||||
|
||||
render () {
|
||||
const {
|
||||
classes,
|
||||
width,
|
||||
alignCenter,
|
||||
displayTitle,
|
||||
displayIntro
|
||||
} = this.props
|
||||
return (
|
||||
<Mutation
|
||||
mutation={NEWSLETTER_SIGNUP}
|
||||
>
|
||||
{(NewsletterSignup, { loading, error, data }) => {
|
||||
return (
|
||||
<Grid container className={classes.signupRight} direction='column' justify={alignCenter ? 'center' : 'flex-start'}>
|
||||
{displayTitle && <Typography variant='h4' className={classNames(classes.textWhite, classes.signupTitle)} gutterBottom>Stay in touch!</Typography>}
|
||||
{displayIntro && <Typography variant='subtitle1' className={classNames(classes.textWhite, classes.signupText)} gutterBottom>Opt-in our mailing list to stay up to date with the Superalgos Project.</Typography>}
|
||||
<form id='email-signup' action='#' className='form-inline' autoComplete='off'>
|
||||
<Typography
|
||||
variant='subtitle1'
|
||||
className={classes.textSuccess}
|
||||
gutterBottom
|
||||
style={{
|
||||
display: this.state.success ? 'block' : 'none',
|
||||
textAlign: alignCenter ? 'center' : 'inherit'
|
||||
}}
|
||||
>
|
||||
Thank you for signing up! Please check your email and click on the confirmation link to complete the signup process.
|
||||
</Typography>
|
||||
<Grid container className={classes.signupContainer} justify={(width === 'xs' || alignCenter) ? 'center' : 'flex-start'}>
|
||||
<InputBase
|
||||
id='email'
|
||||
placeholder='Enter your email'
|
||||
classes={{
|
||||
root: classes.signupInputRoot,
|
||||
input: classes.signupInput
|
||||
}}
|
||||
onChange={this.handleChange}
|
||||
value={this.state.email}
|
||||
/>
|
||||
<Button
|
||||
id='email-submit'
|
||||
className={classes.signupInputSubmit}
|
||||
onClick={e => {
|
||||
this.handleSubmit(e, NewsletterSignup)
|
||||
}}
|
||||
>
|
||||
Submit
|
||||
</Button>
|
||||
</Grid>
|
||||
</form>
|
||||
</Grid>
|
||||
)
|
||||
}}
|
||||
</Mutation>
|
||||
)
|
||||
}
|
||||
|
||||
validate (data) {
|
||||
const errors = {}
|
||||
switch (data.id) {
|
||||
case 'email':
|
||||
if (data.value === '') {
|
||||
this.setState({ emailError: 'Please enter an email address' })
|
||||
} else {
|
||||
this.setState({ emailError: '' })
|
||||
}
|
||||
break
|
||||
default:
|
||||
}
|
||||
return errors
|
||||
}
|
||||
|
||||
handleChange (e) {
|
||||
let id = e.target.id
|
||||
let value = e.target.value
|
||||
let error = this.validate({ id, value })
|
||||
switch (id) {
|
||||
case 'email':
|
||||
if (!isEmpty(error)) this.setState({ emailError: error })
|
||||
this.setState({ email: value })
|
||||
break
|
||||
default:
|
||||
}
|
||||
}
|
||||
|
||||
async handleSubmit (e, NewsletterSignup) {
|
||||
e.preventDefault()
|
||||
console.log('NewsletterSignup handleSubmit: ', this.state.email)
|
||||
const signupResponse = await NewsletterSignup({ variables: { email: this.state.email } })
|
||||
console.log('NewsletterSignup: ', signupResponse)
|
||||
if (signupResponse.data.notifications_Master_NewsletterSignup === 'SUCCESS') this.setState({ email: '', success: true })
|
||||
}
|
||||
}
|
||||
|
||||
SignupForm.propTypes = {
|
||||
classes: PropTypes.object,
|
||||
width: PropTypes.string,
|
||||
alignCenter: PropTypes.bool,
|
||||
displayTitle: PropTypes.bool,
|
||||
displayIntro: PropTypes.bool
|
||||
}
|
||||
|
||||
const SignupFormWithStyles = withStyles(styles)(SignupForm)
|
||||
|
||||
export default withWidth()(SignupFormWithStyles)
|
||||
@@ -0,0 +1,93 @@
|
||||
import React from 'react'
|
||||
import PropTypes from 'prop-types'
|
||||
|
||||
import { BannerTopBar } from '../../common'
|
||||
import SignupForm from './SignupForm'
|
||||
|
||||
export class SignupVerifyResponse extends React.Component {
|
||||
componentDidMount () {
|
||||
const { mutate } = this.props
|
||||
mutate()
|
||||
}
|
||||
|
||||
render () {
|
||||
const { loading, error, data } = this.props
|
||||
let BannerTitle = ''
|
||||
let BannerText = ''
|
||||
let displayForm = false
|
||||
console.log('SignupVerifyResponse:', loading, error, data)
|
||||
if (error) {
|
||||
if (
|
||||
error.message ===
|
||||
'GraphQL error: Error: Token Expired. Please resubmit email address.'
|
||||
) {
|
||||
BannerText = [
|
||||
<strong key='EmailSignupConfirm-error-b1'>
|
||||
Newsletter Signup Error: Verification Token Expired
|
||||
</strong>,
|
||||
<br key='EmailSignupConfirm-error-br' />,
|
||||
'Please resubmit your email address and a new token will be emailed to you.',
|
||||
<br key='EmailSignupConfirm-error-br2' />,
|
||||
' We apologize for the inconvenience, but we highly value your seurity and privacy.'
|
||||
]
|
||||
displayForm = true
|
||||
} else {
|
||||
BannerText = [
|
||||
'Newsletter Signup Error: ',
|
||||
<br key='EmailSignupConfirm-error-br' />,
|
||||
error.message
|
||||
]
|
||||
}
|
||||
return (
|
||||
<BannerTopBar
|
||||
size='big'
|
||||
title={BannerTitle}
|
||||
text={BannerText}
|
||||
backgroundUrl='https://superalgos.org/img/photos/superalgos-platform.jpg'
|
||||
/>
|
||||
)
|
||||
}
|
||||
if (loading && !error) {
|
||||
BannerText = [
|
||||
'Processing newsletter sign-up...',
|
||||
<br key='EmailSignupConfirm-br' />,
|
||||
'Thank you for opting-in to recieve updates about the Superalgos project!'
|
||||
]
|
||||
}
|
||||
if (data !== undefined && data !== null) {
|
||||
console.log(data)
|
||||
if (data.notifications_Master_NewsletterSignupVerify === 'SUCCESS') {
|
||||
return (
|
||||
<React.Fragment>
|
||||
<BannerTopBar
|
||||
size='big'
|
||||
title='Mailing Sign-Up Complete!'
|
||||
text='We look forward to keeping you up-to-date on the Superalgos project.'
|
||||
backgroundUrl='https://superalgos.org/img/photos/superalgos-platform.jpg'
|
||||
>
|
||||
{displayForm && <SignupForm alignCenter />}
|
||||
</BannerTopBar>
|
||||
</React.Fragment>
|
||||
)
|
||||
}
|
||||
} else {
|
||||
return (
|
||||
<BannerTopBar
|
||||
size='big'
|
||||
title='Processing...'
|
||||
text=''
|
||||
backgroundUrl='https://superalgos.org/img/photos/superalgos-platform.jpg'
|
||||
/>
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
SignupVerifyResponse.propTypes = {
|
||||
mutate: PropTypes.function,
|
||||
loading: PropTypes.bool,
|
||||
error: PropTypes.object,
|
||||
data: PropTypes.object
|
||||
}
|
||||
|
||||
export default SignupVerifyResponse
|
||||
@@ -0,0 +1,72 @@
|
||||
import lightGreen from '@material-ui/core/colors/lightGreen'
|
||||
|
||||
const styles = theme => ({
|
||||
textLight: {
|
||||
color: theme.palette.primary.light
|
||||
},
|
||||
textWhite: {
|
||||
color: theme.palette.common.white
|
||||
},
|
||||
textSuccess: {
|
||||
color: lightGreen[400]
|
||||
},
|
||||
copyright: {
|
||||
paddingTop: theme.spacing.unit * 3
|
||||
},
|
||||
linkLight: {
|
||||
color: theme.palette.secondary.main,
|
||||
textDecoration: 'none'
|
||||
},
|
||||
signupRight: {
|
||||
marginTop: theme.spacing.unit * 2,
|
||||
[theme.breakpoints.down('xs')]: {
|
||||
textAlign: 'center'
|
||||
}
|
||||
},
|
||||
signupContainer: {
|
||||
marginBottom: theme.spacing.unit * 2,
|
||||
[theme.breakpoints.down('xs')]: {
|
||||
textAlign: 'center'
|
||||
}
|
||||
},
|
||||
signupTitle: {
|
||||
fontSize: '25px',
|
||||
marginBottom: theme.spacing.unit * 5
|
||||
},
|
||||
signupText: {
|
||||
fontSize: '16px'
|
||||
},
|
||||
signupInput: {
|
||||
borderRadius: 4,
|
||||
backgroundColor: theme.palette.common.white,
|
||||
border: '1px solid #ced4da',
|
||||
fontSize: 20,
|
||||
padding: '10px 12px',
|
||||
transition: theme.transitions.create(['border-color', 'box-shadow']),
|
||||
marginRight: theme.spacing.unit * 1
|
||||
},
|
||||
signupInputSubmit: {
|
||||
boxShadow: 'none',
|
||||
textTransform: 'none',
|
||||
fontSize: 20,
|
||||
lineHeight: '1.1875em',
|
||||
color: theme.palette.common.white,
|
||||
padding: '10px 12px',
|
||||
backgroundColor: '#5bc0de',
|
||||
borderColor: '#46b8da',
|
||||
'&:hover': {
|
||||
backgroundColor: '#31b0d5',
|
||||
borderColor: '#269abc'
|
||||
},
|
||||
'&:active': {
|
||||
boxShadow: 'none',
|
||||
backgroundColor: '#0062cc',
|
||||
borderColor: '#005cbf'
|
||||
},
|
||||
'&:focus': {
|
||||
boxShadow: '0 0 0 0.2rem rgba(0,123,255,.5)'
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
export default styles
|
||||
@@ -0,0 +1,10 @@
|
||||
/* eslint-disable no-unused-vars */
|
||||
import gql from 'graphql-tag'
|
||||
|
||||
const NEWSLETTER_SIGNUP = gql`
|
||||
mutation NewsletterSignup($email: String!) {
|
||||
notifications_Master_NewsletterSignup(email: $email)
|
||||
}
|
||||
`
|
||||
|
||||
export default NEWSLETTER_SIGNUP
|
||||
@@ -0,0 +1,10 @@
|
||||
/* eslint-disable no-unused-vars */
|
||||
import gql from 'graphql-tag'
|
||||
|
||||
const NEWSLETTER_SIGNUP_VERIFY = gql`
|
||||
mutation NewsletterSignupVerify($token: String!){
|
||||
notifications_Master_NewsletterSignupVerify(token: $token)
|
||||
}
|
||||
`
|
||||
|
||||
export default NEWSLETTER_SIGNUP_VERIFY
|
||||
@@ -0,0 +1,55 @@
|
||||
import React from 'react'
|
||||
import PropTypes from 'prop-types'
|
||||
import queryString from 'query-string'
|
||||
import { Mutation } from 'react-apollo'
|
||||
|
||||
import { BannerTopBar } from '../common'
|
||||
import SignupVerifyResponse from './components/SignupVerifyResponse'
|
||||
|
||||
import NEWSLETTER_SIGNUP_VERIFY from './graphql/NewsletterSignupVerify'
|
||||
|
||||
export const EmailSignupConfirm = ({ tokenParam }) => {
|
||||
let token
|
||||
let BannerText = ''
|
||||
if (tokenParam !== '' && tokenParam !== null) {
|
||||
const values = queryString.parse(tokenParam)
|
||||
token = values.token
|
||||
} else {
|
||||
BannerText = [
|
||||
'Newsletter Signup Error: Invalid Token',
|
||||
<br key='EmailSignupConfirm-error-br' />,
|
||||
'Please try signing up again! We apologize for the inconvenience,',
|
||||
<br key='EmailSignupConfirm-error-br2' />,
|
||||
'but we highly value your seurity and privacy.'
|
||||
]
|
||||
return (
|
||||
<BannerTopBar
|
||||
size='big'
|
||||
title=''
|
||||
text={BannerText}
|
||||
backgroundUrl='https://superalgos.org/img/photos/superalgos-platform.jpg'
|
||||
/>
|
||||
)
|
||||
}
|
||||
console.log(token)
|
||||
return (
|
||||
<Mutation mutation={NEWSLETTER_SIGNUP_VERIFY} variables={{ token: token }}>
|
||||
{(NewsletterSignupVerify, { loading, error, data }) => {
|
||||
return (
|
||||
<SignupVerifyResponse
|
||||
mutate={NewsletterSignupVerify}
|
||||
loading={loading}
|
||||
error={error}
|
||||
data={data}
|
||||
/>
|
||||
)
|
||||
}}
|
||||
</Mutation>
|
||||
)
|
||||
}
|
||||
|
||||
EmailSignupConfirm.propTypes = {
|
||||
tokenParam: PropTypes.string
|
||||
}
|
||||
|
||||
export default EmailSignupConfirm
|
||||
@@ -0,0 +1,54 @@
|
||||
import React, { Component } from 'react'
|
||||
import { Link } from 'react-router-dom'
|
||||
|
||||
import { BannerTopBar } from '../common'
|
||||
import { Typography } from '@material-ui/core'
|
||||
|
||||
class Home extends Component {
|
||||
constructor (props) {
|
||||
super(props)
|
||||
this.state = {
|
||||
user: null
|
||||
}
|
||||
}
|
||||
componentDidMount () {
|
||||
const user = window.localStorage.getItem('user')
|
||||
this.setState({ user })
|
||||
}
|
||||
render () {
|
||||
let user = JSON.parse(this.state.user)
|
||||
if (this.state.user !== undefined && this.state.user !== null) {}
|
||||
return (
|
||||
<React.Fragment>
|
||||
<BannerTopBar
|
||||
size='big'
|
||||
title='Superalgos Platform'
|
||||
text='People and machines working together to create Superalgos'
|
||||
backgroundUrl='https://superalgos.org/img/photos/superalgos-platform.jpg'
|
||||
/>
|
||||
<div className='homePage container'>
|
||||
<Typography variant='h1' align='center' className='title'>Welcome to the Superalgos Platform!</Typography>
|
||||
<div className='column'>
|
||||
<Typography align='justify'>
|
||||
Before you begin, please be aware this is an alpha stage deployment.
|
||||
The features available as of today are limited but already functional.
|
||||
However, you may encounter occasional instability and errors.
|
||||
</Typography>
|
||||
<Typography align='justify'>
|
||||
To try out the Demo version hosted here you will need to Sign Up / Login.
|
||||
Once you are logged in, you will find basic instructions on how to proceed,
|
||||
at this home page (click the Superalgos logo to return to this home page).
|
||||
</Typography>
|
||||
</div>
|
||||
<div className='column'>
|
||||
<Typography align='justify'>
|
||||
If you wish to set up your own indicators and strategies, please get in touch with us and we'll show you how (give us a shout in the Community Telegram)
|
||||
</Typography>
|
||||
</div>
|
||||
</div>
|
||||
</React.Fragment>
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
export default Home
|
||||
@@ -0,0 +1,7 @@
|
||||
import Home from './home'
|
||||
import Charts from './charts'
|
||||
import Callback from './callback'
|
||||
import Layout from './layout'
|
||||
import EmailSignupConfirm from './email-verification'
|
||||
|
||||
export { Layout, Home, Charts, Callback, EmailSignupConfirm }
|
||||
@@ -0,0 +1,94 @@
|
||||
import React, { Component } from 'react'
|
||||
import PropTypes from 'prop-types'
|
||||
import classNames from 'classnames'
|
||||
import { NavLink, Link } from 'react-router-dom'
|
||||
|
||||
import { withStyles } from '@material-ui/core/styles'
|
||||
import withWidth from '@material-ui/core/withWidth'
|
||||
import { connect } from 'react-redux'
|
||||
|
||||
import Typography from '@material-ui/core/Typography'
|
||||
import Grid from '@material-ui/core/Grid'
|
||||
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
|
||||
import { faFacebookF, faTelegramPlane, faTwitter } from '@fortawesome/free-brands-svg-icons'
|
||||
import styles from './styles'
|
||||
|
||||
import SignupForm from '../../email-verification/components/SignupForm'
|
||||
|
||||
import aalogo from '../../../assets/superalgos/Superalgos-logo-horz-dark.svg'
|
||||
|
||||
class Footer extends Component {
|
||||
render () {
|
||||
let { classes, width } = this.props
|
||||
|
||||
const masterApp = this.props.context.masterApp
|
||||
if (masterApp.footer.visible === false) {
|
||||
return (<div />)
|
||||
} else {
|
||||
return (
|
||||
<footer className={classNames(classes.darkSection, classes.footer)}>
|
||||
<Grid
|
||||
container
|
||||
spacing={8}
|
||||
justify='space-evenly'
|
||||
className={classes.footerContainer}
|
||||
>
|
||||
<Grid item xs={12} sm={4} md={4}>
|
||||
<a target='_blank' href='https://superalgos.org/' className={classes.linkStrong}>
|
||||
<img alt='' src={aalogo} width={'100%'} height={'auto'} className={classes.footerLogo} />
|
||||
</a>
|
||||
<Grid container className={classes.descriptionLeft} direction='column'>
|
||||
<Typography className={classNames(classes.textLight, classes.descriptionText)} ><strong>Superalgos Ltd.</strong></Typography>
|
||||
<Typography className={classNames(classes.textLight, classes.descriptionText)} gutterBottom>Ground Floor, Palace Court, Church Street,<br />St. Julians STJ3049, Malta</Typography>
|
||||
<Typography className={classNames(classes.textLight, classes.descriptionText)}>
|
||||
<a target='_blank' href='https://www.superalgos.org/legal-privacy-statement.shtml' className={classes.linkLight}>Privacy Statement</a> | <a target='_blank' href='https://www.superalgos.org/legal-terms-of-service.shtml' className={classes.linkLight}>Terms of Service</a>
|
||||
</Typography>
|
||||
<Typography variant='body2' className={classNames(classes.textLight, classes.copyright)} gutterBottom>© Superalgos, Ltd. 2018 | All Rights Reserved.</Typography>
|
||||
</Grid>
|
||||
</Grid>
|
||||
<Grid item xs={12} sm={1} md={1} />
|
||||
<Grid item xs={12} sm={7} md={6}>
|
||||
<SignupForm displayTitle displayIntro />
|
||||
<Typography variant='subtitle1' className={classes.textWhite} style={{ textAlign: width === 'xs' ? 'center' : '' }}>Meet us on Social Networks:</Typography>
|
||||
<Grid container justify={width === 'xs' ? 'center' : 'flex-start'}>
|
||||
<a target='_blank' href='https://t.me/superalgoscommunity' title='Join us on Telgram' className={classes.linkLight}>
|
||||
<FontAwesomeIcon
|
||||
icon={faTelegramPlane}
|
||||
className={classNames(classes.icon, classes.iconHover)}
|
||||
/>
|
||||
</a>
|
||||
<a target='_blank' href='https://twitter.com/superalgos' title='Follow us on Twitter' className={classes.linkLight}>
|
||||
<FontAwesomeIcon
|
||||
icon={faTwitter}
|
||||
className={classNames(classes.icon, classes.iconHover)}
|
||||
/>
|
||||
</a>
|
||||
<a target='_blank' href='https://www.facebook.com/Superalgos-375022859724428/' title='Meet us on Facebook' className={classes.linkLight}>
|
||||
<FontAwesomeIcon
|
||||
icon={faFacebookF}
|
||||
className={classNames(classes.icon, classes.iconHover)}
|
||||
/>
|
||||
</a>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</footer>
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Footer.propTypes = {
|
||||
classes: PropTypes.object.isRequired,
|
||||
width: PropTypes.string
|
||||
}
|
||||
|
||||
const mapStateToProps = (state) => {
|
||||
return {
|
||||
context: state.context
|
||||
}
|
||||
}
|
||||
|
||||
const FooterWithStyles = withStyles(styles)(Footer)
|
||||
|
||||
export default connect(mapStateToProps)(withWidth()(FooterWithStyles))
|
||||
@@ -0,0 +1,116 @@
|
||||
import lightGreen from '@material-ui/core/colors/lightGreen'
|
||||
|
||||
const styles = theme => ({
|
||||
textLight: {
|
||||
color: theme.palette.primary.light
|
||||
},
|
||||
textWhite: {
|
||||
color: theme.palette.common.white
|
||||
},
|
||||
textSuccess: {
|
||||
color: lightGreen[400]
|
||||
},
|
||||
copyright: {
|
||||
paddingTop: theme.spacing.unit * 9,
|
||||
fontSize: '16px'
|
||||
},
|
||||
linkLight: {
|
||||
color: theme.palette.secondary.main,
|
||||
textDecoration: 'none'
|
||||
},
|
||||
descriptionLeft: {
|
||||
marginLeft: 0,
|
||||
[theme.breakpoints.down('xs')]: {
|
||||
textAlign: 'center'
|
||||
}
|
||||
},
|
||||
descriptionText: {
|
||||
fontSize: '16px'
|
||||
},
|
||||
signupRight: {
|
||||
marginTop: theme.spacing.unit * 2,
|
||||
[theme.breakpoints.down('xs')]: {
|
||||
textAlign: 'center'
|
||||
}
|
||||
},
|
||||
signupContainer: {
|
||||
marginBottom: theme.spacing.unit * 2,
|
||||
[theme.breakpoints.down('xs')]: {
|
||||
textAlign: 'center'
|
||||
}
|
||||
},
|
||||
footer: {
|
||||
borderTop: `4px solid ${theme.palette.secondary.light}`,
|
||||
padding: `${theme.spacing.unit * 6}px 0`,
|
||||
backgroundColor: '#19191C' /* #29292c */,
|
||||
color: theme.palette.primary.light
|
||||
},
|
||||
footerContainer: {
|
||||
width: 'auto',
|
||||
[theme.breakpoints.up(1200 + theme.spacing.unit * 3 * 2)]: {
|
||||
width: 1200,
|
||||
marginLeft: 'auto',
|
||||
marginRight: 'auto'
|
||||
}
|
||||
},
|
||||
footerLogo: {
|
||||
marginBottom: theme.spacing.unit * 2
|
||||
},
|
||||
footerLink: {
|
||||
textDecoration: 'none',
|
||||
'&:hover': {
|
||||
color: theme.palette.secondary.light
|
||||
}
|
||||
},
|
||||
footerInputRoot: {
|
||||
'label + &': {
|
||||
marginTop: theme.spacing.unit * 3
|
||||
},
|
||||
[theme.breakpoints.down('xs')]: {
|
||||
textAlign: 'center'
|
||||
}
|
||||
},
|
||||
footerInput: {
|
||||
borderRadius: 4,
|
||||
backgroundColor: theme.palette.common.white,
|
||||
border: '1px solid #ced4da',
|
||||
fontSize: 16,
|
||||
padding: '10px 12px',
|
||||
transition: theme.transitions.create(['border-color', 'box-shadow']),
|
||||
marginRight: theme.spacing.unit * 1
|
||||
},
|
||||
footerInputSubmit: {
|
||||
boxShadow: 'none',
|
||||
textTransform: 'none',
|
||||
fontSize: 16,
|
||||
lineHeight: '1.1875em',
|
||||
color: theme.palette.common.white,
|
||||
padding: '10px 12px',
|
||||
backgroundColor: '#5bc0de',
|
||||
borderColor: '#46b8da',
|
||||
'&:hover': {
|
||||
backgroundColor: '#31b0d5',
|
||||
borderColor: '#269abc'
|
||||
},
|
||||
'&:active': {
|
||||
boxShadow: 'none',
|
||||
backgroundColor: '#0062cc',
|
||||
borderColor: '#005cbf'
|
||||
},
|
||||
'&:focus': {
|
||||
boxShadow: '0 0 0 0.2rem rgba(0,123,255,.5)'
|
||||
}
|
||||
},
|
||||
icon: {
|
||||
margin: theme.spacing.unit * 1,
|
||||
fontSize: 30
|
||||
},
|
||||
iconHover: {
|
||||
margin: theme.spacing.unit * 1,
|
||||
'&:hover': {
|
||||
color: theme.palette.secondary.light
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
export default styles
|
||||
@@ -0,0 +1,46 @@
|
||||
import React from 'react'
|
||||
import { Link } from 'react-router-dom'
|
||||
|
||||
import { isDefined } from '../../../utils/js-helpers'
|
||||
|
||||
export const LoggedIn = props => {
|
||||
let { user, auth, openedMenu, toggleMenuOpen, closeAll, bigScreen, mouseLeave } = props
|
||||
let displayName = 'No Display Name'
|
||||
|
||||
if (isDefined(user.alias)) {
|
||||
displayName = user.alias
|
||||
}
|
||||
|
||||
if (isDefined(user.nickname)) {
|
||||
displayName = user.nickname
|
||||
}
|
||||
|
||||
if (isDefined(user.firstName)) {
|
||||
displayName = user.firstName
|
||||
}
|
||||
|
||||
displayName = displayName.split('-')[0]
|
||||
displayName = displayName.split('.')[0]
|
||||
displayName = displayName.split('_')[0]
|
||||
displayName = displayName.split(' ')[0]
|
||||
|
||||
return (
|
||||
|
||||
<li
|
||||
onMouseEnter={() => toggleMenuOpen(42, bigScreen)}
|
||||
onMouseLeave={() => mouseLeave(bigScreen)}
|
||||
className={openedMenu === 42 ? 'selected primaryLink hasChildren' : 'primaryLink hasChildren'}
|
||||
>
|
||||
<Link to='/users/user' onClick={() => toggleMenuOpen(42, true)}> {displayName} </Link>
|
||||
<ul className='subMenu'>
|
||||
<li><Link to='/users/user' onClick={() => closeAll()}> Your Profile </Link></li>
|
||||
<li><Link to='/teams/manage-teams' onClick={() => closeAll()}> Your Team </Link></li>
|
||||
<li><a href='#' onClick={() => auth.logout()}> Logout </a></li>
|
||||
<li><a href='https://www.superalgos.org/documentation-quick-start.shtml'> Docs </a></li>
|
||||
<li><a href='https://superalgos.org'> Exit Platform </a></li>
|
||||
</ul>
|
||||
</li>
|
||||
)
|
||||
}
|
||||
|
||||
export default LoggedIn
|
||||
@@ -0,0 +1,110 @@
|
||||
import {
|
||||
Search,
|
||||
GamepadRounded,
|
||||
AccessibilityNew,
|
||||
LibraryAdd,
|
||||
ImportContacts,
|
||||
BugReport,
|
||||
People,
|
||||
Group,
|
||||
VpnKey,
|
||||
Home,
|
||||
AddCircleOutline,
|
||||
ViewModule
|
||||
} from '@material-ui/icons'
|
||||
|
||||
const usersMenus = {
|
||||
title: 'Users',
|
||||
to: '/users',
|
||||
icon: Home,
|
||||
submenus: [
|
||||
{ title: 'Directory', to: '/users/browse', icon: ImportContacts },
|
||||
{ title: 'Search', to: '/users/search', icon: Search },
|
||||
{ title: 'Your Profile', to: '/users/user', icon: People, authenticated: true },
|
||||
{ title: 'Report a Bug', to: 'https://github.com/Superalgos/UsersModule/issues/new', icon: BugReport, externalLink: true }
|
||||
]
|
||||
}
|
||||
|
||||
/*
|
||||
const teamsMenus = {
|
||||
title: 'Teams',
|
||||
to: '/teams',
|
||||
icon: Home,
|
||||
submenus: [
|
||||
{ title: 'Directory', to: '/teams/explore', icon: ImportContacts },
|
||||
{ title: 'Your teams', to: '/teams/manage-teams', icon: Group, authenticated: true },
|
||||
{ title: 'Team members', to: '/teams/team-members', icon: People, authenticated: true },
|
||||
{ title: 'Report a Bug', to: 'https://github.com/Superalgos/TeamsModule/issues/new', icon: BugReport, externalLink: true }
|
||||
]
|
||||
}
|
||||
*/
|
||||
|
||||
const eventsMenus = {
|
||||
title: 'Events',
|
||||
to: '/events',
|
||||
icon: Home,
|
||||
submenus: [
|
||||
{ title: 'Directory', to: '/events', icon: ImportContacts },
|
||||
{ title: 'Your hosted events', to: '/events/host', icon: AccessibilityNew, authenticated: true },
|
||||
{ title: 'Host an event', to: '/events/create', icon: LibraryAdd, authenticated: true },
|
||||
{ title: 'Report a Bug', to: 'https://github.com/Superalgos/EventsClientModule/issues/new', icon: BugReport, externalLink: true }
|
||||
]
|
||||
}
|
||||
|
||||
const keyvaultMenus = {
|
||||
title: 'Keys',
|
||||
to: '/keys',
|
||||
icon: Home,
|
||||
authenticated: true,
|
||||
submenus: [
|
||||
{ title: 'Your keys', to: '/keys/browse', icon: VpnKey },
|
||||
{ title: 'Add key', to: '/keys/addKey', icon: AddCircleOutline },
|
||||
{ title: 'Report a Bug', to: 'https://github.com/Superalgos/KeyVaultModule/issues/new', icon: BugReport, externalLink: true }
|
||||
]
|
||||
}
|
||||
|
||||
const operationsMenus = {
|
||||
title: 'Clones',
|
||||
to: '/clones',
|
||||
icon: Home,
|
||||
authenticated: true,
|
||||
submenus: [
|
||||
{ title: 'Active Clones', to: '/clones/browse', icon: ImportContacts },
|
||||
{ title: 'History Clones', to: '/clones/history', icon: LibraryAdd },
|
||||
{ title: 'Create Clone', to: '/clones/add', icon: AddCircleOutline },
|
||||
{ title: 'Report a Bug', to: 'https://github.com/Superalgos/OperationsModule/issues/new', icon: BugReport, externalLink: true }
|
||||
]
|
||||
}
|
||||
|
||||
const cockpitMenus = {
|
||||
title: 'Cockpit',
|
||||
to: '/cockpit',
|
||||
icon: Home,
|
||||
authenticated: true,
|
||||
submenus: [
|
||||
{ title: 'Signals', to: '/cockpit/signals', icon: GamepadRounded },
|
||||
{ title: 'Report a Bug', to: 'https://github.com/Superalgos/CockpitClientModule/issues/new', icon: BugReport, externalLink: true }
|
||||
]
|
||||
}
|
||||
|
||||
/*
|
||||
const strategizerMenus = {
|
||||
title: 'Strategizer',
|
||||
to: '/strategizer',
|
||||
icon: Home,
|
||||
authenticated: true,
|
||||
submenus: []
|
||||
}
|
||||
*/
|
||||
|
||||
const allMenus = [
|
||||
usersMenus,
|
||||
// teamsMenus,
|
||||
eventsMenus,
|
||||
keyvaultMenus,
|
||||
operationsMenus,
|
||||
// strategizerMenus,
|
||||
cockpitMenus
|
||||
]
|
||||
|
||||
export default allMenus
|
||||
@@ -0,0 +1,181 @@
|
||||
import React, { Component } from 'react'
|
||||
import PropTypes from 'prop-types'
|
||||
import { Link } from 'react-router-dom'
|
||||
import jwtDecode from 'jwt-decode'
|
||||
import withWidth from '@material-ui/core/withWidth'
|
||||
import { NotListedLocation as TutorialIcon } from '@material-ui/icons'
|
||||
|
||||
// components
|
||||
import { LoggedIn } from './LoggedIn'
|
||||
|
||||
import allMenus from './imports'
|
||||
import AALogo from '../../../assets/superalgos/Superalgos-logo-horz-dark.svg'
|
||||
|
||||
class Header extends Component {
|
||||
constructor (props) {
|
||||
super(props)
|
||||
this.renderSubMenu = this.renderSubMenu.bind(this)
|
||||
this.state = {
|
||||
onTop: true,
|
||||
mobileOpen: false,
|
||||
openedMenu: null,
|
||||
user: null
|
||||
}
|
||||
}
|
||||
|
||||
handleScroll () {
|
||||
if (window.pageYOffset > 0) {
|
||||
this.setState({ onTop: false })
|
||||
} else {
|
||||
this.setState({ onTop: true })
|
||||
}
|
||||
}
|
||||
|
||||
scrollToTop () {
|
||||
document.body.scrollTop = 0 // For Safari
|
||||
document.documentElement.scrollTop = 0 // For Chrome, Firefox, IE and Opera
|
||||
}
|
||||
|
||||
toggleMobileOpen () {
|
||||
this.setState({ mobileOpen: !this.state.mobileOpen })
|
||||
}
|
||||
|
||||
toggleMenuOpen (index, allowed) {
|
||||
if (allowed) {
|
||||
if (this.state.openedMenu === index) {
|
||||
this.setState({ openedMenu: null })
|
||||
} else {
|
||||
this.setState({ openedMenu: index })
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
mouseLeave (allowed) {
|
||||
if (allowed) {
|
||||
this.setState({ openedMenu: null })
|
||||
}
|
||||
}
|
||||
|
||||
closeAll () {
|
||||
this.setState({ openedMenu: null, mobileOpen: false })
|
||||
}
|
||||
|
||||
componentDidMount () {
|
||||
window.addEventListener('scroll', () => this.handleScroll())
|
||||
const user = window.localStorage.getItem('user')
|
||||
this.setState({ user })
|
||||
}
|
||||
|
||||
componentWillUnmount () {
|
||||
window.removeEventListener('scroll', () => this.handleScroll())
|
||||
}
|
||||
|
||||
render () {
|
||||
const bigScreen = (this.props.width === 'lg' || this.props.width === 'xl')
|
||||
let { auth } = this.props
|
||||
let { onTop, mobileOpen, openedMenu } = this.state
|
||||
if (window.localStorage.getItem('access_token')) {
|
||||
if (jwtDecode(window.localStorage.getItem('access_token')).exp < new Date().getTime() / 1000) {
|
||||
window.localStorage.removeItem('access_token')
|
||||
window.localStorage.removeItem('user')
|
||||
window.localStorage.removeItem('name')
|
||||
window.location.reload()
|
||||
}
|
||||
}
|
||||
let user = JSON.parse(this.state.user)
|
||||
|
||||
const menus = allMenus.map(({ icon: Icon, to, title, submenus, authenticated }, index) => {
|
||||
if (authenticated && !(this.state.user !== undefined && this.state.user !== null)) {
|
||||
return
|
||||
}
|
||||
let cssChildren = submenus.length === 0 ? null : 'hasChildren'
|
||||
return (
|
||||
<li
|
||||
onMouseEnter={() => this.toggleMenuOpen(index, bigScreen)}
|
||||
onMouseLeave={() => this.mouseLeave(bigScreen)}
|
||||
key={index}
|
||||
className={openedMenu === index ? `primaryLink ${cssChildren} selected` : `primaryLink ${cssChildren}`}
|
||||
>
|
||||
{ bigScreen
|
||||
? <Link to={to} onClick={() => this.toggleMenuOpen(index, true)}> {title} </Link>
|
||||
: <a onClick={() => this.toggleMenuOpen(index, true)}> {title} </a>
|
||||
}
|
||||
{this.renderSubMenu(Icon, to, title, submenus, authenticated, index, bigScreen)}
|
||||
</li>
|
||||
)
|
||||
})
|
||||
|
||||
return (
|
||||
<React.Fragment>
|
||||
<header className={onTop ? 'menu' : 'menu notOnTop'}>
|
||||
<div className='container'>
|
||||
<Link to='/'> <img className='logo' src={AALogo} alt='Superalgos' /> </Link>
|
||||
<div className={mobileOpen ? 'mobileHandle openedMobile' : 'mobileHandle'} onClick={() => this.toggleMobileOpen()}>
|
||||
Menu
|
||||
</div>
|
||||
<nav className={mobileOpen ? 'links openedMobile' : 'links'}>
|
||||
<ul className='primaryMenu'>
|
||||
<li className='primaryLink'>
|
||||
<Link to='/charts'> Charts </Link>
|
||||
</li>
|
||||
{menus}
|
||||
{this.state.user !== undefined && this.state.user !== null ? (
|
||||
<LoggedIn
|
||||
user={user}
|
||||
auth={auth}
|
||||
bigScreen={bigScreen}
|
||||
openedMenu={openedMenu}
|
||||
toggleMenuOpen={(keyValue, allowedValue) => this.toggleMenuOpen(keyValue, allowedValue)}
|
||||
mouseLeave={(allowedValue) => this.mouseLeave(allowedValue)}
|
||||
closeAll={() => this.closeAll()}
|
||||
/>
|
||||
) : (
|
||||
<React.Fragment>
|
||||
<li className='primaryLink'>
|
||||
<a href='https://www.superalgos.org/documentation-quick-start.shtml'> Docs </a>
|
||||
</li>
|
||||
<li className='primaryLink'>
|
||||
<a href='#' onClick={() => auth.login()}> Login / Sign Up </a>
|
||||
</li>
|
||||
</React.Fragment>
|
||||
)}
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
</header>
|
||||
{onTop ? '' : <div className='toTop' onClick={() => { this.scrollToTop() }} />}
|
||||
</React.Fragment>
|
||||
)
|
||||
}
|
||||
|
||||
renderSubMenu (Icon, to, title, submenus, authenticated, index, bigScreen) {
|
||||
return submenus.length === 0 ? null : (
|
||||
<ul className='subMenu'>
|
||||
{ bigScreen
|
||||
? ''
|
||||
: <li key={index + 'home'}><Link to={to}> <Icon /> Module Home Page </Link></li>
|
||||
}
|
||||
{ submenus.length > 0 &&
|
||||
submenus.map(({ icon: SubIcon, to: subTo, title: subTitle, externalLink, authenticated: subAuthenticated }, subindex) => {
|
||||
if (subAuthenticated && !(this.state.user !== undefined && this.state.user !== null)) {
|
||||
return
|
||||
}
|
||||
if (externalLink) {
|
||||
return (
|
||||
<li key={subindex}><a href={subTo} target='_blank'> <SubIcon /> {subTitle} </a></li>
|
||||
)
|
||||
}
|
||||
return (
|
||||
<li key={subindex}><Link to={subTo} onClick={() => this.closeAll(index)}> <SubIcon /> {subTitle} </Link></li>
|
||||
)
|
||||
})}
|
||||
</ul>
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
Header.propTypes = {
|
||||
auth: PropTypes.object.isRequired
|
||||
}
|
||||
|
||||
export default withWidth()(Header)
|
||||
@@ -0,0 +1,21 @@
|
||||
import React from 'react'
|
||||
import { withStyles } from '@material-ui/core/styles'
|
||||
import Footer from './footer'
|
||||
import Header from './header'
|
||||
|
||||
// styles
|
||||
import styles from './styles'
|
||||
|
||||
class Index extends React.Component {
|
||||
render () {
|
||||
return (
|
||||
<div className={this.props.classes.layout}>
|
||||
<Header auth={this.props.auth} />
|
||||
<div>{this.props.children}</div>
|
||||
<Footer />
|
||||
</div>
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
export default withStyles(styles)(Index)
|
||||
@@ -0,0 +1,10 @@
|
||||
const styles = theme => ({
|
||||
layout: {
|
||||
display: 'flex',
|
||||
flexDirection: 'column',
|
||||
justifyContent: 'space-between',
|
||||
minHeight: 'calc(100vh)'
|
||||
}
|
||||
})
|
||||
|
||||
export default styles
|
||||
@@ -0,0 +1,42 @@
|
||||
const pathConfig = require('./webpack.path.config')
|
||||
|
||||
module.exports = {
|
||||
context: pathConfig.context,
|
||||
|
||||
entry: ['./src/index.js'],
|
||||
|
||||
module: {
|
||||
rules: [
|
||||
{
|
||||
test: /\.js$/,
|
||||
include: /node_modules\\@superalgos/,
|
||||
loader: 'babel-loader'
|
||||
},
|
||||
{
|
||||
test: /\.js$/,
|
||||
include: /node_modules\/@superalgos/,
|
||||
loader: 'babel-loader'
|
||||
},
|
||||
{
|
||||
test: /\.js$/,
|
||||
include: /node_modules\\@advancedalgos/,
|
||||
loader: 'babel-loader'
|
||||
},
|
||||
{
|
||||
test: /\.js$/,
|
||||
include: /node_modules\/@advancedalgos/,
|
||||
loader: 'babel-loader'
|
||||
},
|
||||
{
|
||||
test: /\.js$/,
|
||||
exclude: /node_modules/,
|
||||
loader: 'babel-loader'
|
||||
},
|
||||
{
|
||||
test: /\.(png|svg|jpg|gif)$/,
|
||||
use: [{ loader: 'file-loader' }
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
const path = require('path')
|
||||
|
||||
const context = path.resolve(__dirname, '../../..')
|
||||
|
||||
module.exports = {
|
||||
context
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
const webpack = require('webpack')
|
||||
const Dotenv = require('dotenv-webpack')
|
||||
const path = require('path')
|
||||
const merge = require('webpack-merge')
|
||||
const commonConfig = require('./helpers/webpack.common.config')
|
||||
const HtmlWebpackPlugin = require('html-webpack-plugin')
|
||||
const HtmlWebpackHarddiskPlugin = require('html-webpack-harddisk-plugin')
|
||||
const ScriptExtHtmlWebpackPlugin = require('script-ext-html-webpack-plugin')
|
||||
|
||||
module.exports = merge(commonConfig, {
|
||||
mode: 'development',
|
||||
devtool: 'inline-sourcemap',
|
||||
|
||||
output: {
|
||||
path: path.resolve(__dirname, '../../build'),
|
||||
filename: 'script.js',
|
||||
publicPath: '/'
|
||||
},
|
||||
|
||||
devServer: {
|
||||
historyApiFallback: {
|
||||
disableDotRule: true
|
||||
}
|
||||
},
|
||||
|
||||
plugins: [
|
||||
new Dotenv({
|
||||
path: '.env'
|
||||
}),
|
||||
new webpack.NamedModulesPlugin(),
|
||||
new HtmlWebpackPlugin({
|
||||
template: 'html/index.html',
|
||||
alwaysWriteToDisk: true
|
||||
}),
|
||||
new ScriptExtHtmlWebpackPlugin({
|
||||
defaultAttribute: 'async'
|
||||
}),
|
||||
new HtmlWebpackHarddiskPlugin()
|
||||
],
|
||||
module: {
|
||||
rules: [
|
||||
{
|
||||
test: /\.s?[ac]ss$/,
|
||||
loader: 'style-loader!css-loader!postcss-loader!sass-loader'
|
||||
}
|
||||
]
|
||||
},
|
||||
target: 'web'
|
||||
})
|
||||
@@ -0,0 +1,68 @@
|
||||
const webpack = require('webpack')
|
||||
const path = require('path')
|
||||
const merge = require('webpack-merge')
|
||||
const commonConfig = require('./helpers/webpack.common.config')
|
||||
const MiniCssExtractPlugin = require('mini-css-extract-plugin')
|
||||
const OptimizeCSSAssetsPlugin = require('optimize-css-assets-webpack-plugin')
|
||||
const HtmlWebpackPlugin = require('html-webpack-plugin')
|
||||
const HtmlWebpackHarddiskPlugin = require('html-webpack-harddisk-plugin')
|
||||
const ScriptExtHtmlWebpackPlugin = require('script-ext-html-webpack-plugin')
|
||||
const Dotenv = require('dotenv-webpack')
|
||||
|
||||
module.exports = merge(commonConfig, {
|
||||
mode: 'production',
|
||||
devtool: 'inline-sourcemap',
|
||||
output: {
|
||||
path: path.resolve(__dirname, '../../build'),
|
||||
filename: 'script.js',
|
||||
publicPath: '/'
|
||||
},
|
||||
|
||||
optimization: {
|
||||
minimizer: [
|
||||
new OptimizeCSSAssetsPlugin({})
|
||||
],
|
||||
splitChunks: {
|
||||
cacheGroups: {
|
||||
styles: {
|
||||
name: 'styles',
|
||||
test: /\.css$/,
|
||||
chunks: 'all',
|
||||
enforce: true
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
plugins: [
|
||||
new Dotenv(),
|
||||
new MiniCssExtractPlugin({
|
||||
filename: '[name].css',
|
||||
chunkFilename: '[id].css'
|
||||
}),
|
||||
new HtmlWebpackPlugin({
|
||||
template: 'html/index.html',
|
||||
alwaysWriteToDisk: true
|
||||
}),
|
||||
new ScriptExtHtmlWebpackPlugin({
|
||||
defaultAttribute: 'async'
|
||||
}),
|
||||
new HtmlWebpackHarddiskPlugin(),
|
||||
new webpack.DefinePlugin({
|
||||
'process.env.NODE_ENV': JSON.stringify('production')
|
||||
})
|
||||
],
|
||||
module: {
|
||||
rules: [
|
||||
{
|
||||
test: /\.scss$/,
|
||||
use: [
|
||||
MiniCssExtractPlugin.loader,
|
||||
{ loader: 'css-loader', options: { importLoaders: 2 } },
|
||||
'postcss-loader',
|
||||
{ loader: 'sass-loader' }
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
target: 'web'
|
||||
})
|
||||
@@ -0,0 +1,9 @@
|
||||
let config = null
|
||||
|
||||
if (process.env.NODE_ENV === 'production') {
|
||||
config = require('./tools/webpack/webpack.prod.config.js')
|
||||
} else {
|
||||
config = require('./tools/webpack/webpack.dev.config.js')
|
||||
}
|
||||
|
||||
module.exports = config
|
||||
@@ -0,0 +1,220 @@
|
||||
version: "3"
|
||||
|
||||
services:
|
||||
postgres:
|
||||
image: postgres:11-alpine
|
||||
restart: always
|
||||
environment:
|
||||
POSTGRES_USER: prisma
|
||||
POSTGRES_PASSWORD: prisma
|
||||
POSTGRES_DB: prisma
|
||||
volumes:
|
||||
- postgresdb_data:/var/lib/postgresql/data-teams
|
||||
networks:
|
||||
- superalgos_net
|
||||
|
||||
minio:
|
||||
image: minio/minio:RELEASE.2019-07-05T21-20-21Z
|
||||
volumes:
|
||||
- minio_data:/data
|
||||
environment:
|
||||
MINIO_ACCESS_KEY: minio
|
||||
MINIO_SECRET_KEY: minio123
|
||||
command: server /data
|
||||
networks:
|
||||
- superalgos_net
|
||||
|
||||
prisma:
|
||||
image: prismagraphql/prisma:1.27
|
||||
restart: always
|
||||
environment:
|
||||
PRISMA_CONFIG: |
|
||||
port: 4466
|
||||
# uncomment the next line and provide the env var PRISMA_MANAGEMENT_API_SECRET=my-secret to activate cluster security
|
||||
managementApiSecret: prisma_secret
|
||||
databases:
|
||||
default:
|
||||
connector: postgres
|
||||
host: postgres
|
||||
port: 5432
|
||||
user: prisma
|
||||
password: prisma
|
||||
migrations: true
|
||||
volumes:
|
||||
- postgresdb_data:/data/db
|
||||
networks:
|
||||
- superalgos_net
|
||||
depends_on:
|
||||
- postgres
|
||||
|
||||
teams-deploy:
|
||||
image: superalgos/teams-prisma:0.1.0
|
||||
restart: "no"
|
||||
env_file: ./env/teams-prisma.env
|
||||
command: sh -c './wait-for prisma:4466 -- prisma deploy'
|
||||
networks:
|
||||
- superalgos_net
|
||||
depends_on:
|
||||
- prisma
|
||||
|
||||
teams-api:
|
||||
image: superalgos/teams-api:0.1.0
|
||||
restart: always
|
||||
env_file: ./env/teams-api.env
|
||||
command: sh -c './wait-for prisma:4466 -- node .'
|
||||
networks:
|
||||
- superalgos_net
|
||||
depends_on:
|
||||
- teams-deploy
|
||||
|
||||
mongo:
|
||||
image: mongo:4.0.9
|
||||
restart: always
|
||||
volumes:
|
||||
- mongodb_data:/data/db
|
||||
networks:
|
||||
- superalgos_net
|
||||
|
||||
mongo-express:
|
||||
image: mongo-express
|
||||
restart: always
|
||||
ports:
|
||||
- "8081:8081"
|
||||
networks:
|
||||
- superalgos_net
|
||||
depends_on:
|
||||
- mongo
|
||||
|
||||
saweb-api:
|
||||
image: superalgos/saweb-api:0.1.0
|
||||
restart: always
|
||||
env_file: ./env/saweb-api.env
|
||||
command: node .
|
||||
networks:
|
||||
- superalgos_net
|
||||
depends_on:
|
||||
- mongo-express
|
||||
|
||||
logs-api:
|
||||
image: superalgos/logs-api:0.1.0
|
||||
restart: always
|
||||
env_file: ./env/logs-api.env
|
||||
command: node .
|
||||
networks:
|
||||
- superalgos_net
|
||||
depends_on:
|
||||
- mongo-express
|
||||
|
||||
clones-api:
|
||||
image: superalgos/clones-api:0.1.0
|
||||
restart: always
|
||||
env_file: ./env/clones-api.env
|
||||
command: node .
|
||||
networks:
|
||||
- superalgos_net
|
||||
depends_on:
|
||||
- mongo-express
|
||||
|
||||
cockpit-api:
|
||||
image: superalgos/cockpit-api:0.1.0
|
||||
restart: always
|
||||
env_file: ./env/cockpit-api.env
|
||||
command: node .
|
||||
networks:
|
||||
- superalgos_net
|
||||
depends_on:
|
||||
- mongo-express
|
||||
|
||||
strategizer-api:
|
||||
image: superalgos/strategizer-api:0.1.0
|
||||
restart: always
|
||||
env_file: ./env/strategizer-api.env
|
||||
command: node .
|
||||
networks:
|
||||
- superalgos_net
|
||||
depends_on:
|
||||
- mongo-express
|
||||
|
||||
events-api:
|
||||
image: superalgos/events-api:0.1.0
|
||||
restart: always
|
||||
env_file: ./env/events-api.env
|
||||
command: node .
|
||||
networks:
|
||||
- superalgos_net
|
||||
depends_on:
|
||||
- mongo-express
|
||||
|
||||
users-api:
|
||||
image: superalgos/users-api:0.1.0
|
||||
restart: always
|
||||
env_file: ./env/users-api.env
|
||||
command: node .
|
||||
networks:
|
||||
- superalgos_net
|
||||
depends_on:
|
||||
- mongo-express
|
||||
|
||||
keyvault-api:
|
||||
image: superalgos/keyvault-api:0.1.0
|
||||
restart: always
|
||||
env_file: ./env/keyvault-api.env
|
||||
command: node .
|
||||
networks:
|
||||
- superalgos_net
|
||||
depends_on:
|
||||
- mongo-express
|
||||
|
||||
notifications-api:
|
||||
image: superalgos/notifications-api:0.1.0
|
||||
restart: always
|
||||
env_file: ./env/notifications-api.env
|
||||
command: node .
|
||||
networks:
|
||||
- superalgos_net
|
||||
depends_on:
|
||||
- prisma
|
||||
|
||||
master-app:
|
||||
image: superalgos/master-app:0.1.0
|
||||
restart: always
|
||||
env_file: ./env/master-app.env
|
||||
command: ["nginx"]
|
||||
ports:
|
||||
- "3100:3100"
|
||||
networks:
|
||||
- superalgos_net
|
||||
|
||||
master-app-api:
|
||||
image: superalgos/master-app-api:0.1.0
|
||||
restart: always
|
||||
env_file: ./env/master-app-api.env
|
||||
command: sh -c './wait-for users-api:4000 -- ./wait-for teams-api:4001 -- ./wait-for keyvault-api:4002 -- ./wait-for clones-api:4003 -- ./wait-for saweb-api:4004 -- ./wait-for events-api:4005 -- ./wait-for notifications-api:4006 -- ./wait-for logs-api:4007 -- ./wait-for strategizer-api:4008 -- ./wait-for cockpit-api:4009 -- node .'
|
||||
ports:
|
||||
- "4100:4100"
|
||||
networks:
|
||||
- superalgos_net
|
||||
|
||||
aaweb:
|
||||
image: superalgos/aaweb:0.1.0
|
||||
restart: always
|
||||
env_file: ./env/aaweb.env
|
||||
command: node server
|
||||
ports:
|
||||
- "4101:4101"
|
||||
networks:
|
||||
- superalgos_net
|
||||
|
||||
kubernetes:
|
||||
image: qoomon/docker-host:2.2.0
|
||||
cap_add: [ 'NET_ADMIN', 'NET_RAW' ]
|
||||
restart: on-failure
|
||||
networks:
|
||||
- superalgos_net
|
||||
|
||||
networks:
|
||||
superalgos_net:
|
||||
|
||||
volumes:
|
||||
mongodb_data:
|
||||
postgresdb_data:
|
||||
@@ -0,0 +1,246 @@
|
||||
version: "3"
|
||||
|
||||
services:
|
||||
postgres:
|
||||
image: postgres:11-alpine
|
||||
restart: always
|
||||
environment:
|
||||
POSTGRES_USER: prisma
|
||||
POSTGRES_PASSWORD: prisma
|
||||
POSTGRES_DB: prisma
|
||||
volumes:
|
||||
- postgresdb_data:/var/lib/postgresql/data-teams
|
||||
networks:
|
||||
- superalgos_net
|
||||
|
||||
minio:
|
||||
image: minio/minio:RELEASE.2019-07-05T21-20-21Z
|
||||
volumes:
|
||||
- 'C:\superalgos\data:/data'
|
||||
ports:
|
||||
- "9000:9000"
|
||||
environment:
|
||||
MINIO_ACCESS_KEY: minio
|
||||
MINIO_SECRET_KEY: minio123
|
||||
command: server /data
|
||||
networks:
|
||||
- superalgos_net
|
||||
|
||||
prisma:
|
||||
image: prismagraphql/prisma:1.27
|
||||
restart: always
|
||||
environment:
|
||||
PRISMA_CONFIG: |
|
||||
port: 4466
|
||||
# uncomment the next line and provide the env var PRISMA_MANAGEMENT_API_SECRET=my-secret to activate cluster security
|
||||
managementApiSecret: prisma_secret
|
||||
databases:
|
||||
default:
|
||||
connector: postgres
|
||||
host: postgres
|
||||
port: 5432
|
||||
user: prisma
|
||||
password: prisma
|
||||
migrations: true
|
||||
ports:
|
||||
- "4466:4466"
|
||||
volumes:
|
||||
- postgresdb_data:/data/db
|
||||
networks:
|
||||
- superalgos_net
|
||||
depends_on:
|
||||
- postgres
|
||||
|
||||
teams-deploy:
|
||||
image: superalgos/teams-prisma:0.1.0
|
||||
restart: "no"
|
||||
env_file: ./env/teams-prisma.env
|
||||
command: sh -c './wait-for prisma:4466 -- prisma deploy'
|
||||
networks:
|
||||
- superalgos_net
|
||||
depends_on:
|
||||
- prisma
|
||||
|
||||
teams-api:
|
||||
image: superalgos/teams-api:0.1.0
|
||||
restart: always
|
||||
env_file: ./env/teams-api.env
|
||||
command: sh -c './wait-for prisma:4466 -- node .'
|
||||
ports:
|
||||
- "4001:4001"
|
||||
networks:
|
||||
- superalgos_net
|
||||
depends_on:
|
||||
- teams-deploy
|
||||
|
||||
mongo:
|
||||
image: mongo:4.0.9
|
||||
restart: always
|
||||
volumes:
|
||||
- mongodb_data:/data/db
|
||||
ports:
|
||||
- "27017:27017"
|
||||
networks:
|
||||
- superalgos_net
|
||||
|
||||
mongo-express:
|
||||
image: mongo-express
|
||||
restart: always
|
||||
ports:
|
||||
- "8081:8081"
|
||||
networks:
|
||||
- superalgos_net
|
||||
depends_on:
|
||||
- mongo
|
||||
|
||||
saweb-api:
|
||||
image: superalgos/saweb-api:0.1.0
|
||||
restart: always
|
||||
env_file: ./env/saweb-api.env
|
||||
command: node .
|
||||
ports:
|
||||
- "4004:4004"
|
||||
networks:
|
||||
- superalgos_net
|
||||
depends_on:
|
||||
- mongo-express
|
||||
|
||||
logs-api:
|
||||
image: superalgos/logs-api:0.1.0
|
||||
restart: always
|
||||
env_file: ./env/logs-api.env
|
||||
command: node .
|
||||
ports:
|
||||
- "4007:4007"
|
||||
networks:
|
||||
- superalgos_net
|
||||
depends_on:
|
||||
- mongo-express
|
||||
|
||||
clones-api:
|
||||
image: superalgos/clones-api:0.1.0
|
||||
restart: always
|
||||
env_file: ./env/clones-api.env
|
||||
command: node .
|
||||
ports:
|
||||
- "4003:4003"
|
||||
networks:
|
||||
- superalgos_net
|
||||
depends_on:
|
||||
- mongo-express
|
||||
|
||||
cockpit-api:
|
||||
image: superalgos/cockpit-api:0.1.0
|
||||
restart: always
|
||||
env_file: ./env/cockpit-api.env
|
||||
command: node .
|
||||
ports:
|
||||
- "4009:4009"
|
||||
networks:
|
||||
- superalgos_net
|
||||
depends_on:
|
||||
- mongo-express
|
||||
|
||||
strategizer-api:
|
||||
image: superalgos/strategizer-api:0.1.0
|
||||
restart: always
|
||||
env_file: ./env/strategizer-api.env
|
||||
command: node .
|
||||
ports:
|
||||
- "4008:4008"
|
||||
networks:
|
||||
- superalgos_net
|
||||
depends_on:
|
||||
- mongo-express
|
||||
|
||||
events-api:
|
||||
image: superalgos/events-api:0.1.0
|
||||
restart: always
|
||||
env_file: ./env/events-api.env
|
||||
command: node .
|
||||
ports:
|
||||
- "4005:4005"
|
||||
networks:
|
||||
- superalgos_net
|
||||
depends_on:
|
||||
- mongo-express
|
||||
|
||||
users-api:
|
||||
image: superalgos/users-api:0.1.0
|
||||
restart: always
|
||||
env_file: ./env/users-api.env
|
||||
command: node .
|
||||
ports:
|
||||
- "4000:4000"
|
||||
networks:
|
||||
- superalgos_net
|
||||
depends_on:
|
||||
- mongo-express
|
||||
|
||||
keyvault-api:
|
||||
image: superalgos/keyvault-api:0.1.0
|
||||
restart: always
|
||||
env_file: ./env/keyvault-api.env
|
||||
command: node .
|
||||
ports:
|
||||
- "4002:4002"
|
||||
networks:
|
||||
- superalgos_net
|
||||
depends_on:
|
||||
- mongo-express
|
||||
|
||||
notifications-api:
|
||||
image: superalgos/notifications-api:0.1.0
|
||||
restart: always
|
||||
env_file: ./env/notifications-api.env
|
||||
command: node .
|
||||
ports:
|
||||
- "4006:4006"
|
||||
networks:
|
||||
- superalgos_net
|
||||
depends_on:
|
||||
- prisma
|
||||
|
||||
master-app:
|
||||
image: superalgos/master-app:0.1.0
|
||||
restart: always
|
||||
env_file: ./env/master-app.env
|
||||
command: ["nginx"]
|
||||
ports:
|
||||
- "3100:3100"
|
||||
networks:
|
||||
- superalgos_net
|
||||
|
||||
master-app-api:
|
||||
image: superalgos/master-app-api:0.1.0
|
||||
restart: always
|
||||
env_file: ./env/master-app-api.env
|
||||
command: sh -c './wait-for users-api:4000 -- ./wait-for teams-api:4001 -- ./wait-for keyvault-api:4002 -- ./wait-for clones-api:4003 -- ./wait-for saweb-api:4004 -- ./wait-for events-api:4005 -- ./wait-for notifications-api:4006 -- ./wait-for logs-api:4007 -- ./wait-for strategizer-api:4008 -- ./wait-for cockpit-api:4009 -- node .'
|
||||
ports:
|
||||
- "4100:4100"
|
||||
networks:
|
||||
- superalgos_net
|
||||
|
||||
aaweb:
|
||||
image: superalgos/aaweb:0.1.0
|
||||
restart: always
|
||||
env_file: ./env/aaweb.env
|
||||
command: node server
|
||||
ports:
|
||||
- "4101:4101"
|
||||
networks:
|
||||
- superalgos_net
|
||||
|
||||
kubernetes:
|
||||
image: qoomon/docker-host:2.2.0
|
||||
cap_add: [ 'NET_ADMIN', 'NET_RAW' ]
|
||||
restart: on-failure
|
||||
networks:
|
||||
- superalgos_net
|
||||
|
||||
networks:
|
||||
superalgos_net:
|
||||
|
||||
volumes:
|
||||
mongodb_data:
|
||||
postgresdb_data:
|
||||
@@ -0,0 +1,260 @@
|
||||
version: "3"
|
||||
|
||||
services:
|
||||
postgres:
|
||||
image: postgres:11-alpine
|
||||
restart: always
|
||||
environment:
|
||||
POSTGRES_USER: prisma
|
||||
POSTGRES_PASSWORD: prisma
|
||||
POSTGRES_DB: prisma
|
||||
volumes:
|
||||
- postgresdb_data:/var/lib/postgresql/data-teams
|
||||
networks:
|
||||
- superalgos_net
|
||||
|
||||
minio:
|
||||
image: minio/minio:RELEASE.2019-07-05T21-20-21Z
|
||||
volumes:
|
||||
- 'D:\data:/data'
|
||||
ports:
|
||||
- "9000:9000"
|
||||
environment:
|
||||
MINIO_ACCESS_KEY: minio
|
||||
MINIO_SECRET_KEY: minio123
|
||||
command: server /data
|
||||
networks:
|
||||
- superalgos_net
|
||||
|
||||
prisma:
|
||||
image: prismagraphql/prisma:1.27
|
||||
restart: always
|
||||
environment:
|
||||
PRISMA_CONFIG: |
|
||||
port: 4466
|
||||
# uncomment the next line and provide the env var PRISMA_MANAGEMENT_API_SECRET=my-secret to activate cluster security
|
||||
managementApiSecret: prisma_secret
|
||||
databases:
|
||||
default:
|
||||
connector: postgres
|
||||
host: postgres
|
||||
port: 5432
|
||||
user: prisma
|
||||
password: prisma
|
||||
migrations: true
|
||||
ports:
|
||||
- "4466:4466"
|
||||
volumes:
|
||||
- postgresdb_data:/data/db
|
||||
networks:
|
||||
- superalgos_net
|
||||
depends_on:
|
||||
- postgres
|
||||
|
||||
teams-deploy:
|
||||
image: superalgos/teams-prisma:0.1.0
|
||||
restart: "no"
|
||||
build: ../TeamsPrisma
|
||||
env_file: ./env/teams-prisma.env
|
||||
command: sh -c './wait-for prisma:4466 -- prisma deploy'
|
||||
networks:
|
||||
- superalgos_net
|
||||
depends_on:
|
||||
- prisma
|
||||
|
||||
teams-api:
|
||||
image: superalgos/teams-api:0.1.0
|
||||
restart: always
|
||||
build: ../TeamsModule/api
|
||||
env_file: ./env/teams-api.env
|
||||
command: sh -c './wait-for prisma:4466 -- node .'
|
||||
ports:
|
||||
- "4001:4001"
|
||||
networks:
|
||||
- superalgos_net
|
||||
depends_on:
|
||||
- teams-deploy
|
||||
|
||||
mongo:
|
||||
image: mongo:4.0.9
|
||||
restart: always
|
||||
volumes:
|
||||
- mongodb_data:/data/db
|
||||
ports:
|
||||
- "27017:27017"
|
||||
networks:
|
||||
- superalgos_net
|
||||
|
||||
mongo-express:
|
||||
image: mongo-express
|
||||
restart: always
|
||||
ports:
|
||||
- "8081:8081"
|
||||
networks:
|
||||
- superalgos_net
|
||||
depends_on:
|
||||
- mongo
|
||||
|
||||
saweb-api:
|
||||
image: superalgos/saweb-api:0.1.0
|
||||
restart: always
|
||||
build: ../saweb-api
|
||||
env_file: ./env/saweb-api.env
|
||||
command: node .
|
||||
ports:
|
||||
- "4004:4004"
|
||||
networks:
|
||||
- superalgos_net
|
||||
depends_on:
|
||||
- mongo-express
|
||||
|
||||
logs-api:
|
||||
image: superalgos/logs-api:0.1.0
|
||||
restart: always
|
||||
build: ../LogsServerModule
|
||||
env_file: ./env/logs-api.env
|
||||
command: node .
|
||||
ports:
|
||||
- "4007:4007"
|
||||
networks:
|
||||
- superalgos_net
|
||||
depends_on:
|
||||
- mongo-express
|
||||
|
||||
clones-api:
|
||||
image: superalgos/clones-api:0.1.0
|
||||
restart: always
|
||||
build: ../OperationsModule/server
|
||||
env_file: ./env/clones-api.env
|
||||
command: node .
|
||||
ports:
|
||||
- "4003:4003"
|
||||
networks:
|
||||
- superalgos_net
|
||||
depends_on:
|
||||
- mongo-express
|
||||
|
||||
cockpit-api:
|
||||
image: superalgos/cockpit-api:0.1.0
|
||||
restart: always
|
||||
build: ../CockpitServerModule
|
||||
env_file: ./env/cockpit-api.env
|
||||
command: node .
|
||||
ports:
|
||||
- "4009:4009"
|
||||
networks:
|
||||
- superalgos_net
|
||||
depends_on:
|
||||
- mongo-express
|
||||
|
||||
strategizer-api:
|
||||
image: superalgos/strategizer-api:0.1.0
|
||||
restart: always
|
||||
build: ../StrategizerServerModule
|
||||
env_file: ./env/strategizer-api.env
|
||||
command: node .
|
||||
ports:
|
||||
- "4008:4008"
|
||||
networks:
|
||||
- superalgos_net
|
||||
depends_on:
|
||||
- mongo-express
|
||||
|
||||
events-api:
|
||||
image: superalgos/events-api:0.1.0
|
||||
restart: always
|
||||
build: ../EventsServerModule
|
||||
env_file: ./env/events-api.env
|
||||
command: node .
|
||||
ports:
|
||||
- "4005:4005"
|
||||
networks:
|
||||
- superalgos_net
|
||||
depends_on:
|
||||
- mongo-express
|
||||
|
||||
users-api:
|
||||
image: superalgos/users-api:0.1.0
|
||||
restart: always
|
||||
build: ../UsersModule/server
|
||||
env_file: ./env/users-api.env
|
||||
command: node .
|
||||
ports:
|
||||
- "4000:4000"
|
||||
networks:
|
||||
- superalgos_net
|
||||
depends_on:
|
||||
- mongo-express
|
||||
|
||||
keyvault-api:
|
||||
image: superalgos/keyvault-api:0.1.0
|
||||
restart: always
|
||||
build: ../KeyVaultModule/server
|
||||
env_file: ./env/keyvault-api.env
|
||||
command: node .
|
||||
ports:
|
||||
- "4002:4002"
|
||||
networks:
|
||||
- superalgos_net
|
||||
depends_on:
|
||||
- mongo-express
|
||||
|
||||
notifications-api:
|
||||
image: superalgos/notifications-api:0.1.0
|
||||
restart: always
|
||||
build: ../NotificationsModule/server
|
||||
env_file: ./env/notifications-api.env
|
||||
command: node .
|
||||
ports:
|
||||
- "4006:4006"
|
||||
networks:
|
||||
- superalgos_net
|
||||
depends_on:
|
||||
- prisma
|
||||
|
||||
master-app:
|
||||
image: superalgos/master-app:0.1.0
|
||||
restart: always
|
||||
build: ./client
|
||||
env_file: ./env/master-app.env
|
||||
command: ["nginx"]
|
||||
ports:
|
||||
- "3100:3100"
|
||||
networks:
|
||||
- superalgos_net
|
||||
|
||||
master-app-api:
|
||||
image: superalgos/master-app-api:0.1.0
|
||||
restart: always
|
||||
build: ./server
|
||||
env_file: ./env/master-app-api.env
|
||||
command: sh -c './wait-for users-api:4000 -- ./wait-for teams-api:4001 -- ./wait-for keyvault-api:4002 -- ./wait-for clones-api:4003 -- ./wait-for saweb-api:4004 -- ./wait-for events-api:4005 -- ./wait-for notifications-api:4006 -- ./wait-for logs-api:4007 -- ./wait-for strategizer-api:4008 -- ./wait-for cockpit-api:4009 -- node .'
|
||||
ports:
|
||||
- "4100:4100"
|
||||
networks:
|
||||
- superalgos_net
|
||||
|
||||
aaweb:
|
||||
image: superalgos/aaweb:0.1.0
|
||||
restart: always
|
||||
build: ../AAWeb
|
||||
env_file: ./env/aaweb.env
|
||||
command: node server
|
||||
ports:
|
||||
- "4101:4101"
|
||||
networks:
|
||||
- superalgos_net
|
||||
|
||||
kubernetes:
|
||||
image: qoomon/docker-host:2.2.0
|
||||
cap_add: [ 'NET_ADMIN', 'NET_RAW' ]
|
||||
restart: on-failure
|
||||
networks:
|
||||
- superalgos_net
|
||||
|
||||
networks:
|
||||
superalgos_net:
|
||||
|
||||
volumes:
|
||||
mongodb_data:
|
||||
postgresdb_data:
|
||||
@@ -0,0 +1,21 @@
|
||||
# Refactoring Modules for use within Master app
|
||||
|
||||
1. Add `basename={window.location.pathname}` to BrowserRouter props in App.js.
|
||||
2. Update Router paths. Remove home, callback routes.
|
||||
3. Remove Material-ui theme provider.
|
||||
4. Remove Apollo React.
|
||||
5. Update auth handling. Pass as props or pull from local storage.
|
||||
6. Remove header and footer.
|
||||
7. Update [Material-UI Typography variants](https://material-ui.com/style/typography/#migration-to-typography-v2)
|
||||
8. Add react hot module: `npm i react-hot-loader -D`
|
||||
|
||||
## Developing Module with Master App
|
||||
|
||||
### Setup
|
||||
The symlinks in
|
||||
1. Navigate to your module client.
|
||||
2. Run `npm link`
|
||||
3. Navigate `MasterApp/client`.
|
||||
4. Run `npm link [you-module-package]`. eg `npm link @superalgos/teams-client`
|
||||
5. Start server: `npm run dev`
|
||||
6. When a change is made in your module, after a second or two, the browser page should update without reloading.
|
||||
@@ -0,0 +1,13 @@
|
||||
NODE_ENV=production
|
||||
PORT=4101
|
||||
|
||||
#Log options
|
||||
CONSOLE_LOG=false
|
||||
CONSOLE_ERROR_LOG=true
|
||||
LOG_FILE_CONTENT=false
|
||||
|
||||
# Server commands
|
||||
PATH_TO_CANVAS_APP=./dependency/CanvasApp
|
||||
PATH_TO_FILES_COMPONENT=./dependency/Files-Component/src
|
||||
|
||||
GATEWAY_ENDPOINT=http://host.docker.internal:4100/graphql
|
||||
@@ -0,0 +1,27 @@
|
||||
NODE_ENV=production
|
||||
PORT=4003
|
||||
|
||||
FULL_LOG=false
|
||||
|
||||
# Database configuration
|
||||
MONGO_URL=mongodb://host.docker.internal:27017/operations
|
||||
|
||||
GATEWAY_ENDPOINT=http://host.docker.internal:4100/graphql
|
||||
OPERATIONS_API_PRESHARED=clones_key
|
||||
|
||||
# Temporary restriction on asset balances
|
||||
ACCESS_CODE=access_code
|
||||
DEFAULT_BALANCE_ASSET_A=0
|
||||
DEFAULT_BALANCE_ASSET_B=0.001
|
||||
|
||||
# Kubernetes configuration
|
||||
GATEWAY_ENDPOINT_K8S=http://host.docker.internal:4100/graphql
|
||||
CLONE_EXECUTOR_IMAGE=superalgos/clone-executor:1.0.48
|
||||
|
||||
CLUSTER_SERVER=https://kubernetes:6445
|
||||
CLUSTER_NAME=docker-for-desktop-cluster
|
||||
INSECURE_SKIP_TLS_VERIFY=true
|
||||
CONTEXT_NAME=docker-for-desktop
|
||||
USER_NAME=docker-for-desktop
|
||||
CLIENT_CERTIFICATE_DATA=LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUM5RENDQWR5Z0F3SUJBZ0lJU2doRTQ5cFpBdEV3RFFZSktvWklodmNOQVFFTEJRQXdGVEVUTUJFR0ExVUUKQXhNS2EzVmlaWEp1WlhSbGN6QWVGdzB4T1RBME1Ua3hOVE13TXpOYUZ3MHlNREExTURJeE5ETXhNVFJhTURZeApGekFWQmdOVkJBb1REbk41YzNSbGJUcHRZWE4wWlhKek1Sc3dHUVlEVlFRREV4SmtiMk5yWlhJdFptOXlMV1JsCmMydDBiM0F3Z2dFaU1BMEdDU3FHU0liM0RRRUJBUVVBQTRJQkR3QXdnZ0VLQW9JQkFRQ3VERGppbnl5V3l4aVUKbVlzelIxUXhCdzAxZUltVTRnMU1VQVRIN3FCazFVdWdVVHAzWVUzWVJ1NitGdnpwbHVoY2lWVFByeDdDamRvcwo2ODBsM0pVWTdTZzdIYjNQTlRhQm9PdnlxSGVXYmd4TDBsQitXeG1lVEJ4QnlBV09VR0Fmd0pHVnBRL2JTQnNwCndhYmJrdXpmMzRxcFFreHFrRVVwbDlHOUhaNFZrZ0Mvb280Tm1YTlBOMmlSMkowUXN0TjY4ZmZqcGNQSVJCdzAKR3h5ZVJPNzh6SUQralpDYi9hUGt3YnZpVmNEV1ZvSU9VbWlUQlFzd1dTMCtzWG5tamtjWW8rR2JjVmdsT3BLVApxN0lPOUZoaDVGZ1RLZk9SYmxLNXl3YXdETXN2TmpVbEFUZ2ZKODU5ZXFRaGo3RlFSRUpQRkY2MGVId0Q4RGhhClpqL3ZLbnlwQWdNQkFBR2pKekFsTUE0R0ExVWREd0VCL3dRRUF3SUZvREFUQmdOVkhTVUVEREFLQmdnckJnRUYKQlFjREFqQU5CZ2txaGtpRzl3MEJBUXNGQUFPQ0FRRUFHM05RT1VNclJ3bHZINDRLRjMvSFV2eGxxTi9SRlpyQQpHZWlWREJ6cUpDd2wwSFBNQkh4T0ZCVnEvQ1dTQVNjeDJlV0xQWG5PNXBJOWFJckN5R3c3Y3A5S290TUVkVW4vCmVpMmVPdE1NSkpTMGt6empqUGNtOHZ2OXNNN2pvQXhWQkF1cG5VaStJMDRmSVRIcDlpSkxET29uUzJoanBpYm0KZzVQNlVUTGFBanUrNUhqRTZHZkNROFh2WVRRbytjUlV3MjhZd1l0SG5Cam5KVVRtK2lXand6WTJtbG1odGZlbQpJSkkzNGhXeEYrZHl6eVR4NEQ1aTNyeGtiWm5vQ3JTK1A2YmNWUFMvSWkreUk2WjdjKzlvdVNjaWlHRmNSWGhRCkMwa0NvV1k2L2FEYlVZRzZvSVdZZVB3OXhQbWVsdCtyRHdJdHFyYU5TWE9MQVV4R1llZmZXQT09Ci0tLS0tRU5EIENFUlRJRklDQVRFLS0tLS0K
|
||||
CLIENT_KEY_DATA=LS0tLS1CRUdJTiBSU0EgUFJJVkFURSBLRVktLS0tLQpNSUlFcFFJQkFBS0NBUUVBcmd3NDRwOHNsc3NZbEptTE0wZFVNUWNOTlhpSmxPSU5URkFFeCs2Z1pOVkxvRkU2CmQyRk4yRWJ1dmhiODZaYm9YSWxVejY4ZXdvM2FMT3ZOSmR5VkdPMG9PeDI5enpVMmdhRHI4cWgzbG00TVM5SlEKZmxzWm5rd2NRY2dGamxCZ0g4Q1JsYVVQMjBnYktjR20yNUxzMzkrS3FVSk1hcEJGS1pmUnZSMmVGWklBdjZLTwpEWmx6VHpkb2tkaWRFTExUZXZIMzQ2WER5RVFjTkJzY25rVHUvTXlBL28yUW0vMmo1TUc3NGxYQTFsYUNEbEpvCmt3VUxNRmt0UHJGNTVvNUhHS1BobTNGWUpUcVNrNnV5RHZSWVllUllFeW56a1c1U3Vjc0dzQXpMTHpZMUpRRTQKSHlmT2ZYcWtJWSt4VUVSQ1R4UmV0SGg4QS9BNFdtWS83eXA4cVFJREFRQUJBb0lCQVFDWWpXZnk0dmV2T0ZiVQpNUHo4dGtHS001Y1ZUaEN4YWEya1BPTGo1em01QitlZ25uSHpuMXNlL1pWWEVra2Q2VUxEa1MvQVZjdE5WZzVzCm4wWVNNSlNTNDVRR3ROdmcyZEJyc0lQL0RrQzducnV5WGFabUNpMmJQVFRyUjRudkltNE9ocmhVaFBnd0NMU2UKVmZtTnJldG5rc1V6OUVPTWgrWEhQaVg5Y0E5VzhVOEM5UGNoU3ZxSjFGR3crc0paLysyeGltdnF0RnUzMEZ0egphUkxOaEFVTmpGN2xuUUZhZS9pS2xGcDJ2MWRteXRCMUp5eTRkRzl1TFJSWWN4Qy9pa1Q4VUUzZ1RVdGR2V2lNClE4QXlQaVEvVVl3THVmazMreFIyUGxLUEFMdEF4MHhzWVJKTWVmaFJpWFlJWXZoa2srRTZPdGZyc2ZzZW15REoKODdRNzM3bnhBb0dCQU5pNy9GdkhBbmdnc1V3VDMzM1hoNzk5OGhiNTRWSzU1Yzc5MEtnRm9yeUpUYnhIWU5PZQpvRkdWbWd5YU92d1hWbnVhZFpoNlpsRU9mMXJXbVNPcWFXRjlGNFhYdnB6NWZuajJJUU1xV2ZUOTViSC9yaGRTClMzQTd1RmxQL3RlcS9JMmlpbHhsSFhKa3lEemxKeDJlbDhWR1hHeXpxTjBBZ3RPdjdvMElhYU9WQW9HQkFNMlUKZFJSMG5mRnd3MGpjVHVvU0ZBalBIaytEQnorZVRwbVFQWWZIZTJpb21qM0hadEkyMm1adG9sV1l4UTNqRjlPbAp5RkFvY2RjK2trS1V4VVBkMng3Qm44VkE5Rkg5bkN2NEZ1VDRJNmRPbUZkeWZtc3R1MkRnSWQ3aThYeGdURlM5CklPL0lqTWhuRzIzaHBVSkZDTU5VOCtMRXBKeUZBR29YK2lvcnFtL0ZBb0dCQU1IL2txWDcvc1BVVDU4UGNzOUwKcXlERzlYbUhkaDc4Y3kzU2w0Q3VlcnBVRkpiaE5WUjIrbjNNY1RXeW4vV2lWakVSVXcySEVpcWYxWE5ULzRPagpOK3loY2ZyRjRNTFZ1RlZCeXM3d2k5RDFxekttOEFmRUMrNk1KamtibDdzb1BDUHpSL0hvT0hGNnNKbUJiSC9nCncyMDd5K01vOVkvTXMwNFVmbTBUQ0t2NUFvR0JBTWl6dlRJQlFBbHRHMXBRcTBKZDcrMUJ0OGZNbGhFSURwaGgKZDVETnNhL1ZtdS9oY29LY1J0QmxERzBndnBEMk9sYklyUzJFcnMrREtPdVRycHE1UjZsWlF4QWlmK1JrQWtueQo1UGNaUWtXZXQ1LzRDVys5c0FlK0NaTStZS0FhcTZxM0VpYkcxcHIzL3BGaUVDTUlucXVFanEyL2FTM2RzeS9nCnhMelM4SXc1QW9HQUNOR2hlOWZmVkVCTDREZ1B5YjViNDhLVmttT2loMnl5VkMxTkRtakdiYWVhTWhLQzNzekQKMEVqZU0zTmNjNnViVmNGTGVUV0JBc2hJTk1zSENCWmZISFpRZk9ybkQ3dHNBY1M3MGt5eFBxZzc0c25TSEZPcAoxMlRXQnVFNUU5V2l0aW1JZHRJZWhwdlVLZVZWUTd0NXgrSnNsS2N3MnZ4YjdWV1E2SWg1cURrPQotLS0tLUVORCBSU0EgUFJJVkFURSBLRVktLS0tLQo=
|
||||
@@ -0,0 +1,6 @@
|
||||
NODE_ENV=production
|
||||
PORT=4009
|
||||
|
||||
PRESHARED_GATEWAY_KEY=cockpit_key
|
||||
|
||||
MONGO_URL=mongodb://host.docker.internal:27017/cockpit
|
||||
@@ -0,0 +1,10 @@
|
||||
NODE_ENV=production
|
||||
PORT=4005
|
||||
|
||||
MONGO_URL=mongodb://host.docker.internal:27017/operations
|
||||
|
||||
GATEWAY_ENDPOINT=http://host.docker.internal:4100/graphql
|
||||
PRESHARED_GATEWAY_KEY=events_key
|
||||
|
||||
SENTRY_DNS=https://55a47295db124d01af0120be919eff93@sentry.io/1313621
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
NODE_ENV=production
|
||||
PORT=4002
|
||||
|
||||
MONGO_URL=mongodb://host.docker.internal:27017/keyvault
|
||||
|
||||
GATEWAY_ENDPOINT=http://host.docker.internal:4100/graphql
|
||||
KEYVAULT_API_PRESHARED=keyvault_key
|
||||
|
||||
SERVER_SECRET=9%o|i6-mlihgOd&fXeUDB&ae+j"dnM+*
|
||||
@@ -0,0 +1,7 @@
|
||||
NODE_ENV=production
|
||||
PORT=4007
|
||||
|
||||
PRESHARED_GATEWAY_KEY=logs_key
|
||||
PRESHARED_ELK_LOG_KEY=preshared_log
|
||||
BEGIN_URL_ELK_LOG=https://logs-dev.superalgos.org/s/
|
||||
END_URL_ELK_LOG=/app/kibana#/dashboard/logdashboard?embed=true&_g=(refreshInterval%3A(pause%3A!t%2Cvalue%3A0)%2Ctime%3A(from%3Anow-6M%2Cmode%3Aquick%2Cto%3Anow))
|
||||
@@ -0,0 +1,27 @@
|
||||
TEAMS_API_PRESHARED=teams_key
|
||||
USERS_API_PRESHARED=users_key
|
||||
EVENTS_API_PRESHARED=events_key
|
||||
KEYVAULT_API_PRESHARED=keyvault_key
|
||||
NOTIFICATIONS_API_PRESHARED=notifications_key
|
||||
OPERATIONS_API_PRESHARED=clones_key
|
||||
LOGS_API_PRESHARED=logs_key
|
||||
STRATEGIZER_API_PRESHARED=strategizer_keys
|
||||
COCKPIT_API_PRESHARED=cockpit_key
|
||||
SAWEB_API_PRESHARED=saweb_key
|
||||
|
||||
GRAPHQL_API_URL=http://host.docker.internal:4100/graphql
|
||||
|
||||
TEAMS_API_URL=http://host.docker.internal:4001/graphql
|
||||
USERS_API_URL=http://host.docker.internal:4000/graphql
|
||||
EVENTS_API_URL=http://host.docker.internal:4005/graphql
|
||||
KEYVAULT_API_URL=http://host.docker.internal:4002/graphql
|
||||
NOTIFICATIONS_API_URL=http://host.docker.internal:4006/graphql
|
||||
OPERATIONS_API_URL=http://host.docker.internal:4003/graphql
|
||||
LOGS_API_URL=http://host.docker.internal:4007/graphql
|
||||
STRATEGIZER_API_URL=http://host.docker.internal:4008/graphql
|
||||
COCKPIT_API_URL=http://host.docker.internal:4009/graphql
|
||||
SAWEB_API_URL=http://host.docker.internal:4004/graphql
|
||||
|
||||
AUTH0_DOMAIN=superalgos.eu.auth0.com
|
||||
AUTH0_AUDIENCE=https://auth-local.superalgos.org
|
||||
AUTH0_ISSUER=https://superalgos.eu.auth0.com/
|
||||
@@ -0,0 +1,12 @@
|
||||
NODE_ENV=production
|
||||
PORT=3100
|
||||
|
||||
PLATFORM_API_URL=http://host.docker.internal:4100/graphql
|
||||
CANVAS_URL=http://host.docker.internal:4101/
|
||||
|
||||
AUTH0_DOMAIN=superalgos.eu.auth0.com
|
||||
AUTH0_AUDIENCE=https://auth-local.superalgos.org
|
||||
AUTH0_ISSUER=https://superalgos.eu.auth0.com/
|
||||
AUTH0_CLIENTID=jfendNx2Vpa3LJa58x8lEmoPTG3nJV3B
|
||||
AUTH0_CALLBACK_URL=http://host.docker.internal:3100/callback
|
||||
AUTH0_LOGOUT_URL=http://host.docker.internal:3100
|
||||
@@ -0,0 +1,29 @@
|
||||
NODE_ENV=production
|
||||
PORT=4006
|
||||
|
||||
PRESHARED_GATEWAY_KEY=notifications_key
|
||||
GENERATE_SOURCEMAP=false
|
||||
|
||||
# # SendGrid Api Keys
|
||||
# SG_APIKEY=
|
||||
# SG_APIKEY_CAMPAIGN=
|
||||
|
||||
# SG_MASTER_SIGNUP_EMAILID=
|
||||
# SG_MASTER_FEEDBACK_EMAILID=
|
||||
|
||||
# SG_CORPORATE_SIGNUP_EMAILID=
|
||||
# SG_CORPORATE_CONTACT_EMAILID=
|
||||
|
||||
# SG_TEAMS_MEMBER_INVITE_EMAILID=
|
||||
# SG_TEAMS_TEAMCREATE_EMAILID=
|
||||
|
||||
# #SendGrid Origins
|
||||
# SG_PLATFORM_ORIGIN=
|
||||
# SG_CORPORATE_ORIGIN=
|
||||
|
||||
# # Email addresses
|
||||
# CORPORATE_EMAIL=
|
||||
|
||||
# # Google ReCaptcha
|
||||
# RECAPTCHA=
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
NODE_ENV=production
|
||||
PORT=4004
|
||||
|
||||
LOG_LEVEL=error
|
||||
|
||||
MONGO_URL=mongodb://host.docker.internal:27017/saweb
|
||||
|
||||
GATEWAY_ENDPOINT=http://host.docker.internal:4100/graphql
|
||||
PRESHARED_GATEWAY_KEY=saweb_key
|
||||
|
||||
# The NODE_ENDPOINT is used at team creation and is where other components will search for the team
|
||||
NODE_ENDPOINT=http://host.docker.internal:4100/
|
||||
|
||||
# Storage Configuration
|
||||
STORAGE_PROVIDER=Minio
|
||||
# Minio
|
||||
MINIO_END_POINT=minio
|
||||
MINIO_PORT=9000
|
||||
MINIO_USE_SSL=false
|
||||
MINIO_ACCESS_KEY=minio
|
||||
MINIO_SECRET_KEY=minio123
|
||||
@@ -0,0 +1,7 @@
|
||||
NODE_ENV=production
|
||||
PORT=4008
|
||||
|
||||
MONGO_URL=mongodb://host.docker.internal:27017/strategies
|
||||
|
||||
GATEWAY_ENDPOINT=http://host.docker.internal:4100/graphql
|
||||
PRESHARED_GATEWAY_KEY=strategizer_keys
|
||||
@@ -0,0 +1,14 @@
|
||||
NODE_ENV=production
|
||||
PORT=4001
|
||||
|
||||
PRESHARED_GATEWAY_KEY=teams_key
|
||||
|
||||
PRISMA_SECRET=prisma_secret
|
||||
PRISMA_ENDPOINT=http://prisma:4466
|
||||
|
||||
GENERATE_SOURCEMAP=true
|
||||
SCHEMA_PATH=src/generated/prisma.graphql
|
||||
|
||||
PLATFORM_API_URL=http://host.docker.internal:4100/graphql
|
||||
|
||||
STORAGE_URL=https://aadevelop.blob.core.windows.net
|
||||
@@ -0,0 +1 @@
|
||||
PRISMA_MANAGEMENT_API_SECRET=prisma_secret
|
||||
@@ -0,0 +1,13 @@
|
||||
NODE_ENV=production
|
||||
PORT=4000
|
||||
|
||||
MONGO_URL=mongodb://host.docker.internal:27017/users
|
||||
|
||||
GATEWAY_ENDPOINT=http://host.docker.internal:4100/graphql
|
||||
USERS_API_PRESHARED=users_key
|
||||
|
||||
AUTH0_DOMAIN=superalgos.eu.auth0.com
|
||||
AUTH0_AUDIENCE=https://auth-dev.superalgos.org
|
||||
AUTH0_ISSUER=https://superalgos.eu.auth0.com/
|
||||
AUTH0_CALLBACK_URL=http://host.docker.internal/callback
|
||||
AUTH0_LOGOUT_URL=http://host.docker.internal
|
||||
@@ -0,0 +1,19 @@
|
||||
NODE_ENV=production
|
||||
PORT=4101
|
||||
|
||||
#Log options
|
||||
CONSOLE_LOG=false
|
||||
CONSOLE_ERROR_LOG=true
|
||||
LOG_FILE_CONTENT=false
|
||||
|
||||
# Server commands
|
||||
PATH_TO_CANVAS_APP=./dependency/CanvasApp
|
||||
PATH_TO_FILES_COMPONENT=./dependency/Files-Component/src
|
||||
|
||||
GATEWAY_ENDPOINT=http://master-app-api:4100/graphql
|
||||
|
||||
# Webproxy
|
||||
VIRTUAL_HOST=demo-charts-dev.superalgos.org
|
||||
LETSENCRYPT_HOST=demo-charts-dev.superalgos.org
|
||||
LETSENCRYPT_EMAIL=ssl-certificates@advancedalgos.org
|
||||
VIRTUAL_PORT=4101
|
||||
@@ -0,0 +1,26 @@
|
||||
NODE_ENV=production
|
||||
PORT=4003
|
||||
|
||||
FULL_LOG=false
|
||||
|
||||
# Database configuration
|
||||
MONGO_URL=mongodb://mongo/operations
|
||||
|
||||
GATEWAY_ENDPOINT=http://master-app-api:4100/graphql
|
||||
OPERATIONS_API_PRESHARED=clones_key
|
||||
|
||||
# Temporary restriction on asset balances
|
||||
ACCESS_CODE=access_code
|
||||
DEFAULT_BALANCE_ASSET_A=0
|
||||
DEFAULT_BALANCE_ASSET_B=0.001
|
||||
|
||||
# Kubernetes configuration
|
||||
GATEWAY_ENDPOINT_K8S=http://localhost:4100/graphql
|
||||
CLONE_EXECUTOR_IMAGE=superalgos/clone-executor:1.0.33
|
||||
|
||||
CLUSTER_SERVER=https://kubernetes:16443
|
||||
CLUSTER_NAME=microk8s-cluster
|
||||
CERTIFICATE_AUTHORITY_DATA=LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUMvakNDQWVhZ0F3SUJBZ0lKQU5LRmNnK2hiS0xpTUEwR0NTcUdTSWIzRFFFQkN3VUFNQlF4RWpBUUJnTlYKQkFNTUNURXlOeTR3TGpBdU1UQWVGdzB4T1RBMk1qQXhNak0yTURSYUZ3MDBOakV4TURVeE1qTTJNRFJhTUJReApFakFRQmdOVkJBTU1DVEV5Tnk0d0xqQXVNVENDQVNJd0RRWUpLb1pJaHZjTkFRRUJCUUFEZ2dFUEFEQ0NBUW9DCmdnRUJBTXBTSFhlZjFZSTRJR1UyeUlNNVM4THRxWTMxNklQczVnNGxORVlCV0wrME1mMXhBRURHRU0vaW4reTAKMkZ0QUFKWnhybWZ3UEpSTVozQ2tMMysxTnJxVjFtQW1wRkE5cDcxZXlOYmpuMmk2N0Y0N2MyeldGNlBTc0ZlYwowVUlmRklWaE9wWmgvUTN0WUQvZlQveEJlOTE2Wmd2eVY0TThCL1BGY2xKbWUyM1VTMHB3RGZObFpmc2FsQzhpCkVCc2pQYURrMThucng2bDVZTWF4UENyNHRnSWc2WENvQm9wS1l5UzNpZUtSSzh2Qnhyb3drN1pHWWJMUm1udHUKZUU4b1Z5RXpsUGVrNkJYQm1JRVp3MmJMeTNKeG42b3IyWmlZMEcrekRZKzYwN2dsaFVyNnhEM0QxUHUzMnozNQo0SldlbkJTem5wVjMvTDk0aUVFMEpsdG9xS3NDQXdFQUFhTlRNRkV3SFFZRFZSME9CQllFRkRERzhjUG5iZmIyCnd2cXBXSzdEYzlpckt3RnpNQjhHQTFVZEl3UVlNQmFBRkRERzhjUG5iZmIyd3ZxcFdLN0RjOWlyS3dGek1BOEcKQTFVZEV3RUIvd1FGTUFNQkFmOHdEUVlKS29aSWh2Y05BUUVMQlFBRGdnRUJBS1Bwclp6bnhaZEtuUUc1U3duSgpwWDBsditNNFF0R04zMDZwamxycTFtbWY2WXEwRDl5bEZ2WFRmNUtTWXZ0VGNaenorV1lReGNrc1JtUkIvOERjCjZnQ2hLSHFsV1NIV3FHcU94T1RQVFYvYktOd0NmY1BmaS81YzlFd0NtdjBndlA1Y0MxaTdWMUMxSEoxN0UwY0EKSzVEdytJMFd0Ky9kRWJXdnVhRStmcDBKT3hsdllMUGdkZlBoTnliL2lScDYzdHJudEhjdy9MOTEyM2xpMHF1aQo2VUJUZzFFYnR1VDZSVitsK2d5NkIvaENERG9IaUJRdnM3VmNqVXNaN1ZNUlpkckdlY0U5R3Q5Nkx2N0tNZ2lNCmQ4eFZXVGg5MnArU2lEem1vNnY1WVFvTHNqU25jK1NMK09jN2JsODRVSTFTNk1CVExSa0tRb0d6L0tPLzNrRkUKT08wPQotLS0tLUVORCBDRVJUSUZJQ0FURS0tLS0tCg==
|
||||
CONTEXT_NAME=microk8s-cluster
|
||||
USER_NAME=admin
|
||||
USER_PASSWORD=MGJmZDhZd3RnaGNyc3NqNGZZd3o1NzczazRJMnBtUWhuNGRvRXdIZXdvMD0K
|
||||
@@ -0,0 +1,6 @@
|
||||
NODE_ENV=production
|
||||
PORT=4009
|
||||
|
||||
PRESHARED_GATEWAY_KEY=cockpit_key
|
||||
|
||||
MONGO_URL=mongodb://mongo/cockpit
|
||||
@@ -0,0 +1,10 @@
|
||||
NODE_ENV=production
|
||||
PORT=4005
|
||||
|
||||
MONGO_URL=mongodb://mongo/operations
|
||||
|
||||
GATEWAY_ENDPOINT=http://master-app-api:4100/graphql
|
||||
PRESHARED_GATEWAY_KEY=events_key
|
||||
|
||||
SENTRY_DNS=https://55a47295db124d01af0120be919eff93@sentry.io/1313621
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
NODE_ENV=production
|
||||
PORT=4002
|
||||
|
||||
MONGO_URL=mongodb://mongo/keyvault
|
||||
|
||||
GATEWAY_ENDPOINT=http://master-app-api:4100/graphql
|
||||
KEYVAULT_API_PRESHARED=keyvault_key
|
||||
|
||||
SERVER_SECRET=9%o|i6-mlihgOd&fXeUDB&ae+j"dnM+*
|
||||
@@ -0,0 +1,7 @@
|
||||
NODE_ENV=production
|
||||
PORT=4007
|
||||
|
||||
PRESHARED_GATEWAY_KEY=logs_key
|
||||
PRESHARED_ELK_LOG_KEY=preshared_log
|
||||
BEGIN_URL_ELK_LOG=https://logs-dev.superalgos.org/s/
|
||||
END_URL_ELK_LOG=/app/kibana#/dashboard/logdashboard?embed=true&_g=(refreshInterval%3A(pause%3A!t%2Cvalue%3A0)%2Ctime%3A(from%3Anow-6M%2Cmode%3Aquick%2Cto%3Anow))
|
||||
@@ -0,0 +1,27 @@
|
||||
TEAMS_API_PRESHARED=teams_key
|
||||
USERS_API_PRESHARED=users_key
|
||||
EVENTS_API_PRESHARED=events_key
|
||||
KEYVAULT_API_PRESHARED=keyvault_key
|
||||
NOTIFICATIONS_API_PRESHARED=notifications_key
|
||||
OPERATIONS_API_PRESHARED=clones_key
|
||||
LOGS_API_PRESHARED=logs_key
|
||||
STRATEGIZER_API_PRESHARED=strategizer_keys
|
||||
COCKPIT_API_PRESHARED=cockpit_key
|
||||
SAWEB_API_PRESHARED=saweb_key
|
||||
|
||||
GRAPHQL_API_URL=http://localhost:4100/graphql
|
||||
|
||||
TEAMS_API_URL=http://teams-api:4001/graphql
|
||||
USERS_API_URL=http://users-api:4000/graphql
|
||||
EVENTS_API_URL=http://events-api:4005/graphql
|
||||
KEYVAULT_API_URL=http://keyvault-api:4002/graphql
|
||||
NOTIFICATIONS_API_URL=http://notifications-api:4006/graphql
|
||||
OPERATIONS_API_URL=http://clones-api:4003/graphql
|
||||
LOGS_API_URL=http://logs-api:4007/graphql
|
||||
STRATEGIZER_API_URL=http://strategizer-api:4008/graphql
|
||||
COCKPIT_API_URL=http://cockpit-api:4009/graphql
|
||||
SAWEB_API_URL=http://saweb-api:4004/graphql
|
||||
|
||||
AUTH0_DOMAIN=superalgos.eu.auth0.com
|
||||
AUTH0_AUDIENCE=https://auth-local.superalgos.org
|
||||
AUTH0_ISSUER=https://superalgos.eu.auth0.com/
|
||||