Skip to content

Commit c36cb13

Browse files
committed
chore: sync open-source snapshot onto remote history
1 parent f8786bc commit c36cb13

557 files changed

Lines changed: 73815 additions & 3664 deletions

File tree

Some content is hidden

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

.env.example

Lines changed: 25 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,25 @@
1-
PORT=3000
2-
NODE_ENV=development
3-
JWT_SECRET=
4-
JWT_EXPIRE=30d
5-
ENCRYPTION_SECRET=
6-
DB_PATH=./data/community.db
7-
MODELS_DIR=./models
8-
LOG_LEVEL=info
9-
ALLOW_EXTERNAL_IN_PRIVATE=false
10-
MCP_API_BASE_URL=https://api.example.com/v1
11-
12-
# GitHub OAuth settings
13-
GITHUB_CLIENT_ID=
14-
GITHUB_CLIENT_SECRET=
15-
16-
# Admin and Group Protection Settings
17-
# Prevents admin password reset during server restart/update
18-
PRESERVE_ADMIN_PASSWORD=true
19-
# Additional safeguard for admin password
20-
NEVER_RESET_ADMIN_PASSWORD=true
21-
# Prevents modification of user groups during migrations
22-
SKIP_GROUP_CREATION=true
23-
# Migration mode: 'full', 'safe', or 'minimal'
24-
# - full: All migrations including user/group modifications
25-
# - safe: Schema migrations without user/group changes (default for updates)
26-
# - minimal: Only critical database structure
27-
MIGRATION_MODE=safe
1+
PORT=CHANGEME
2+
NODE_ENV=CHANGEME
3+
JWT_SECRET=CHANGEME
4+
JWT_EXPIRE=CHANGEME
5+
ENCRYPTION_SECRET=CHANGEME
6+
DB_PATH=CHANGEME
7+
MODELS_DIR=CHANGEME
8+
LOG_LEVEL=CHANGEME
9+
LANCEDB_BASE_URI=CHANGEME
10+
OPENAI_API_KEY=CHANGEME
11+
ANTHROPIC_API_KEY=CHANGEME
12+
COHERE_API_KEY=CHANGEME
13+
MISTRAL_API_KEY=CHANGEME
14+
ALLOW_EXTERNAL_IN_PRIVATE=CHANGEME
15+
MCP_API_BASE_URL=CHANGEME
16+
MCP_API_KEY=CHANGEME
17+
MCP_DEFAULT_MODEL=CHANGEME
18+
GITHUB_CLIENT_ID=CHANGEME
19+
GITHUB_CLIENT_SECRET=CHANGEME
20+
API_CORS_ORIGIN=CHANGEME
21+
FRONTEND_URL=CHANGEME
22+
PRESERVE_ADMIN_PASSWORD=CHANGEME
23+
NEVER_RESET_ADMIN_PASSWORD=CHANGEME
24+
SKIP_GROUP_CREATION=CHANGEME
25+
MIGRATION_MODE=CHANGEME

.github/workflows/ci.yml

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
backend:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout
14+
uses: actions/checkout@v4
15+
16+
- name: Setup Node
17+
uses: actions/setup-node@v4
18+
with:
19+
node-version: '20'
20+
cache: npm
21+
22+
- name: Install backend deps
23+
run: npm ci
24+
25+
- name: Lint backend (if config exists)
26+
run: |
27+
if [ -f .eslintrc ] || [ -f .eslintrc.js ] || [ -f .eslintrc.cjs ] || [ -f .eslintrc.json ] || [ -f eslint.config.js ] || [ -f eslint.config.mjs ] || [ -f eslint.config.cjs ]; then
28+
npm run lint
29+
else
30+
echo "No ESLint config found; skipping lint."
31+
fi
32+
33+
- name: Test backend
34+
run: npm test -- --runInBand --passWithNoTests
35+
36+
frontend:
37+
runs-on: ubuntu-latest
38+
steps:
39+
- name: Checkout
40+
uses: actions/checkout@v4
41+
42+
- name: Setup Node
43+
uses: actions/setup-node@v4
44+
with:
45+
node-version: '20'
46+
cache: npm
47+
cache-dependency-path: frontend/package-lock.json
48+
49+
- name: Install frontend deps
50+
working-directory: frontend
51+
run: npm ci
52+
53+
- name: Build frontend
54+
working-directory: frontend
55+
run: npm run build
56+
57+
python-sanity:
58+
runs-on: ubuntu-latest
59+
steps:
60+
- name: Checkout
61+
uses: actions/checkout@v4
62+
63+
- name: Setup Python
64+
uses: actions/setup-python@v5
65+
with:
66+
python-version: '3.11'
67+
68+
- name: Compile Python sources
69+
run: |
70+
python -m compileall scripts src/python_services
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Dependency Check
2+
3+
on:
4+
workflow_dispatch:
5+
schedule:
6+
- cron: '0 6 * * 1'
7+
8+
jobs:
9+
deps:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout
13+
uses: actions/checkout@v4
14+
15+
- name: Setup Node
16+
uses: actions/setup-node@v4
17+
with:
18+
node-version: '20'
19+
20+
- name: Backend deps check
21+
run: |
22+
npm ci
23+
npm run deps:check
24+
npm run deps:audit
25+
26+
- name: Frontend deps check
27+
working-directory: frontend
28+
run: |
29+
npm ci
30+
npm run deps:check
31+
npm run deps:audit

.github/workflows/secrets-scan.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Secrets Scan
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
gitleaks:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout
14+
uses: actions/checkout@v4
15+
with:
16+
fetch-depth: 0
17+
18+
- name: Run gitleaks
19+
uses: gitleaks/gitleaks-action@v2
20+
env:
21+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.gitignore

Lines changed: 59 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,63 @@
1-
# Logs
2-
*.log
3-
npm-debug.log*
4-
yarn-error.log
5-
yarn-debug.log
6-
7-
# Node.js
1+
# Dependency directories
82
node_modules/
9-
package-lock.json
10-
11-
# Frontend
12-
frontend/node_modules/
13-
frontend/build/
14-
frontend/.env.*
15-
frontend/package-lock.json
3+
jspm_packages/
4+
uploads/
5+
tmp/
6+
temp/
7+
.cline/
8+
vllm/
9+
vllm_source/
1610

1711
# Environment variables
1812
.env
19-
.env.*
20-
!/.env.example
21-
rename-to-.env
22-
venv/
13+
.env.local
14+
.env.development.local
15+
.env.test.local
16+
.env.production.local
17+
.clinerules/*
2318

24-
# Data and databases
19+
# Database files
2520
data/
26-
database.sqlite
27-
*.db
2821

29-
# Uploads
30-
uploads/
31-
32-
# SaaS-specific files (commercial)
33-
saas/
34-
35-
# Models - ignore all model files but keep the directory structure
22+
# Model files
3623
models/*
3724
!models/.gitkeep
25+
scripts/monitoring/
26+
27+
# Deployment configuration
28+
saas/.connect-env
29+
ecosystem.config.js
30+
31+
# Logs
32+
logs
33+
*.log
34+
npm-debug.log*
35+
yarn-debug.log*
36+
yarn-error.log*
37+
38+
# Runtime data
39+
pids
40+
*.pid
41+
*.seed
42+
*.pid.lock
43+
44+
# Directory for instrumented libs
45+
lib-cov
46+
47+
# Coverage directory
48+
coverage
49+
50+
# Editors
51+
.idea/
52+
.vscode/
53+
*.swp
54+
*.swo
55+
.DS_Store
3856

39-
# Python
57+
# Python development files
4058
__pycache__/
41-
*.pyc
42-
*.pyo
43-
*.pyd
59+
*.py[cod]
60+
*$py.class
4461
.Python
4562
build/
4663
develop-eggs/
@@ -57,11 +74,13 @@ wheels/
5774
*.egg-info/
5875
.installed.cfg
5976
*.egg
60-
instance/
61-
62-
# macOS
63-
.DS_Store
64-
65-
# IDE / Editor specific
66-
.vscode/
67-
.idea/
77+
venv/
78+
ENV/
79+
env/
80+
.venv/
81+
env.bak/
82+
venv.bak/
83+
.pytest_cache/
84+
.coverage
85+
htmlcov/
86+
.ipynb_checkpoints

.npmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
node-options=--no-deprecation

.nvmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
20

.python-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
3.11

NOTICE

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
ScalyticsConnect
2+
Copyright 2024-present Scalytics, Inc. (https://www.scalytics.io)
3+
4+
This product includes software developed by Scalytics, Inc.

0 commit comments

Comments
 (0)