Giter Club home page Giter Club logo

deriv-com's Introduction

Deriv.com

Deriv.com - An online trading platform that offers a wide selection of derivatives to trade on 24/7.

GitHub Workflow Status node npm GATSBY style: styled-components Sonar Tech Debt Sonar Violations (short format)

In this document:

Other Documents

Pre-installation

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

  • node >=12.3.0
  • npm >=6.9.0
  • git (for contribution)
  • gatsby-cli (npm install -g gatsby-cli) (for using commands that aren't listed in scripts)

Moreover, having these extensions will help you to speed up the development process and adhere to the best practices

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 repo.

  2. Clone using SSH

    git clone [email protected]:your-github-username/deriv-com.git
  3. Enter project directory

    cd deriv-com
  4. Install your dependencies:

    npm ci
  5. Add env variables:

    Create two files .env.development and .env.production inside your project root directory.

    Then check your lastpass you'll see a shared item named Deriv-com Env Variables copy the variables, they look like this:

    DIRECTUS_AUTH_TOKEN=********************************
    GATSBY_DIRECTUS_AUTH_TOKEN=********************************

    And paste them into the files.

  6. To start developing:

    npm start
  7. Open the source code and start editing!

    Your site is now running at http://localhost:8000!

    Note: You'll also see a second link: http://localhost:8000/___graphql. This is a tool you can use to experiment with querying your data. Learn more about using this tool in the Gatsby tutorial.

How to contribute

We have two types of PR (Pull request):

Base Master

PR will be based on the master branch if the commits are not having text changes

  1. Create branch from the latest master branch

    git checkout master
    git pull upstream master
    git checkout -b [_your_branch_name]
  2. Make your changes

  3. Make pull request

  • Push your changes to your origin

    git push -u origin [_your_branch_name]
  • Click on the autogenerated link from the terminal to open the PR

  • Make sure to change the PR base to master branch

Base Crowdin

PR will be based on crowdin branch if the commits are having text changes

  1. Create branch from latest crowdin branch
  • if you don't have crowdin branch

    git fetch upstream crowdin:crowdin
    git checkout crowdin
    git checkout -b [_your_branch_name]
  • if you have crowdin branch

    git checkout crowdin
    git pull upstream crowdin
    git checkout -b [_your_branch_name]
  1. Make your changes

  2. Extract translation

  • Make sure you have the latest Crowdin changes, resolve conflicts if any

    git pull upstream crowdin
  • Extract translation text to update messages.json

    npm run translate:extract
  • Commit your changes

  1. Make pull request
  • Push your changes to your origin, add -u flag for the first time push

    git push -u origin [_your_branch_name]
  • Click on the autogenerated link from terminal to open the PR

  • Make sure to change the PR base to crowdin branch

Manage translations

  • Pre-requisite:

    • Install crowdin-cli

      brew tap crowdin/crowdin
      brew install crowdin
    • Set up your Crowdin API KEY in your .bash_profile or .zshrc

  • To upload source text to Crowdin (When task merge to crowdin branch)

    npm run translate:upload
  • To download/get the latest Crowdin translations

    npm run translate:download

Note: Don't forget to create a pull request to update crowdin branch

Manage releases

There are 2 types of releases:

  1. Release to staging:

Merging to master (squash and merge) will automatically release the last commit to the staging server https://staging.deriv.com

⚠️ If you want to release Crowdin changes, please make a PR from crowdin to master branch

  1. Release to production:

Releasing to production requires a tag using the following format:

production_VYYYYMMDD_${Integer} --- Integer is the release version

Example of release steps

  • Create the tag following today's date

    git tag production_V20200806_0 -m 'release to production'
  • Push the tag to the main repository

    git push upstream production_V20200806_0

Test link deployment

There are two types of test link deployment preview:

  1. Automatic deployment

Upon creating PR, Vercel will auto-generate a test link inside the PR. you can use that to preview the test link for the changes you have made.

  1. Manual deployment

If preferable to use manual deployment, you can use gh-pages functionality to create a test link. here are ways to do it:

  • Basic name.github.io/deriv-com/

    npm run deploy-dev

    ⚠️ This will remove your branch deployments

  • To a specific branch:

    branch_name=fix_all_the_bugs npm run deploy-branch

    This will be deployed to name.github.io/deriv-com/br/fix_all_the_bugs

⚠️ You have to enable pathPrefix in gatsby-config for manual deployment, otherwise, the resources will not be uploaded to the site

FAQ

⚠️ If you have more questions to add, please open a PR to add your question in FAQ section. The Answer will be on the PR reviews

deriv-com's People

Contributors

ashkanx avatar mustofa-binary avatar cakasuma avatar arash-fs avatar oskar-binary avatar suthesank avatar shudarshon-deriv avatar virtualpowwa avatar yashim-deriv avatar nikolaiberestevich-deriv avatar abdallamourad avatar njazuli-deriv avatar sarakhosropour avatar fiona-deriv avatar shuvohabib avatar negarn avatar msamprz avatar mahboobeh-binary avatar alamin-deriv avatar pavel-latyshou-deriv avatar sara-fs avatar gokula-krishna-dev avatar habib-deriv avatar klyanyi avatar negar-binary avatar behnaz-deriv avatar khalid-deriv avatar jy-deriv avatar afshin-deriv avatar hojjat-fs avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.