1.0.1127 • Published 10 days ago

wattshub-base v1.0.1127

Weekly downloads
-
License
MIT
Repository
-
Last release
10 days ago

WattsHub-Base Overview

WattsHub-base is a distinguished tool distributed as an npm package, built utilizing React, TypeScript, and Rsuite. It aims to streamline the creation of front-end projects, ensuring efficiency and high standards. In resume, it is a framework for front-end applications easyly grouping multiple projects.

Alongside, WattsHub-back offers orchestration between all hosted projects, providing a cohesive environment for various project integrations.

Key Features:

  • Ease of Access and Authorization: Facilitates convenient access and authorization configurations for web pages through 'Intact'.

  • Administration Mode: Allows seamless configuration of menus with items, sections, and submenus, enhancing user administrative capabilities.

  • Consistent Look and Feel: Offers a uniform appearance across all projects, simplifying user interactions for the user.

Utilization Methodologies:

WattsHub can be utilized in two ways: 1. You provide infra:

  • Start by create a new project (or copy an existing one 'eazy mode') and install the package with npm i wattshub-base, enabling the use of your infrastructure (git, pipeline, k8s, etc.) while being part of WattsHub.

  • npm i wattshub-base

    Configuration Procedure:

    In your application's entry file (usually index.ts), add the following configurations:

    // Set Okta configuration variables. Stay updated as Okta will be included in WattsHub-base shortly.
    const issuer: string = process.env.REACT_APP_OKTA_URL;
    const clientId: string = process.env.REACT_APP_OKTA_CLIENT_ID;
    const redirectUri: string = window.location.origin + "/callback";
    const scopes: string[] = ["openid", "profile", "email", "api.fstudio", "api.wattshub", "api.wnb", "api.wattson.woot-feeder.read"];
    
    // Set local projects. Contact the development team to request the creation of your project in WattsHub-Back.
    const localProjectsNames: string[] = ['yourproject'];
    
    // Create your pages within /components
    const internalProjectPages: InternalPage[] = [
    {
        project: 'yourproject',
        label: "Dashboard",
        url: "/yourproject/dashboard",
        render: () => <h1> Dashboard Test page</h1>,
    }
    ];
    
    // Add your routes. For example:
    const localRoutes: Array<WHRoute> = [{
            external: false,
            groups: ["Everyone"], //intact groups
            path: "/yourproject/dashboard/view-contracts/contract/:id",
            label: "Contract",
            render: () => <Contract />,
    }];
    
    //Creating OktaAuth
    const oktaAuth = new OktaAuth({
    issuer: issuer,
    clientId: clientId,
    redirectUri: redirectUri,
    scopes: scopes,
    pkce: true,
    });
    
    //App entry point example
    function App() {
    return (
        <div className="App">
        <Router>
            <Security oktaAuth={oktaAuth}>
            <Switch>
                <Route path="/callback" component={LoginCallback} />
                <SecureRoute path="/" render={() => 
                <WattsHubBase
                processEnv={process.env}
                localProjectsNames={localProjectsNames}
                issuer={issuer}
                clientId={clientId}
                redirectUri={redirectUri}
                scopes={scopes}
                projectPages={internalProjectPages}
                routes={localRoutes} /> } />
            </Switch>
            </Security>
        </Router>
        </div>
    );
    }
  1. No infra:

    In case you don't want to manage infrastructre using the WattsHub-front is the way to go.

    Clone WattsHub-front Repository: https://github.tools.digital.engie.com/GEMCEMWattsOn/WattsHub-front

    • Add your pages in /components/yourproject
    • Add your pages to the 'const internalProjectPages:' array
    • Define your routes in 'const localRoutes: Array = [{...'

    WattsHub-front, a repository where you can create your application without concerning about infrastructure like pipelines, K8s, etc., as it's configured for all, including CI/CD.

  1. Build WattsHub Base Increasse the version run command: Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass run command: tsc run command on the project: npm i wattshub-base

If you need support don't be shy to contact:

@CHOMIENNE Francois @LOPES Edson

1.0.1127

10 days ago

1.0.1126

10 days ago

1.0.1125

10 days ago

1.0.1124

10 days ago

1.0.1123

2 months ago

1.0.1122

2 months ago

1.0.1121

2 months ago

1.0.1120

2 months ago

1.0.1119

2 months ago

1.0.1117

5 months ago

0.0.1080

7 months ago

0.0.1082

7 months ago

0.0.1081

7 months ago

0.0.1084

7 months ago

0.0.1083

7 months ago

0.0.1086

7 months ago

0.0.1085

7 months ago

0.0.1088

7 months ago

0.0.1087

7 months ago

0.0.1089

7 months ago

0.0.1073

7 months ago

0.0.1072

7 months ago

0.0.1075

7 months ago

0.0.1074

7 months ago

0.0.1077

7 months ago

0.0.1076

7 months ago

0.0.1079

7 months ago

0.0.1078

7 months ago

1.0.1116

7 months ago

1.0.1115

7 months ago

1.0.1114

7 months ago

1.0.1112

7 months ago

1.0.1111

7 months ago

1.0.1110

7 months ago

1.0.1109

7 months ago

1.0.1108

7 months ago

1.0.1107

7 months ago

1.0.1106

7 months ago

1.0.1105

7 months ago

1.0.1104

7 months ago

1.0.1103

7 months ago

1.0.1102

7 months ago

1.0.1101

7 months ago

1.0.1100

7 months ago

1.0.1099

7 months ago

1.0.1098

7 months ago

1.0.1097

7 months ago

1.0.1096

7 months ago

1.0.1095

7 months ago

1.0.1094

7 months ago

1.0.1093

7 months ago

1.0.1092

7 months ago

1.0.1091

7 months ago

1.0.1090

7 months ago

0.0.1071

7 months ago

0.0.1070

7 months ago

0.0.1069

7 months ago

0.0.1068

7 months ago

0.0.1067

7 months ago

0.0.1066

7 months ago

0.0.1065

7 months ago

0.0.1064

7 months ago

0.0.1063

7 months ago

0.0.1062

7 months ago

0.0.1061

7 months ago

0.0.1060

7 months ago

0.0.1059

7 months ago

0.0.1058

7 months ago

0.0.1057

7 months ago

0.0.1056

7 months ago

0.0.1055

7 months ago

0.0.1054

7 months ago

0.0.1053

7 months ago

0.0.1052

7 months ago

0.0.1051

7 months ago

0.0.1050

7 months ago

0.0.1049

7 months ago

0.0.1048

7 months ago

0.0.1047

7 months ago

0.0.1046

7 months ago

0.0.1044

7 months ago

0.0.1043

7 months ago

0.0.1042

7 months ago

0.0.1041

7 months ago

0.0.1040

7 months ago

0.0.1039

7 months ago

0.0.1038

7 months ago

0.0.1037

7 months ago

0.0.1036

7 months ago

0.0.1035

7 months ago

0.0.1034

7 months ago

0.0.1033

7 months ago

0.0.1032

7 months ago

0.0.1031

7 months ago

0.0.1030

7 months ago

0.0.1029

7 months ago

0.0.1028

7 months ago

0.0.1027

7 months ago

0.0.1026

7 months ago

0.0.1025

7 months ago

0.0.1024

7 months ago

0.0.1023

7 months ago

0.0.1022

7 months ago

0.0.1021

7 months ago

0.0.1020

7 months ago

0.0.1019

7 months ago

0.0.1018

7 months ago

0.0.1017

7 months ago

0.0.1016

7 months ago

0.0.1015

7 months ago

0.0.1014

7 months ago

0.0.1013

7 months ago

0.0.1012

7 months ago

0.0.1011

7 months ago

0.0.1010

7 months ago

0.0.1009

7 months ago

0.0.1008

7 months ago

0.0.1007

7 months ago

0.0.1006

7 months ago

0.0.1005

7 months ago

0.0.1004

7 months ago

0.0.1003

7 months ago

0.0.1002

7 months ago

0.0.1001

7 months ago

0.0.1000

7 months ago

0.0.999

7 months ago

0.0.998

7 months ago

0.0.997

7 months ago

0.0.996

7 months ago

0.0.995

7 months ago

0.0.994

7 months ago

0.0.993

7 months ago

0.0.992

7 months ago

0.0.991

7 months ago

0.0.990

7 months ago

0.0.989

7 months ago

0.0.988

7 months ago

0.0.987

7 months ago

0.0.986

7 months ago

0.0.985

7 months ago

0.0.984

7 months ago

0.0.983

7 months ago

0.0.982

7 months ago

0.0.981

7 months ago

0.0.980

7 months ago

0.0.979

7 months ago

0.0.978

7 months ago

0.0.977

7 months ago

0.0.976

7 months ago

0.0.975

7 months ago

0.0.974

7 months ago

0.0.973

7 months ago

0.0.972

7 months ago

0.0.971

7 months ago

0.0.970

7 months ago

0.0.969

7 months ago

0.0.968

7 months ago

0.0.967

7 months ago

0.0.966

7 months ago

0.0.965

7 months ago

0.0.963

7 months ago

0.0.962

7 months ago

0.0.961

7 months ago

0.0.960

7 months ago

0.0.959

7 months ago

0.0.958

7 months ago

0.0.957

7 months ago

0.0.956

7 months ago

0.0.955

7 months ago

0.0.954

7 months ago

0.0.953

7 months ago

0.0.951

7 months ago

0.0.950

7 months ago

0.0.948

7 months ago

0.0.947

7 months ago

0.0.946

7 months ago

0.0.945

7 months ago

0.0.944

7 months ago

0.0.943

7 months ago

0.0.942

7 months ago

0.0.941

7 months ago

0.0.939

7 months ago

0.0.938

7 months ago

0.0.937

7 months ago

0.0.936

7 months ago

0.0.935

7 months ago

0.0.934

7 months ago

0.0.933

7 months ago

0.0.932

7 months ago

0.0.931

7 months ago

0.0.930

7 months ago

0.0.929

7 months ago

0.0.928

7 months ago

0.0.927

7 months ago

0.0.925

7 months ago

0.0.923

7 months ago

0.0.922

7 months ago

0.0.921

7 months ago

0.0.92

7 months ago

0.0.91

7 months ago

0.0.9

7 months ago

0.0.8

7 months ago

0.0.7

7 months ago