Skip to content

Commit 0a43ab0

Browse files
committed
first commit
1 parent b66ae37 commit 0a43ab0

File tree

2,599 files changed

+335038
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

2,599 files changed

+335038
-0
lines changed

.env.example

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
ENVIRONMENT=dev # stg, prod
2+
AXB_NAME='aixblock-platform'
3+
AIXBLOCK_IMAGE_VERSION=7.0.8_dev
4+
AIXBLOCK_IMAGE_NAME=aixblock/platform
5+
AXB_HOST=https://app.aixblock.io/
6+
AXB_PUBLIC_PORT=8080
7+
AXB_PUBLIC_SSL_PORT=8443
8+
AXB_DATA=/aixblock/data
9+
AXB_LOG_LEVEL=ERROR
10+
CRAWL_URL=https://crawling.aixblock.io/
11+
POSTGRES_NAME=platform_v2
12+
POSTGRES_USER=postgres
13+
POSTGRES_PASSWORD=@9^xwWA
14+
POSTGRES_PORT=5432
15+
POSTGRES_HOST=127.0.0.1
16+
17+
LETSENCRYPT_PATH=/etc/letsencrypt
18+
19+
#SESSION_REDIS
20+
SESSION_REDIS_HOST='localhost'
21+
SESSION_REDIS_PORT=6379
22+
SESSION_REDIS_DB=0
23+
SESSION_REDIS_PASSWORD=''
24+
SESSION_REDIS_USER=''
25+
SESSION_REDIS_PREFIX='session'
26+
SESSION_REDIS_SOCKET_TIMEOUT=1800
27+
SESSION_REDIS_TLS=false
28+
BASE_DIR=/Users/macbookpro16/platform-v2/
29+
#
30+
SHARED_SECRET_KEY='42d8236921664c1fb7097455e9e9c6ea'
31+
#GOOGLE_OAUTH2
32+
GOOGLE_OAUTH2_CLIENT_ID=''
33+
GOOGLE_OAUTH2_CLIENT_SECRET=''
34+
GOOGLE_OAUTH2_PROJECT_ID=''
35+
#OAUTH SERVER
36+
OAUTH_CLIENT_ID='cII7nNypNovzLYIZPRTv6DeuljC4nqWju4NxZakF'
37+
OAUTH_CLIENT_SECRET='RNAk3Fo9bXrwJnC1CJwnjtJGIkUNb9syKDbBPlhPZw4hRsocayj380pX6txcCvALtqgca9AXRBKBYO9yvQ8q231t5RBG9b83UbOdsHEQDNpqFCTEJ3WA4sYJ2K96mWCu'
38+
OAUTH_TOKEN_URL='https://app.aixblock.io/o/token/'
39+
OAUTH_AUTHORIZE_URL='https://app.aixblock.io/o/authorize'
40+
OAUTH_API_BASE_URL='https://app.aixblock.io/'
41+
OAUTH_REDIRECT_URL='https://app.aixblock.io/oauth/login/callback'
42+
# JUPYTER_NOTEBOOK. URL must always ended withs /
43+
NOTEBOOK_URL=https://jupyter.aixblock.io
44+
NOTEBOOK_TOKEN=bac99e2a1b4446a7bced64484eea7db8
45+
MASTER_NODE=''
46+
MASTER_TOKEN=''
47+
48+
# CDN
49+
ASSETS_CDN=https://aixblock-staging.b-cdn.net
50+
51+
CENTRIFUGE_SECRET=""
52+
CENTRIFUGE_URL=""
53+
54+
# secret key for password minio
55+
MINIO_API_IP=""
56+
MINIO_API_URL=""
57+
MINIO_USER=""
58+
MINIO_PASSWORD=""

.gitignore

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
.env
2+
package-lock.json
3+
yarn.lock
4+
.idea/
5+
node_modules/
6+
__pycache__/
7+
venv/
8+
*venv/
9+
**/venv
10+
.DS_Store
11+
# deploy/eclipse-mosquitto/config/mosquitto.conf
12+
**/data/dataset
13+
README.md
14+
.vscode
15+
frontend/bun.lockb
16+
general-editor/package-lock.json
17+
react-image-annotate/package-lock.json
18+
general-editor/package-lock.json
19+
general-editor/package-lock.json
20+
react-image-annotate/package-lock.json

DEVELOPMENT.md

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
DEVELOPMENT
2+
3+
### 1. (Optional) Install PostgreSQL
4+
PostgreSQL is optional. If you already have a database or prefer another, you can skip this step.
5+
6+
#### Ubuntu/Debian:
7+
```bash
8+
sudo apt update
9+
sudo apt install -y postgresql postgresql-contrib
10+
```
11+
12+
#### macOS (Homebrew):
13+
```bash
14+
brew update
15+
brew install postgresql
16+
```
17+
18+
#### Windows:
19+
1. Download the installer from [PostgreSQL official site](https://www.postgresql.org/download/).
20+
2. Follow the installation wizard and ensure `pgAdmin` and `psql` are installed.
21+
3. Add PostgreSQL to the system PATH if necessary.
22+
23+
### 2. (Optional) Start and Enable PostgreSQL
24+
If you installed PostgreSQL, start it with the following commands:
25+
26+
#### Ubuntu/Debian:
27+
```bash
28+
sudo systemctl start postgresql
29+
sudo systemctl enable postgresql
30+
```
31+
32+
#### macOS:
33+
```bash
34+
brew services start postgresql
35+
```
36+
37+
#### Windows:
38+
- PostgreSQL should start automatically after installation.
39+
- If not, use `pgAdmin` or `Services` to start it manually.
40+
41+
### 3. (Optional) Verify PostgreSQL Installation
42+
```bash
43+
psql --version
44+
```
45+
46+
### 4. (Optional) Set Up Database
47+
If using PostgreSQL, set up the database with the following:
48+
```bash
49+
sudo -u postgres psql
50+
# Inside psql shell
51+
CREATE DATABASE platform_v2;
52+
CREATE USER postgres WITH ENCRYPTED PASSWORD '@9^xwWA';
53+
GRANT ALL PRIVILEGES ON DATABASE platform_v2 TO postgres;
54+
\q
55+
```
56+
57+
### 5. Setup and Run Project
58+
PostgreSQL is not required if your project supports other databases (e.g., SQLite, MySQL). Adjust configurations accordingly.
59+
```bash
60+
# set-up
61+
make setup
62+
63+
# run - open two terminals and run
64+
make worker # in one terminal
65+
make run # in another terminal
66+
```
67+

Makefile

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
include .env
2+
export
3+
4+
UI_DIR := $(shell pwd)
5+
export UI_DIR
6+
7+
# build with yarn.sh
8+
frontend-yarn:
9+
cd frontend && yarn
10+
general-editor-yarn:
11+
cd general-editor && yarn
12+
react-image-annotate-yarn:
13+
cd react-image-annotate && yarn
14+
tool-llm-editor-yarn:
15+
cd tool-llm-editor && yarn
16+
three-dimensional-editor-yarn:
17+
cd three-dimensional-editor && yarn
18+
# run dev with yarnsh - windowns - linux - mac
19+
20+
yarn-build:
21+
make frontend-yarn && make general-editor-yarn && make react-image-annotate-yarn && make tool-llm-editor-yarn && make three-dimensional-editor-yarn
22+
23+
setup:
24+
make yarn-build && python3 -m pip install aixblock_core && python3 setup_core.py
25+
26+
worker:
27+
python3 worker.py
28+
29+
run:
30+
python3 main.py

frontend/.editorconfig

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
root = true
2+
3+
[*]
4+
end_of_line = lf
5+
insert_final_newline = true
6+
indent_size = 2
7+
indent_style = space

frontend/.gitignore

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2+
3+
# dependencies
4+
/node_modules
5+
/.pnp
6+
.pnp.js
7+
8+
# testing
9+
/coverage
10+
11+
# production
12+
/build
13+
14+
# misc
15+
.DS_Store
16+
.env.local
17+
.env.development.local
18+
.env.test.local
19+
.env.production.local
20+
21+
npm-debug.log*
22+
yarn-debug.log*
23+
yarn-error.log*

0 commit comments

Comments
 (0)