1.1.5 • Published 1 year ago

@kakahuy113/test-dam-app v1.1.5

Weekly downloads
-
License
GPL-3.0-only
Repository
-
Last release
1 year ago

AesirX DAM

About

AesirX DAM is our Open-Source PWA-powered enterprise-level Digital Asset Management as a Service (DAMaaS) Solution

Find out more in https://dam.aesirx.io

Development setup

Configure

  1. Get your REACT_APP_CLIENT_SECRET key from https://dam.aesirx.io by creating an account.
  2. Rename the .env.dist file to .env.
  3. Replace the REACT_APP_CLIENT_SECRET in the .env file with the one provided in your profile account.
  4. Run yarn install

yarn dev

Runs the app in the development mode.\ Open http://localhost:3000 to view it in the browser.

yarn build

Get a full build and install it in your favorite web server.

Dockerize

Development

docker compose -f "docker-compose.dev.yml" up -d --build

Production

docker compose -f "docker-compose.pro.yml" up -d --build

Integrate setup

The easiest way to use aesirx-dam-app is to install it from npm and build it into your app with Webpack.

npm install aesirx-dam-app

Add your REACT_APP_DAM_LICENSE to your integrate app you get if from #configure step

Then use it in your app:

import React, { useState } from 'react';

import { AesirXDam } from 'aesirx-dam-app';
import { AesirXDamStorage } from 'aesirx-dam-app';

import 'aesirx-dam-app/dist/index.css';
import 'aesirx-dam-app/dist/app.css';

function AesirXDam() {
  const onSelect = (data) => {
    // do something when user onDoubleClick at on that assets
  };

  return (
    <div className="py-4 px-3 h-100 flex-direction-column">
      <div className="h-100 flex-1">
        <AesirXDam onSelect={onSelect} lang={'your_lang_code'} theme={'your_theme'} />
      </div>
      <div>
       <AesirXDamStorage />
      </div>
    </div>
  );
}

export default AesirXDam;

Props

Common props you may want to specify include:

  • onSelect - subscribe to select event
  • lang - lang code
  • theme - light or dark property