-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 146c5d7
Showing
29 changed files
with
19,831 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
dist | ||
node_modules | ||
env | ||
test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
module.exports = { | ||
parser: "@typescript-eslint/parser", | ||
parserOptions: { | ||
project: "tsconfig.json", | ||
tsconfigRootDir: __dirname, | ||
sourceType: "module", | ||
}, | ||
plugins: ["@typescript-eslint/eslint-plugin", "simple-import-sort"], | ||
extends: ["plugin:@typescript-eslint/recommended", "plugin:prettier/recommended"], | ||
root: true, | ||
env: { | ||
node: true, | ||
jest: true, | ||
}, | ||
ignorePatterns: [".eslintrc.js"], | ||
rules: { | ||
"@typescript-eslint/interface-name-prefix": "off", | ||
"@typescript-eslint/explicit-function-return-type": "off", | ||
"@typescript-eslint/explicit-module-boundary-types": "off", | ||
"@typescript-eslint/no-explicit-any": "off", | ||
"simple-import-sort/imports": [ | ||
"error", | ||
{ | ||
"groups":[ | ||
["^@nestjs", "^typeorm", "^rxjs", "^@toss", "^cache"], | ||
["^./"], | ||
["^@chat", "^@token", "^@user"], | ||
["^@common"], | ||
], | ||
}, | ||
], | ||
"simple-import-sort/exports": "error", | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
name: walletmetrics-server CI | ||
|
||
on: pull_request | ||
|
||
jobs: | ||
Server_Build_Test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Setup Node.js | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: "16.14.2" | ||
cache: "yarn" | ||
|
||
- uses: actions/cache@v2 | ||
with: | ||
path: "**/node_modules" | ||
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }} | ||
|
||
- name: Install dependencies | ||
env: | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
run: | | ||
echo //npm.pkg.github.com/:_authToken=$NPM_TOKEN >> .npmrc | ||
yarn install --frozen-lockfile | ||
rm .npmrc | ||
- name: Test | ||
run: yarn test | ||
|
||
- name: Build | ||
run: yarn build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
# compiled output | ||
/dist | ||
/node_modules | ||
|
||
# Logs | ||
logs | ||
*.log | ||
npm-debug.log* | ||
pnpm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
lerna-debug.log* | ||
|
||
# OS | ||
.DS_Store | ||
|
||
# Tests | ||
/coverage | ||
/.nyc_output | ||
|
||
# IDEs and editors | ||
/.idea | ||
.project | ||
.classpath | ||
.c9/ | ||
*.launch | ||
.settings/ | ||
*.sublime-workspace | ||
|
||
# IDE - VSCode | ||
.vscode/* | ||
!.vscode/settings.json | ||
!.vscode/tasks.json | ||
!.vscode/launch.json | ||
!.vscode/extensions.json | ||
|
||
# env | ||
.local.env | ||
.development.env | ||
.development.*.env | ||
.production.env | ||
.production.*.env |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"printWidth": 120, | ||
"tabWidth": 2, | ||
"singleQuote": false, | ||
"trailingComma": "all", | ||
"semi": true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"eslint.enable": true, | ||
"editor.codeActionsOnSave": { | ||
"source.fixAll.eslint": true | ||
}, | ||
"editor.formatOnSave": true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
FROM node:16-alpine AS development | ||
|
||
RUN mkdir -p /usr/src/app | ||
WORKDIR /usr/src/app | ||
|
||
ARG NPM_TOKEN | ||
|
||
RUN echo //npm.pkg.github.com/:_authToken=$NPM_TOKEN >> .npmrc | ||
|
||
COPY package.json yarn.lock ./ | ||
RUN yarn install --immutable --immutable-cache --check-cache | ||
|
||
COPY . . | ||
RUN rm .npmrc | ||
|
||
RUN yarn build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
# Walletmetrics | ||
|
||
[](https://github.com/your-username/walletmetrics/blob/main/LICENSE) | ||
[](https://github.com/your-username/walletmetrics/issues) | ||
[](https://github.com/your-username/walletmetrics/stargazers) | ||
|
||
Walletmetrics is an on-chain user analytics service that aims to be the Google Analytics or Amplitude for Web3 products. It provides insights into user behavior and engagement by analyzing on-chain data. | ||
|
||
## Features | ||
|
||
- **Data-driven Insights**: Gain valuable insights into user behavior and engagement on your Web3 product by leveraging on-chain data. | ||
- **User Segmentation**: Analyze user segments based on various attributes such as transaction volume, frequency, and token holdings. | ||
- **Real-time Monitoring**: Monitor user activity in real-time and track important metrics for your Web3 product. | ||
- **Integration with Web3 Platforms**: Easily integrate Walletmetrics with popular Web3 platforms and protocols. | ||
|
||
## Getting Started | ||
|
||
### Prerequisites | ||
|
||
To run Walletmetrics, you need to have the following installed: | ||
|
||
- Node.js (version >= 12.0.0) | ||
- MongoDB (version >= 4.0.0) | ||
|
||
### Installation | ||
|
||
1. Clone the repository: | ||
|
||
```bash | ||
git clone https://github.com/Fantosi/walletmetrics-server.git | ||
``` | ||
|
||
2. Install the dependencies: | ||
|
||
```bash | ||
cd walletmetrics | ||
npm install | ||
``` | ||
|
||
3. Set up the configuration file: | ||
|
||
```bash | ||
cp .env.example .env | ||
``` | ||
|
||
Edit the `.env` file and provide the necessary configurations. | ||
|
||
4. Start the application: | ||
|
||
```bash | ||
npm start | ||
``` | ||
|
||
## Documentation | ||
|
||
For detailed instructions on how to use Walletmetrics and its API, please refer to the [Documentation](docs/README.md). | ||
|
||
|
||
## License | ||
|
||
This project is licensed under the [MIT License](LICENSE). | ||
|
||
## Acknowledgements | ||
|
||
- This project was inspired by the need for on-chain user analytics in the Web3 ecosystem. | ||
- We would like to thank the open-source community for their contributions. | ||
- This README file was completely written by GPT 3.5. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
// For TypeORM Cli | ||
import { DataSource } from "typeorm"; | ||
|
||
import config from "src/common/config/postgres.config"; | ||
|
||
export default new DataSource(config().postgres); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
version: "3" | ||
|
||
services: | ||
pg: | ||
image: postgres:bullseye | ||
container_name: walletmetrics-local-db | ||
env_file: | ||
- ./env/.local.env | ||
ports: | ||
- "5432:5432" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
version: '3' | ||
|
||
services: | ||
server: | ||
container_name: walletmetrics-main | ||
build: | ||
context: . | ||
dockerfile: Dockerfile | ||
ports: | ||
- '80:3000' | ||
command: | | ||
yarn start |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"$schema": "https://json.schemastore.org/nest-cli", | ||
"collection": "@nestjs/schematics", | ||
"sourceRoot": "src", | ||
"compilerOptions": { | ||
"deleteOutDir": true | ||
} | ||
} |
Oops, something went wrong.