Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
77880df
fix: unchecked asset filters (#95)
NandyBa Dec 18, 2024
7f35422
merge master in develop (#103)
NandyBa Dec 18, 2024
68dfdcf
Merge branch 'master' into develop
NandyBa Dec 18, 2024
0d7f8fe
feat: restrict merges to preprod (#104)
NandyBa Dec 18, 2024
f81f456
merge develop into master (#102) (#107)
NandyBa Dec 19, 2024
db54874
feat: add workflow to restrict merges to master (#108)
NandyBa Dec 21, 2024
d31c2ab
feat: add product type filter (#94)
NandyBa Dec 21, 2024
e8d140e
Prevents settings menu from closing while clicking on calendar (#113)
BenoistP Jan 26, 2025
eb79909
fix: other asset balance by wallet (#112)
BenoistP Mar 1, 2025
ca743df
feat: optimize RPC calls (#114)
NandyBa Mar 24, 2025
8aa4fbe
73 feature add matomo analytics 2 (#110)
BenoistP Mar 24, 2025
f384bf1
deployment fix
BenoistP Mar 24, 2025
519c770
Merge branch 'preprod' into develop
BenoistP May 3, 2025
f605c36
Clean env
Sigri44 May 4, 2025
dff64f2
Update branch.yml
Sigri44 May 4, 2025
3e8137e
Fix spellcheck
Sigri44 May 4, 2025
6ad827c
Fix spellcheck
Sigri44 May 4, 2025
e23d166
Fix spellcheck
Sigri44 May 4, 2025
d79a793
Clean README
Sigri44 May 4, 2025
8f5b958
Fix spellcheck
Sigri44 May 4, 2025
e8823ef
Add id site for matomo
Sigri44 May 5, 2025
7a9050a
Fix matomo id
Sigri44 May 5, 2025
739f583
Factoring tokens added (#121)
BenoistP May 14, 2025
807f335
117 read only not working (#122)
BenoistP May 21, 2025
43afd49
Make yarn lockfile great again ... again
BenoistP May 21, 2025
f0350f7
Squashed commit of the following:
BenoistP May 24, 2025
2ef4334
Fix docker local build error
BenoistP Jun 13, 2025
5a06954
Docker: fixes
BenoistP Jun 13, 2025
3d3f7c2
Merge branch 'preprod' into develop
BenoistP Jun 13, 2025
5e12bdf
Fix CI/CD
Sigri44 Jun 13, 2025
19d9ce5
v2.4.2
Sigri44 Jun 13, 2025
5f529c3
Merge branch 'preprod' into develop
Sigri44 Jun 13, 2025
a393df5
Clean .env.sample
Sigri44 Jun 13, 2025
433bda2
fix: consume initializeProvidersQueue and add timout (#125)
Yohann76 Jun 20, 2025
5620fde
Include alternative apis (PitsBI actually) (#129)
BenoistP Aug 8, 2025
126ad8b
130 clicking on an asset and/or getting back to list/card view view c…
BenoistP Aug 8, 2025
9632a4e
Feat reusd sushiv3 (#134)
BenoistP Aug 8, 2025
03560ac
Update yarn.lock / fix for failed build
BenoistP Aug 8, 2025
5b5a5fc
Revert "Update yarn.lock / fix for failed build"
BenoistP Aug 8, 2025
cab7fa9
yarn: fix for failed build
BenoistP Aug 8, 2025
949a457
workflow: vercel
BenoistP Nov 14, 2025
7a1bcda
Update vercel.json
BenoistP Nov 14, 2025
2246999
Revert "Update vercel.json"
BenoistP Nov 14, 2025
9cc9937
Revert "workflow: vercel"
BenoistP Nov 14, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules
17 changes: 16 additions & 1 deletion .env.sample
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
BUILD_ENV=
COMMUNITY_API_KEY=
REALTOKEN_COMMUNITY_API_KEY=
THEGRAPH_API_KEY=

REALTOKEN_COMMUNITY_API_BASE='https://api.realtoken.community/'
REALTOKEN_COMMUNITY_API_VERSION='v1'
REALTOKEN_COMMUNITY_API_GET_ALLTOKENS='token'
REALTOKEN_COMMUNITY_API_HISTORY_BASE='https://history.api.realtoken.community/'
PITSBI_API_BASE='https://api.pitsbi.io/'
PITSBI_API_VERSION='api'
PITSBI_API_GET_LASTUPDATE='last_get_realTokens_communityDashboard'
PITSBI_API_GET_ALLTOKENS='realTokens_communityDashboard'

MATOMO_URL='https://data.realtoken.community/'
MATOMO_SITE_ID=1

RPC_URLS_ETH_MAINNET=https://rpc.eth.gateway.fm,https://ethereum-rpc.publicnode.com,https://eth-mainnet.public.blastapi.io,https://ethereum.blockpi.network/v1/rpc/public,https://rpc.mevblocker.io/fast,https://rpc.mevblocker.io,https://0xrpc.io/eth
RPC_URLS_GNOSIS_MAINNET=https://rpc.gnosischain.com,https://rpc.gnosis.gateway.fm,https://rpc.ap-southeast-1.gateway.fm/v4/gnosis/non-archival/mainnet,https://gnosis-rpc.publicnode.com,https://gnosis.oat.farm,https://0xrpc.io/gno
17 changes: 17 additions & 0 deletions .github/workflows/branch-check-master.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Restrict merges to master

on:
pull_request:
branches:
- master

jobs:
check-branch-master:
runs-on: ubuntu-latest
steps:
- name: Check if the source branch is preprod
run: |
if [ "${{ github.event.pull_request.head.ref }}" != "preprod" ]; then
echo "Pull requests to master must come from preprod branch."
exit 1
fi
17 changes: 17 additions & 0 deletions .github/workflows/branch-check-preprod.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Restrict merges to preprod

on:
pull_request:
branches:
- preprod

jobs:
check-branch:
runs-on: ubuntu-latest
steps:
- name: Check if the source branch is develop
run: |
if [ "${{ github.event.pull_request.head.ref }}" != "develop" ]; then
echo "Pull requests to preprod must come from develop branch."
exit 1
fi
60 changes: 51 additions & 9 deletions .github/workflows/branch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,13 +70,55 @@ jobs:
SSH_PORT: ${{ secrets.SSH_PORT }}

- name: Update branch environment
env:
DOCKER_BRANCH: ${{ github.ref_name }}
DOCKER_REGISTRY: ${{ secrets.DOCKER_REGISTRY }}
DOCKER_LOGIN: ${{ secrets.DOCKER_LOGIN }}
DOCKER_PASSWD: ${{ secrets.DOCKER_PASSWD }}
DOMAIN_URL: ${{ secrets.DOMAIN_URL }}
THEGRAPH_API_KEY: ${{ secrets.THEGRAPH_API_KEY }}
REALTOKEN_COMMUNITY_API_KEY: ${{ secrets.REALTOKEN_COMMUNITY_API_KEY }}
RPC_URLS_ETH_MAINNET: ${{ secrets.RPC_URLS_ETH_MAINNET }}
RPC_URLS_GNOSIS_MAINNET: ${{ secrets.RPC_URLS_GNOSIS_MAINNET }}
MATOMO_ID_PROD: ${{ secrets.MATOMO_ID_PROD }}
MATOMO_ID_PREPROD: ${{ secrets.MATOMO_ID_PREPROD }}
MATOMO_ID_DEVELOP: ${{ secrets.MATOMO_ID_DEVELOP }}
run: |
ssh staging 'export DOCKER_BRANCH=${{ github.ref_name }} DOCKER_REGISTRY=${{ secrets.DOCKER_REGISTRY }}
cd /var/docker/dashboard-v2/${DOCKER_BRANCH}
git pull origin ${DOCKER_BRANCH}
docker compose --file docker-compose-branch.yml pull
docker login -u ${{ secrets.DOCKER_LOGIN }} -p ${{ secrets.DOCKER_PASSWD }} ${DOCKER_REGISTRY}
THEGRAPH_API_KEY=${{ secrets.THEGRAPH_API_KEY }} \
COMMUNITY_API_KEY=${{ secrets.COMMUNITY_API_KEY }} \
HOSTNAME=${{ github.ref_name == 'master' && 'dashboard.realtoken.community' || 'dashboard.${DOCKER_BRANCH}.realtoken.community' }} \
docker compose --project-name ${{ github.ref_name }}-dashboard --file docker-compose-branch.yml up -d'
if [[ "$DOCKER_BRANCH" == "master" ]]; then
export MATOMO_SITE_ID="$MATOMO_ID_PROD"
export HOSTNAME="dashboard.$DOMAIN_URL"
elif [[ "$DOCKER_BRANCH" == "preprod" ]]; then
export MATOMO_SITE_ID="$MATOMO_ID_PREPROD"
export HOSTNAME="dashboard.$DOCKER_BRANCH.$DOMAIN_URL"
else
export MATOMO_SITE_ID="$MATOMO_ID_DEVELOP"
export HOSTNAME="dashboard.$DOCKER_BRANCH.$DOMAIN_URL"
fi

ssh staging <<EOF
set -euxo pipefail
export DOCKER_BRANCH="$DOCKER_BRANCH"
export DOCKER_REGISTRY="$DOCKER_REGISTRY"

cd /var/docker/dashboard-v2/\$DOCKER_BRANCH
git pull origin \$DOCKER_BRANCH
docker compose --file docker-compose-branch.yml pull
docker login -u "$DOCKER_LOGIN" -p "$DOCKER_PASSWD" \$DOCKER_REGISTRY

THEGRAPH_API_KEY="$THEGRAPH_API_KEY" \
REALTOKEN_COMMUNITY_API_KEY="$REALTOKEN_COMMUNITY_API_KEY" \
REALTOKEN_COMMUNITY_API_BASE="https://api.$DOMAIN_URL" \
REALTOKEN_COMMUNITY_API_VERSION='v1' \
REALTOKEN_COMMUNITY_API_GET_ALLTOKENS='token' \
REALTOKEN_COMMUNITY_API_HISTORY_BASE="https://history.api.$DOMAIN_URL/" \
PITSBI_API_BASE="https://api.pitsbi.io/" \
PITSBI_API_VERSION='api' \
PITSBI_API_GET_LASTUPDATE='last_get_realTokens_communityDashboard' \
PITSBI_API_GET_ALLTOKENS='realTokens_communityDashboard' \
MATOMO_URL="https://data.$DOMAIN_URL/" \
MATOMO_SITE_ID="$MATOMO_SITE_ID" \
RPC_URLS_ETH_MAINNET="$RPC_URLS_ETH_MAINNET" \
RPC_URLS_GNOSIS_MAINNET="$RPC_URLS_GNOSIS_MAINNET" \
HOSTNAME="$HOSTNAME" \
docker compose --project-name \$DOCKER_BRANCH-dashboard --file docker-compose-branch.yml up -d
EOF
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,4 @@ yarn-error.log*

# typescript
*.tsbuildinfo
pnpm-lock.yaml
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v18.20.4
7 changes: 4 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# 1. Install dependencies only when needed
FROM node:16-alpine AS deps
FROM node:18-alpine AS deps
# Check https://github.com/nodejs/docker-node/tree/b4117f9333da4138b03a546ec926ef50a31506c3#nodealpine to understand why libc6-compat might be needed.
RUN apk add --no-cache libc6-compat

Expand All @@ -12,15 +12,15 @@ RUN yarn --frozen-lockfile


# 2. Rebuild the source code only when needed
FROM node:16-alpine AS builder
FROM node:18-alpine AS builder
WORKDIR /app
COPY --from=deps /app/node_modules ./node_modules
COPY . .

RUN yarn build

# 3. Production image, copy all the files and run next
FROM node:16-alpine AS runner
FROM node:18-alpine AS runner
WORKDIR /app

ENV NODE_ENV=production
Expand All @@ -35,6 +35,7 @@ COPY --from=builder /app/public ./public
COPY --from=builder --chown=nextjs:nodejs /app/.next/standalone ./
COPY --from=builder --chown=nextjs:nodejs /app/.next/static ./.next/static

RUN npm i [email protected] --ignore-engines
USER nextjs

EXPOSE 3000
Expand Down
12 changes: 3 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

## TODO

- [x] Use Community API to get RealTokens data (and remove public/mock/realt.min.json)
- [x] Display assets in a table
- [x] Allow to sort assets
- [ ] Create Readme
Expand All @@ -14,16 +13,11 @@

### <a name="env">Environment</a>

To run the project you will need to set-up a `.env` file in the root folder:
To run the project you will need to set-up a `.env` file in the root folder, by copy/paste `.env.sample` file.

```
COMMUNITY_API_KEY=XXXXXXXXXXXX
THEGRAPH_API_KEY=XXXXXXXXXXXX
```
To get a `REALTOKEN_COMMUNITY_API_KEY`, join the dedicated [telegram dev channel](https://t.me/+XQyoaFfmN61yk7X0) then ask for.

To get a `COMMUNITY_API_KEY`, join the dedicated [telegram dev channel](https://t.me/+XQyoaFfmN61yk7X0) then ask for.

To get a THEGRAPH_API_KEY, you need to create an account on thegraph.com [Thegraph docs](https://thegraph.com/docs/en/querying/managing-api-keys/)
To get a `THEGRAPH_API_KEY`, you need to create an account on [thegraph](https://thegraph.com/docs/en/querying/managing-api-keys/)

### Node.js version

Expand Down
15 changes: 14 additions & 1 deletion docker-compose-branch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,20 @@ services:
container_name: ${DOCKER_BRANCH}-dashboard
environment:
- THEGRAPH_API_KEY=$THEGRAPH_API_KEY
- COMMUNITY_API_KEY=$COMMUNITY_API_KEY
- REALTOKEN_COMMUNITY_API_KEY=$REALTOKEN_COMMUNITY_API_KEY

- REALTOKEN_COMMUNITY_API_BASE=$REALTOKEN_COMMUNITY_API_BASE
- REALTOKEN_COMMUNITY_API_VERSION=$REALTOKEN_COMMUNITY_API_VERSION
- REALTOKEN_COMMUNITY_API_GET_ALLTOKENS=$REALTOKEN_COMMUNITY_API_GET_ALLTOKENS
- REALTOKEN_COMMUNITY_API_HISTORY_BASE=$REALTOKEN_COMMUNITY_API_HISTORY_BASE
- PITSBI_API_BASE
- PITSBI_API_VERSION
- PITSBI_API_GET_LASTUPDATE
- PITSBI_API_GET_ALLTOKENS
- MATOMO_URL=$MATOMO_URL
- MATOMO_SITE_ID=$MATOMO_SITE_ID
- RPC_URLS_ETH_MAINNET=$RPC_URLS_ETH_MAINNET
- RPC_URLS_GNOSIS_MAINNET=$RPC_URLS_GNOSIS_MAINNET
networks:
- traefik-realt
labels:
Expand Down
2 changes: 0 additions & 2 deletions docker-compose.local.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
version: '3'

services:
app:
build:
Expand Down
2 changes: 1 addition & 1 deletion next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const nextConfig = {
outputStandalone: true,
},
images: {
domains: ['realt.co'],
domains: ['realt.co', 'static.debank.com'],
},
publicRuntimeConfig: {
version,
Expand Down
Loading