Skip to content

Commit c8334e3

Browse files
authored
Merge pull request #10 from scalytics/oss-sync
chore: sync open-source snapshot onto remote history
2 parents f8786bc + 5017258 commit c8334e3

567 files changed

Lines changed: 74471 additions & 3666 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/CODEOWNERS

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Default ownership
2+
* @scalytics
3+
4+
# Backend
5+
/src/ @scalytics
6+
/scripts/ @scalytics
7+
8+
# Frontend
9+
/frontend/ @scalytics
10+
11+
# Deployment and docs
12+
/deploy/ @scalytics
13+
/docs/ @scalytics
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
name: Bug Report
2+
description: Report a reproducible problem in Scalytics Connect
3+
title: "[Bug]: "
4+
labels: ["bug"]
5+
body:
6+
- type: markdown
7+
attributes:
8+
value: |
9+
Thanks for reporting a bug. Please provide enough detail to reproduce it.
10+
- type: textarea
11+
id: summary
12+
attributes:
13+
label: Summary
14+
description: What happened?
15+
placeholder: Describe the observed behavior.
16+
validations:
17+
required: true
18+
- type: textarea
19+
id: steps
20+
attributes:
21+
label: Steps to Reproduce
22+
description: Provide exact steps.
23+
placeholder: |
24+
1. ...
25+
2. ...
26+
3. ...
27+
validations:
28+
required: true
29+
- type: textarea
30+
id: expected
31+
attributes:
32+
label: Expected Behavior
33+
placeholder: Describe what you expected.
34+
validations:
35+
required: true
36+
- type: textarea
37+
id: logs
38+
attributes:
39+
label: Logs and Screenshots
40+
description: Include relevant logs, stack traces, or screenshots.
41+
render: shell
42+
- type: input
43+
id: version
44+
attributes:
45+
label: Version
46+
description: Which version/commit are you using?
47+
placeholder: e.g. 1.8.0 or commit SHA
48+
- type: dropdown
49+
id: area
50+
attributes:
51+
label: Area
52+
options:
53+
- Backend
54+
- Frontend
55+
- Python services
56+
- Deployment
57+
- Documentation
58+
- Other

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
blank_issues_enabled: false
2+
contact_links:
3+
- name: Security vulnerability report
4+
url: mailto:security@scalytics.io
5+
about: Report security issues privately. Do not file public issues for vulnerabilities.
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: Feature Request
2+
description: Propose a new capability or enhancement
3+
title: "[Feature]: "
4+
labels: ["enhancement"]
5+
body:
6+
- type: markdown
7+
attributes:
8+
value: |
9+
Thanks for the suggestion. Please focus on problem and impact.
10+
- type: textarea
11+
id: problem
12+
attributes:
13+
label: Problem Statement
14+
description: What user or operational problem are you trying to solve?
15+
placeholder: Describe the pain point.
16+
validations:
17+
required: true
18+
- type: textarea
19+
id: proposal
20+
attributes:
21+
label: Proposed Solution
22+
description: What should change?
23+
placeholder: Describe your proposed approach.
24+
validations:
25+
required: true
26+
- type: textarea
27+
id: alternatives
28+
attributes:
29+
label: Alternatives Considered
30+
description: Any alternatives you considered.
31+
- type: textarea
32+
id: impact
33+
attributes:
34+
label: Impact
35+
description: Who benefits and how?
36+
- type: dropdown
37+
id: area
38+
attributes:
39+
label: Area
40+
options:
41+
- Backend
42+
- Frontend
43+
- Python services
44+
- Deployment
45+
- Documentation
46+
- Other

.github/pull_request_template.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
## Summary
2+
3+
- What changed?
4+
- Why was this needed?
5+
6+
## Type of Change
7+
8+
- [ ] Bug fix
9+
- [ ] Feature
10+
- [ ] Refactor
11+
- [ ] Documentation
12+
- [ ] Chore
13+
14+
## Testing
15+
16+
- [ ] `npm run lint`
17+
- [ ] `npm test -- --runInBand --passWithNoTests`
18+
- [ ] `cd frontend && npm run build`
19+
- [ ] `python -m compileall scripts src/python_services` (if Python affected)
20+
21+
Notes:
22+
23+
## Checklist
24+
25+
- [ ] Linked issue(s) where relevant
26+
- [ ] No secrets or credentials committed
27+
- [ ] Updated docs and `CHANGELOG.md` if user-facing behavior changed
28+
- [ ] Added migration notes for any breaking change

.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 install
52+
53+
- name: Build frontend
54+
working-directory: frontend
55+
run: CI=false 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: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
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+
persist-credentials: false
18+
19+
- name: Install gitleaks
20+
run: |
21+
GITLEAKS_VERSION=8.24.2
22+
curl -sSfL "https://github.com/gitleaks/gitleaks/releases/download/v${GITLEAKS_VERSION}/gitleaks_${GITLEAKS_VERSION}_linux_x64.tar.gz" | tar -xz
23+
sudo mv gitleaks /usr/local/bin/gitleaks
24+
25+
- name: Run gitleaks
26+
run: |
27+
rm -rf /tmp/repo-scan
28+
mkdir -p /tmp/repo-scan
29+
git archive --format=tar HEAD | tar -xf - -C /tmp/repo-scan
30+
gitleaks detect --source /tmp/repo-scan --no-git --redact --exit-code 1

0 commit comments

Comments
 (0)