Skip to content

Commit

Permalink
Use Ganymede as a Submodule and Admin account changes in Artemis
Browse files Browse the repository at this point in the history
Signed-off-by: Bala Siva Sai Akhil Malepati <[email protected]>
  • Loading branch information
saiakhil2012 committed Oct 27, 2022
1 parent 1ee8f12 commit e515a17
Show file tree
Hide file tree
Showing 57 changed files with 87,141 additions and 18,300 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "artemis/clarity/src/app/ganymede"]
path = artemis/clarity/src/app/ganymede
url = https://github.com/jovians/ganymede.git
4 changes: 4 additions & 0 deletions artemis/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Generated contract ABIs need not be committed
src/abis/**/*
/src/abis/**/*
node_modules
29 changes: 18 additions & 11 deletions artemis/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,33 +18,40 @@ Follow the below link to get VMware Blockchain running on your local computer.

## Setup

Install application dependencies
Install application dependencies (node v14 preferred)

```bash
npm i -g @jovian/ganymede-clr
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash
```

Close the session and reopen and `nvm` command will be available to your system.

```bash
npm install
nvm install 14 # installs node v14
nvm alias default 14 # sets default system node version to 14
```

Install depedencies for contracts and UI:

```bash
npm i # in project root

cd clarity; # in clarity folder (main UI)
npm i
```

Deploy contracts on Concord or any network by specifying network instead of development can use Ganaches or any other network.
```bash
truffle migrate --reset --network=development
```

Deploy contracts on VMware Blockchain
```bash
truffle migrate --reset //Since default network is Concord
truffle migrate --reset # Since default network is Concord
```
Run NFT Platform on clarity directory
```bash
gany set
```
```bash
npm install
```
```bash
npm run start
```

Finally go to http://localhost:4200 to interact with the platform.

75 changes: 75 additions & 0 deletions artemis/clarity/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
# See http://help.github.com/ignore-files/ for more about ignoring files.

# compiled output
/dist
/dist-modules
/dist-server
/dist-server-deps
/dist-electron
/dist-electron-src
/tmp
/out-tsc
# Only exists if Bazel was run
/bazel-out

# dependencies
/node_modules

# profiling files
chrome-profiler-events*.json
speed-measure-plugin*.json

# IDEs and editors
/.idea
.project
.classpath
.c9/
*.launch
.settings/
*.sublime-workspace

# IDE - VSCode
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
.history/*

# misc
/.sass-cache
/connect.lock
/coverage
/libpeerconnection.log
npm-debug.log
yarn-error.log
testem.log
/typings

# System Files
.DS_Store
Thumbs.db

# electron temp
/electron/**/*.js
/electron.js
/electron-*.js

# Ganymede
.build.uuid
.ganymede.topology.json
/ganymede.js
ganymede.app.js
ganymede.app.interface.js
ganymede.app.interface.ts
ganymede.patch.ts

# node.js profiles
/isolate-*

# Angular cache
/.angular

# secrets should not be committed
ganymede.secrets.json

35 changes: 18 additions & 17 deletions artemis/clarity/angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": 1,
"newProjectRoot": "projects",
"projects": {
"clarity": {
"artemis": {
"projectType": "application",
"schematics": {
"@schematics/angular:component": {
Expand All @@ -17,12 +17,15 @@
"build": {
"builder": "@angular-devkit/build-angular:browser",
"options": {
"outputPath": "dist/clarity",
"outputPath": "dist/artemis",
"index": "src/index.html",
"main": "src/main.ts",
"polyfills": "src/polyfills.ts",
"tsConfig": "tsconfig.app.json",
"aot": false,
"optimization": false,
"buildOptimizer": false,
"sourceMap": true,
"assets": [
"src/assets",
"src/favicon.ico",
Expand All @@ -33,17 +36,11 @@
}
],
"styles": [
"node_modules/@clr/icons/clr-icons.min.css",
"node_modules/@clr/ui/clr-ui.min.css",
"src/styles.scss"
],
"scripts": [
"node_modules/@webcomponents/custom-elements/custom-elements.min.js",
"node_modules/@clr/icons/clr-icons.min.js"
],
"scripts": [],
"allowedCommonJsDependencies": [
"web3",
"@ethersproject/signing-key"

]
},
"configurations": {
Expand All @@ -54,7 +51,11 @@
"with": "src/environments/environment.prod.ts"
}
],
"optimization": true,
"optimization": {
"scripts": true,
"fonts": { "inline": true },
"styles": false
},
"outputHashing": "all",
"sourceMap": false,
"namedChunks": false,
Expand All @@ -80,18 +81,18 @@
"serve": {
"builder": "@angular-devkit/build-angular:dev-server",
"options": {
"browserTarget": "clarity:build"
"browserTarget": "artemis:build"
},
"configurations": {
"production": {
"browserTarget": "clarity:build:production"
"browserTarget": "artemis:build:production"
}
}
},
"extract-i18n": {
"builder": "@angular-devkit/build-angular:extract-i18n",
"options": {
"browserTarget": "clarity:build"
"browserTarget": "artemis:build"
}
},
"test": {
Expand Down Expand Up @@ -133,18 +134,18 @@
"builder": "@angular-devkit/build-angular:protractor",
"options": {
"protractorConfig": "e2e/protractor.conf.js",
"devServerTarget": "clarity:serve"
"devServerTarget": "artemis:serve"
},
"configurations": {
"production": {
"devServerTarget": "clarity:serve:production"
"devServerTarget": "artemis:serve:production"
}
}
}
}
}
},
"defaultProject": "clarity",
"defaultProject": "artemis",
"cli": {
"analytics": "<ANGULAR_APP_CLI_ANALYTICS_TOKEN>"
}
Expand Down
21 changes: 11 additions & 10 deletions artemis/clarity/ganymede.app.interface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,10 @@ const baseVidPath = '/assets/vid';

const self = new Function('return this')();
const isNodeJs = self.btoa === undefined;

const useDestor = true;
export interface GanymedeSecretsResolver {
type: 'local-json-file' | 'server';
type: 'local-json-file' | 'source-from-destor';
jsonFile?: string;
serverUrl?: string;
}

export class GanymedeAppData {
Expand Down Expand Up @@ -48,9 +47,10 @@ export class GanymedeAppData {

extensions: GanymedeAppExtensions = {};

secretsResolution: GanymedeSecretsResolver = {
type: 'local-json-file',
jsonFile: 'ganymede.secrets.json'
secretsResolution: GanymedeSecretsResolver = useDestor ? {
type: 'source-from-destor',
} : {
type: 'local-json-file', jsonFile: 'ganymede.secrets.json'
};

logger: any = null;
Expand All @@ -72,6 +72,8 @@ export class GanymedeAppData {

conf: any; // ganymede.conf.json content

theme = { base: 'CLARITY', type: 'LIGHT' };

constructor(initializer?: Partial<GanymedeAppData>) {
if (initializer) {
const defaultFeatures = this.features;
Expand Down Expand Up @@ -107,8 +109,8 @@ export interface GanymedeAppBase {
modules?: {
auth?: {
type: string;
host: string;
port: number;
host?: string;
port?: number;
},
mailer?: {
type: string;
Expand All @@ -127,8 +129,7 @@ export interface GanymedeAppExtensions {
gcp?: { type?: string; list: any[]; };
azure?: { type?: string; list: any[]; };
vcenter?: { type?: string; list: any[]; };
otherVms?: { type?: string; list: any[]; };
};
}
}
};
external?: {
Expand Down
9 changes: 7 additions & 2 deletions artemis/clarity/ganymede.app.ui.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { ganymedeAppData } from './ganymede.app';
import { HttpWrap } from './src/app/ganymede/components/util/http.wrapper';
import { rx } from './src/app/ganymede/components/util/ngrx.stores';
import { HttpWrap } from './src/app/ganymede/components/util/common/http.wrapper';
import { rx } from './src/app/ganymede/components/util/common/ngrx.stores';
import { BasicContentsComponent } from './src/app/ganymede/components/pages/basic-contents/basic-contents.component';
import { DigitalArtsComponent } from 'src/app/routes/digital-arts/digital-arts.component';
import { LandingComponent } from 'src/app/routes/landing/landing.component';
Expand Down Expand Up @@ -35,6 +35,7 @@ ganymedeAppData.routes = [
{ path: '**', component: BasicContentsComponent, data: { templateData: { layout: 'full' } }, }
];


export const appRoutes = ganymedeAppData.routes;

export const ngrxStores = rx.NgrxStoreRoot.getStores({
Expand All @@ -57,6 +58,10 @@ export const otherProviders = [

];

export const otherClarityIcons = [

];

HttpWrap.loadInitialIntercepts(http => {

});
Loading

0 comments on commit e515a17

Please sign in to comment.