百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
D

deriv-app

> 编程语言
开源

Deriv 应用程序 此仓库包含 Deriv 应用程序的各个平台。在本文档中: - 其他文档: - 安装前 ...

100 stars0 点赞1 次浏览
访问官网GitHub

工具介绍

Deriv 应用程序 此仓库包含 Deriv 应用程序的各个平台。在本文档中: - 其他文档: - 安装前 ...

Deriv App

This repository contains the various platforms of the Deriv application.

In this document:

  • Other documents:
  • Pre-installation
  • Quick start
  • Packages
  • Working With This Repo
  • Package names
    • Usage
    • Starting a Development Server
    • How to Clean Packages
    • How to clear cache
  • Servable packages
    • Examples of Script Usage
  • Release
  • PR format recommendations
  • Test link deployment
  • FAQ

Other documents:

  • General - Contains general philosophy and overview of this package
  • Stylesheet guidelines - Contains rules for CSS/SASS code style
  • JavaScript guidelines - Contains rules for JS/JSX code style
  • Modules docs - Contains implementation guides (i.e., scaffolding, code usage)
  • e2e and performance testing docs - Contains documents for create and running e2e and performance tests
  • Manage dependencies

Pre-installation:

Before running or contribute to this project, you need to have the setup of the following package in your environment.

  • node >=16.16.0
  • npm >=7.21.0
  • git (for contribution)

Quick start

  1. Fork the project

    In order to work on your own version of the Deriv application, please fork the project to your own repository.

  2. Clone using SSH

    bash
    git clone [email protected]:deriv-com/deriv-app.git

Internal: NX and Lerna integration

  • Find and copy nx-cloud accessToken
  • Make a copy of nx-cloud.env.example from root directory of the project and name it nx-cloud.env and replace the `` with provided token.
  1. Enter project directory

    bash
    cd deriv-app
  2. Install your dependencies:

    bash
    npm run bootstrap
  3. Build packages:

    bash
    npm run build:all

Packages

Package name Docs Version
Account - -
Appstore -
Bot-skeleton -
Bot-web-ui -
Cashier -
Cfd -
Components -
Core -
Indicators -
P2P
Publisher -
Shared -
Trader -
Translations -

Working With This Repo

All packages must contain the following scripts to perform the stated actions:

Package param Command Description
✅ start Runs complete test and build suite and starts the dev server.
✅ serve Runs build suite and starts the dev server. When serving core, takes optional open value as argument to open specific page. (e.g: npm run serve core --open=bot)
✅ build:one Runs build suite and outputs the result into dist for the passed package name.
✅ build:all Runs build suites for all of the packages and outputs the result into dist.
✅ test Runs the test suite with eslint, stylelint and jest.
✅ test:jest Runs only the jest test suite.
✅ test:qa Runs the e2e test suite.
✅ test:performance Runs the performance test suite.

Note: Please follow the README of each package you intend to work with on how to get set up and their custom scripts. However, the above scripts can be run from the root directory in the following manner.

Package names

Each package is named with the @deriv/ prefix, however for the scripts above, you do not need to add the @deriv/ prefix as the scripts already prefix the 1st argument of the script with @deriv/. However, if you do use the lerna CLI directly, then you will need to use the full package name including the @deriv/ prefix.

You can find the names of packages by first navigating to the packages folder. Each sub-folder is a package and contains a package.json file. The value of the name key in package.json is the package name.

Usage

Starting a Development Server

If you wish to work on Core, simply run npm run serve core.

But for working on any of the other packages (such as Trader, Bot, P2P), perform the following:

  1. Open 2 terminals.
  2. Run npm run serve {package name} in the first one. e.g.: npm run serve translations, npm run serve bot, etc.
  3. Then run npm run serve core in the second one.

How to Clean Packages

If you intend to remove node_modules folder(s) from the projects, please run npm run clean from the root of the project.

This runs lerna clean && rm -rf $(git rev-parse --show-toplevel)/node_modules under the hood. You can read more on the various lerna commands (and the clean command) over at the Lerna docs.

Note: In case of facing permission denied error, please simply run sudo chown -R $(whoami) . from the root of the project.

How to clear cache

npm cache clean -f

Servable packages

  • account
  • appstore
  • bot-web-ui
  • cashier
  • cfd
  • components
  • core
  • p2p
  • trader

Examples of Script Usage

✅ core is required to run any of the other packages such as if you want to run the bot-web-ui the core must be instantiated before.

bash
npm run serve core

If a script supports the "Package param", you can supply a {package name} for it to run the script in. At the moment, only 1 package name can be given to a script, if you wish to run in multiple, please use the lerna command that's used under the hood as per its docs.

✅ In order to run the bot package, simply run:

bash
npm run serve bot-web-ui

✅ Likewise for trader (or any other package) with a different script:

bash
npm run test:stylelint trader

comment: <> (❌ Below command will not work as the script deploy:clean does not support "Package param" (refer to the table in [Working With This Repo](#working-with-this-repo)): bash npm run deploy:clean bot)

Release

There are 2 types of release:

  1. Release to staging:
    1. git tag staging_v20191205 -m 'release staging' # the tag needs to follow the RegExp format /^staging.*/
    2. git push origin staging_v20191205
  2. Release to production:
    1. git tag production_v20191205 -m 'release production'
    2. git push origin production_v20191205

There is a 4th type of release: releasing npm registry packages (currently @deriv/p2p). This a WIP, but the current method is:

  1. Acquire membership to @deriv npm organization namespace.
  2. Ensure you have a new (bumped) version of publishable packages (currently @deriv/p2p).
  3. Run npm run publish:p2p. The command publishes all bumped packages. However, right now the name includes the word p2p to signal the WIP status and that P2P is the only published package under this repo.

PR format recommendations

  1. Use the [{Project Code}] {Developer}/{Clickup Card ID}/{Description} format for PR titles. (e.g.: [COJ] evgeniy/COJ-247/Align next-button on mt5 modal), where [COJ] is a clickup project code.
  2. Add scr

Issues· 6 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

TypeScript

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月18日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言