diff --git a/.github/workflows/mkdocs.yml b/.github/workflows/mkdocs.yml new file mode 100644 index 00000000..6b9a87dd --- /dev/null +++ b/.github/workflows/mkdocs.yml @@ -0,0 +1,25 @@ +name: mkdocs + +on: + push: + branches: + - main + +permissions: + contents: write + +jobs: + deply-docs: + name: Deploy docs + runs-on: ubuntu-latest + steps: + - name: Checkout main + uses: actions/checkout@v2 + + - name: Deploy docs + uses: mhausenblas/mkdocs-deploy-gh-pages@master + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + CONFIG_FILE: mkdocs.yml + REQUIREMENTS: docs/setup-docs/requirements.txt + diff --git a/README.md b/README.md index 87c0e074..2f79e867 100644 --- a/README.md +++ b/README.md @@ -1,73 +1,34 @@ -# Napse - -The best open source investment software. - -### Runing the graphic user interface - -The GUI is a desktop app. It is made using Electron, React and Typescript. -You can find it in the desktop-app folder. -Here are the steps to run it (if you already have nvm, node and yarn installed, go to the step 4 directly): - -1. **Install nvm** - -To install nvm, download and install the nvm script from the project's GitHub page: - -```shell -curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh | bash -``` - -After installing nvm, close your terminal and open a new one. Verify the installation by checking the version of nvm: - -```shell -nvm --version -``` - -2. **Install Node.js** - -Now, you can install Node.js. The following command installs Node.js latest version : +
+ + + + Napse's logo + +
+ + +
+

+ + Twitter + + + Release + +

+ +

+ Napse ยท + Documentation +

+
-```shell -nvm install --lts -``` - -3. **Install yarn** - -Yarn is a Node package manager. Install it by running these commands - -```shell -curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add - -``` - -```shell -echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list -``` - -```shell -sudo apt update -``` - -```shell -sudo apt install yarn -``` - -4. **Install dependencies** - -Start by moving to the desktop-app folder - -```shell -cd desktop-app -``` - -Then use yarn to download all dependencies +# Napse -```shell -yarn -``` +Napse is the future of open source investment. It connects seamlessly to exchanges and manages the money entrusted to it with trading bots. -5. **Run the client** +Napse is a desktop application compatible with all platforms. [Django-napse](https://github.com/napse-invest/django-napse) is the heart of the system, and Napse enables efficient deployment, operation and performance visualization. -Use this yarn command to run client in dev mode +# Documentation -```shell -yarn dev -``` +You can find the documentation [here](https://napse-invest.github.io/Napse/). \ No newline at end of file diff --git a/SECURITY.md b/SECURITY.md deleted file mode 100644 index 034e8480..00000000 --- a/SECURITY.md +++ /dev/null @@ -1,21 +0,0 @@ -# Security Policy - -## Supported Versions - -Use this section to tell people about which versions of your project are -currently being supported with security updates. - -| Version | Supported | -| ------- | ------------------ | -| 5.1.x | :white_check_mark: | -| 5.0.x | :x: | -| 4.0.x | :white_check_mark: | -| < 4.0 | :x: | - -## Reporting a Vulnerability - -Use this section to tell people how to report a vulnerability. - -Tell them where to go, how often they can expect to get an update on a -reported vulnerability, what to expect if the vulnerability is accepted or -declined, etc. diff --git a/docs/CONTRIBUTING.md b/docs/CONTRIBUTING.md new file mode 100644 index 00000000..994713c3 --- /dev/null +++ b/docs/CONTRIBUTING.md @@ -0,0 +1,7 @@ +Thank you for your interest in contributing to Napse + +Napse is still in early stage. + +We want the foundations of Napse to be in place so that the community can build on them. + +That's why we're not yet accepting contributions, but it shouldn't be long now! \ No newline at end of file diff --git a/docs/SECURITY.md b/docs/SECURITY.md new file mode 100644 index 00000000..2a5e8406 --- /dev/null +++ b/docs/SECURITY.md @@ -0,0 +1,8 @@ +# Security + +If you discover a security issue, no matter how big or small, please **do not open an issue or a pull request** ! +Contact us asap at `napse.invest@gmail.com` or contact an administrator on the official discord server. + +Thanks you in advance. + +The Napse Team \ No newline at end of file diff --git a/docs/index.md b/docs/index.md new file mode 100644 index 00000000..d73bf99a --- /dev/null +++ b/docs/index.md @@ -0,0 +1,44 @@ +![Napse logo](theme/assets/napse_invest_logo_black.svg#only-light){ width="500" : .center} +![Napse logo](theme/assets/napse_invest_logo_white.svg#only-dark){ width="500" : .center} +

+ +# Welcome to Napse Documentation + + +Napse is the future of open source investment. It connects seamlessly to exchanges and manages the money entrusted to it with trading bots. + +Napse is a desktop application compatible with all platforms. [Django-napse](https://github.com/napse-invest/django-napse) is the heart of the system, and Napse enables efficient deployment, operation and performance visualization. + + + + +

+
+ +- :material-lightning-bolt:{ .lg .middle } **Powerfull** + + --- + + Simplifies money management and performance visualization + +- :octicons-light-bulb-16:{ .lg .middle } **Environment** + + --- + + Napse lets you build and configure your own trading bots + +- :simple-github:{ .lg .middle } **Open source** + + --- + + Napse is open source, under an MIT license + +- :material-crop-free:{ .lg .middle } **Tranparency** + + --- + + Seamlessly integrated from end to end to make your life easier + + + +
\ No newline at end of file diff --git a/docs/setup-docs/requirements.txt b/docs/setup-docs/requirements.txt new file mode 100644 index 00000000..a9f8e85e --- /dev/null +++ b/docs/setup-docs/requirements.txt @@ -0,0 +1,3 @@ +mkdocs-material==9.5.3 # https://github.com/squidfunk/mkdocs-material +pygments==2.17.2 # https://github.com/pygments/pygments +watchfiles==0.21.0 # https://github.com/samuelcolvin/watchfiles diff --git a/docs/sources/quickstart.md b/docs/sources/quickstart.md new file mode 100644 index 00000000..f2816c61 --- /dev/null +++ b/docs/sources/quickstart.md @@ -0,0 +1,181 @@ +Napse is still in early stage. You can only run it manually for now. + +??? tip "TL - DR" + + 1. `make setup` + 2. `make up` + + 3. Clone [django-napse](https://github.com/napse-invest/django-napse) repository + 4. Run `tests/test_app/setup_secrets.sh` and fill in `secrets.json` file + 5. `make up` + 6. Get `master_key` in `secrets.json` file + 7. Add localhost server into Napse's desktop app (with the `master_key` as `API Token`) + +--- +## Prerequisites + +### Install nvm + +To install nvm, download and install the nvm script from the project's GitHub page: + + +=== "Linux" + + ```shell + curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh | bash + nvm --version + ``` + +=== "MacOS" + + Please follow this [tutorial](https://dev.to/csituma/install-nvm-on-mac-windows-and-linux-1aj9) + +=== "Windows" + + Please follow this [tutorial](https://dev.to/csituma/install-nvm-on-mac-windows-and-linux-1aj9) + + +### Install Node.js + +Now, you can install Node.js. The following command installs Node.js latest version : + +=== "Linux" + + ```shell + nvm install --lts + ``` + +=== "MacOS" + + Please follow this [tutorial](https://radixweb.com/blog/installing-npm-and-nodejs-on-windows-and-mac) + +=== "Windows" + + Please follow this [tutorial](https://radixweb.com/blog/installing-npm-and-nodejs-on-windows-and-mac) + +### Install yarn + +Yarn is a Node package manager. Install it by running these commands + + +=== "Linux" + + ```shell + curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add - + echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list + sudo apt update + sudo apt install yarn + ``` + +=== "MacOS" + + Please follow this [tutorial](https://www.hostinger.com/tutorials/how-to-install-yarn) + +=== "Windows" + + Please follow this [tutorial](https://www.hostinger.com/tutorials/how-to-install-yarn) + +--- +## Run the desktop application + +First, you need to install all dependencies. +```shell +make setup +``` + +Then, you can run the application. +```shell +make up +``` + +Yeah! Your desktop application is running. But you can't do anything with it for now. You need to run the server. + +--- +## The server + +The heart of Napse is the server. It's [django-napse](https://github.com/napse-invest/django-napse) + +### Setup the server + +#### Clone the project from github + +First clone the repository to your local machine: +```bash +git clone git@github.com:napse-invest/django-napse.git +``` + +#### Build the virtual environment: + +To setup the virtual environment, you can run the command: +```bash +make setup +``` +Or run manually the following script depending on your operating system: + +=== "Linux" + + ```bash + source setup/setup-unix.sh + ``` + +=== "MacOS" + + ```bash + source setup/setup-osx.sh + ``` + +=== "Windows" + + ```powershell + .\setup\setup-windows.ps1 + ``` + +#### Setup initial exchange accounts + +To make full use of the project, we recommend that you fill in the API keys of at least one exchange (see [django-napse documentation](https://napse-invest.github.io/django-napse/) for more details). + +At `tests/test_app/`, build a `secret.json` file (or run the `./setup_secrets.sh` script). Here is an exemple with Binance: +```json +{ + "Exchange Accounts": { + "Binance EA_NAME": { + "exchange": "BINANCE", # Name of your exchange (BINANCE, DYDX, ...) + "testing": true, + "public_key": "YOUR_PUBLIC_KEY", + "private_key": "YOUR_PRIVATE_KEY" + } + } +} +``` + +You can create this file with the commande: +```bash +make setup-testing-environment +``` + +!!! tip + + Exchange API keys are required to communicate with the exchange. However, they are not required to test the application. + + +### Run the server + +```bash +make makemigrations +make migrate +make runserver +``` + +## Connect the desktop app to the server + +You've come this far! **Congratulations**! + +Now all you have to do is the easy part: + +1. Retrieve your `master_key` from the `secrets.json` file +2. Go to your desktop application +3. Click on `servers` in the top right-hand corner, then `+ add new`. +4. Enter your `master_key` in the `API Token` field. +5. Click on `Connect`. + +That's it ! **You can now use Napse !** \ No newline at end of file diff --git a/docs/theme/assets/napse_invest_logo_black.svg b/docs/theme/assets/napse_invest_logo_black.svg new file mode 100644 index 00000000..be754fbb --- /dev/null +++ b/docs/theme/assets/napse_invest_logo_black.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/docs/theme/assets/napse_invest_logo_white.svg b/docs/theme/assets/napse_invest_logo_white.svg new file mode 100644 index 00000000..05e2b619 --- /dev/null +++ b/docs/theme/assets/napse_invest_logo_white.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/docs/theme/assets/napse_logo_black.svg b/docs/theme/assets/napse_logo_black.svg new file mode 100644 index 00000000..3b736ae6 --- /dev/null +++ b/docs/theme/assets/napse_logo_black.svg @@ -0,0 +1,9 @@ + + + + + + + \ No newline at end of file diff --git a/docs/theme/assets/napse_logo_white.svg b/docs/theme/assets/napse_logo_white.svg new file mode 100644 index 00000000..414f433d --- /dev/null +++ b/docs/theme/assets/napse_logo_white.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/docs/theme/assets/stylesheets/extra.css b/docs/theme/assets/stylesheets/extra.css new file mode 100644 index 00000000..f4e449dd --- /dev/null +++ b/docs/theme/assets/stylesheets/extra.css @@ -0,0 +1,5 @@ + +.center { + display: block; + margin: 0 auto; +} \ No newline at end of file diff --git a/mkdocs.yml b/mkdocs.yml new file mode 100644 index 00000000..fe644e1d --- /dev/null +++ b/mkdocs.yml @@ -0,0 +1,99 @@ +site_name: Napse Documentation +# site_url: https://go.napse-invest.com/visit/ +repo_name: napse-invest/Napse +repo_url: https://github.com/napse-invest/Napse +copyright: MIT Licence + +docs_dir: "docs/" + +theme: + name: 'material' + custom_dir: theme + favicon: 'theme/assets/napse_logo_white.svg' + logo: 'theme/assets/napse_invest_logo_white.svg' + language: 'en' + palette: + # Palette toggle for light mode + - media: "prefers-color-scheme: light" + scheme: default + primary: teal + accent: teal + toggle: + icon: material/toggle-switch-off-outline + name: Switch to dark mode + + # Palette toggle for dark mode + - media: "prefers-color-scheme: dark" + scheme: slate + primary: teal + accent: teal + toggle: + icon: material/toggle-switch + name: Switch to light mode + + custom_dir: 'docs/theme' + features: + - navigation.tabs + - navigation.tabs.stickyx + - navigation.instant + - navigation.instant.prefetch + - navigation.tracking + - navigation.section + - content.code.annotate + - toc.follow + - navigation.path + - navigation.top + - content.code.copy + - search.suggest + - content.tabs.link + - content.code.annotate + +plugins: + - search + +markdown_extensions: + - toc: + permalink: true + - admonition + - attr_list + - md_in_html + - pymdownx.emoji: + emoji_index: !!python/name:material.extensions.emoji.twemoji + emoji_generator: !!python/name:material.extensions.emoji.to_svg + - pymdownx.details + - pymdownx.superfences + - pymdownx.highlight: + anchor_linenums: true + line_spans: __span + pygments_lang_class: true + - pymdownx.inlinehilite + - pymdownx.snippets + - pymdownx.tabbed: + alternate_style: true + +watch: + - docs + +extra_css: + - assets/stylesheets/extra.css + +extra: + social: + - icon: fontawesome/brands/twitter + link: https://twitter.com/NapseInvest + name: X + - icon: fontawesome/brands/linkedin + link: https://fr.linkedin.com/company/napse-investment + name: Linkedin + - icon: fontawesome/brands/discord + link: https://discord.com/invite/47gKBreSXa + name: Discord + - icon: fontawesome/brands/github + link: https://github.com/napse-invest/ + name: Github + +nav: + - Home: + - Overview: "index.md" + - Quickstart: "sources/quickstart.md" +