diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 0000000000..4410c18794 --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,29 @@ +{ + "name": "RocketRide Engine", + "image": "mcr.microsoft.com/devcontainers/base:ubuntu-22.04", + "features": { + "ghcr.io/devcontainers/features/node:1": { + "version": "20" + }, + "ghcr.io/devcontainers/features/python:1": { + "version": "3.12" + }, + "ghcr.io/devcontainers/features/java:1": { + "version": "17", + "installMaven": "true" + }, + "ghcr.io/devcontainers/features/common-utils:2": {} + }, + "postCreateCommand": "npm install -g pnpm@latest && sudo apt-get update && sudo apt-get install -y cmake build-essential ninja-build pkg-config", + "customizations": { + "vscode": { + "extensions": [ + "dbaeumer.vscode-eslint", + "ms-python.python", + "charliermarsh.ruff", + "ms-vscode.cmake-tools" + ] + } + }, + "remoteUser": "vscode" +} diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 0000000000..5552bd64f4 --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1,29 @@ +# Default owners for everything +* @rocketride-org/maintainers + +# C++ engine +/packages/server/ @rocketride-org/engine +/apps/engine/ @rocketride-org/engine + +# Python pipeline nodes +/nodes/ @rocketride-org/nodes + +# Client SDKs +/packages/client-typescript/ @rocketride-org/sdk +/packages/client-python/ @rocketride-org/sdk +/packages/client-mcp/ @rocketride-org/sdk + +# AI modules +/packages/ai/ @rocketride-org/ai + +# Applications +/apps/chat-ui/ @rocketride-org/frontend +/apps/dropper-ui/ @rocketride-org/frontend +/apps/vscode/ @rocketride-org/vscode + +# CI/CD and DevOps +/.github/ @rocketride-org/devops +/scripts/ @rocketride-org/devops + +# Documentation +/docs/ @rocketride-org/maintainers diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml new file mode 100644 index 0000000000..572d0c5522 --- /dev/null +++ b/.github/FUNDING.yml @@ -0,0 +1,2 @@ +github: [rocketride-org] +custom: ["https://rocketride.ai/sponsor"] diff --git a/.github/SUPPORT.md b/.github/SUPPORT.md new file mode 100644 index 0000000000..323fdca3da --- /dev/null +++ b/.github/SUPPORT.md @@ -0,0 +1,26 @@ +# Support + +Looking for help with RocketRide? Here's where to go. + +## Documentation + +- **[Documentation site](https://docs.rocketride.ai)** — guides, tutorials, API reference +- **[Build system docs](docs/README-builder.md)** — building from source +- **[Client library docs](docs/README-clients.md)** — TypeScript, Python, MCP SDKs + +## Getting Help + +- **[GitHub Discussions](https://github.com/rocketride-org/rocketride-server/discussions)** — ask questions, share ideas, connect with the community +- **[Stack Overflow](https://stackoverflow.com/questions/tagged/rocketride)** — search existing answers or ask a new question with the `rocketride` tag + +## Reporting Bugs + +Found a bug? Please [open an issue](https://github.com/rocketride-org/rocketride-server/issues/new/choose) using the bug report template. + +## Security Issues + +For security vulnerabilities, please see our [Security Policy](SECURITY.md). Do **not** open a public issue for security concerns. + +## What Doesn't Belong in Issues + +GitHub Issues are for **bug reports** and **feature requests** only. Support questions opened as issues will be converted to Discussions. diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md new file mode 100644 index 0000000000..823b3aaa8a --- /dev/null +++ b/.github/copilot-instructions.md @@ -0,0 +1,72 @@ +# Copilot Instructions for RocketRide Engine + +## Build System + +This project uses a **custom declarative JS-based builder** (not npm/pnpm scripts). The entry point is `./builder`. + +```bash +./builder build # Full build (all modules, parallel) +./builder build --sequential # Sequential if parallel fails +./builder : # Per-module command +./builder test # All tests +./builder clean # Clean all +``` + +### Key modules + +| Module | Build | Test | +|--------|-------|------| +| `server` | `server:build` | `server:test` | +| `nodes` | `nodes:build` | `nodes:test` (contracts), `nodes:test-full` (integration) | +| `client-typescript` | `client-typescript:build` | `client-typescript:test` | +| `client-python` | `client-python:build` | `client-python:test` | +| `client-mcp` | `client-mcp:build` | `client-mcp:test` | +| `ai` | `ai:build` | `ai:test` | + +### Linting + +```bash +npx eslint . # TypeScript/JavaScript +ruff check nodes/ # Python linting +ruff format nodes/ # Python formatting +``` + +## Architecture + +``` +Apps (chat-ui, dropper-ui, vscode) -> Client SDKs (TS/Python/MCP via WebSocket) + -> C++ Engine (DAP protocol variant) -> Pipeline Orchestrator -> Python Nodes (50+) + -> External Services (LLMs, vector DBs, storage) +``` + +- `apps/` — React UIs, VSCode extension, C++ engine entry point +- `packages/server/` — C++ core: engine-core (apLib) and engine-lib (engLib) +- `packages/client-*` — Client SDKs using DAP protocol over WebSocket +- `nodes/src/nodes/` — 50+ pluggable Python pipeline nodes +- `packages/ai/` — AI/ML modules +- `packages/tika/` — Java/Apache Tika document parsing +- `scripts/` — Build system internals + +## Conventions + +- **Conventional Commits**: `feat:`, `fix:`, `docs:`, `style:`, `refactor:`, `test:`, `chore:` +- **Branching**: `develop` (default), `release/**`, `feature/*`, `bugfix/*`, `hotfix/*` +- **MIT license header** required on all new source files +- **TypeScript**: Strict mode, ES2022 target, ESNext modules +- **Python**: Single quotes, ruff for linting/formatting, PEP 257 docstrings, Python 3.10+ +- **C++**: C++17 standard + +## Environment + +Only **Node.js 18+** is required. Everything else is auto-installed by the build system. + +## API Documentation + +Before writing RocketRide client code, read ALL 6 files at `apps/vscode/docs/api/`: + +1. `ROCKETRIDE_QUICKSTART.md` — Start here +2. `ROCKETRIDE_README.md` — Setup checklist +3. `ROCKETRIDE_python_API.md` or `ROCKETRIDE_typescript_API.md` — API reference +4. `ROCKETRIDE_PIPELINE_RULES.md` — Pipeline constraints +5. `ROCKETRIDE_COMPONENT_REFERENCE.md` — Component specs +6. `ROCKETRIDE_COMMON_MISTAKES.md` — Pitfalls to avoid diff --git a/.github/labeler.yml b/.github/labeler.yml new file mode 100644 index 0000000000..172e1c10fe --- /dev/null +++ b/.github/labeler.yml @@ -0,0 +1,52 @@ +module:server: + - changed-files: + - any-glob-to-any-file: + - packages/server/** + - apps/engine/** + - packages/tika/** + - packages/vcpkg/** + +module:nodes: + - changed-files: + - any-glob-to-any-file: + - nodes/** + +module:client-ts: + - changed-files: + - any-glob-to-any-file: + - packages/client-typescript/** + +module:client-python: + - changed-files: + - any-glob-to-any-file: + - packages/client-python/** + - packages/client-mcp/** + +module:ai: + - changed-files: + - any-glob-to-any-file: + - packages/ai/** + +module:vscode: + - changed-files: + - any-glob-to-any-file: + - apps/vscode/** + +module:ui: + - changed-files: + - any-glob-to-any-file: + - apps/chat-ui/** + - apps/dropper-ui/** + - packages/shared-ui/** + +ci/cd: + - changed-files: + - any-glob-to-any-file: + - .github/** + - scripts/** + +docs: + - changed-files: + - any-glob-to-any-file: + - docs/** + - "*.md" diff --git a/.github/workflows/dco.yml b/.github/workflows/dco.yml new file mode 100644 index 0000000000..0e0e193ab0 --- /dev/null +++ b/.github/workflows/dco.yml @@ -0,0 +1,46 @@ +name: DCO + +on: + pull_request_target: + types: [opened, reopened, synchronize] + +permissions: + contents: read + pull-requests: write + +jobs: + check: + name: DCO check + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + ref: ${{ github.event.pull_request.head.sha }} + + - name: Check DCO sign-off + run: | + BASE_SHA="${{ github.event.pull_request.base.sha }}" + HEAD_SHA="${{ github.event.pull_request.head.sha }}" + FAILED=0 + + for SHA in $(git rev-list "$BASE_SHA".."$HEAD_SHA"); do + MSG=$(git log -1 --format='%B' "$SHA") + if ! echo "$MSG" | grep -qiE '^Signed-off-by: .+ <.+>'; then + AUTHOR=$(git log -1 --format='%an <%ae>' "$SHA") + SHORT=$(git log -1 --format='%h' "$SHA") + echo "::error::Commit ${SHORT} by ${AUTHOR} is missing Signed-off-by line" + FAILED=1 + fi + done + + if [ "$FAILED" -eq 1 ]; then + echo "" + echo "All commits must include a Signed-off-by line." + echo "Use: git commit -s -m 'your message'" + echo "To fix existing commits: git rebase --signoff HEAD~N" + exit 1 + fi + + echo "All commits have DCO sign-off." diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml new file mode 100644 index 0000000000..65b755bade --- /dev/null +++ b/.github/workflows/labeler.yml @@ -0,0 +1,20 @@ +name: Label PRs + +on: + pull_request_target: + types: [opened, synchronize, reopened] + +permissions: + contents: read + pull-requests: write + +jobs: + label: + name: Auto-label + runs-on: ubuntu-latest + steps: + - name: Label PR + uses: actions/labeler@v5 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + sync-labels: true diff --git a/.github/workflows/scorecard.yml b/.github/workflows/scorecard.yml new file mode 100644 index 0000000000..faab3fff3e --- /dev/null +++ b/.github/workflows/scorecard.yml @@ -0,0 +1,36 @@ +name: OpenSSF Scorecard + +on: + branch_protection_rule: + schedule: + - cron: '22 5 * * 1' # Weekly Monday 5:22 UTC + push: + branches: [develop, main] + workflow_dispatch: + +permissions: read-all + +jobs: + analysis: + name: Scorecard analysis + runs-on: ubuntu-latest + permissions: + security-events: write + id-token: write + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + persist-credentials: false + + - name: Run Scorecard + uses: ossf/scorecard-action@v2.4.0 + with: + results_file: results.sarif + results_format: sarif + publish_results: true + + - name: Upload SARIF + uses: github/codeql-action/upload-sarif@v3 + with: + sarif_file: results.sarif diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml new file mode 100644 index 0000000000..2651d95404 --- /dev/null +++ b/.github/workflows/stale.yml @@ -0,0 +1,39 @@ +name: Stale issues and PRs + +on: + schedule: + - cron: '30 1 * * *' # Daily 1:30 UTC + workflow_dispatch: + +permissions: + issues: write + pull-requests: write + +jobs: + stale: + name: Close stale issues and PRs + runs-on: ubuntu-latest + steps: + - name: Mark stale + uses: actions/stale@v9 + with: + days-before-stale: 90 + days-before-close: 14 + stale-issue-label: stale + stale-pr-label: stale + stale-issue-message: > + This issue has been automatically marked as stale because it has not had + recent activity. It will be closed in 14 days if no further activity occurs. + If this issue is still relevant, please leave a comment to keep it open. + stale-pr-message: > + This PR has been automatically marked as stale because it has not had + recent activity. It will be closed in 14 days if no further activity occurs. + If this PR is still relevant, please leave a comment or push new commits to keep it open. + close-issue-message: > + This issue was closed because it has been stale for 14 days with no activity. + Feel free to reopen if this is still relevant. + close-pr-message: > + This PR was closed because it has been stale for 14 days with no activity. + Feel free to reopen if this is still relevant. + exempt-issue-labels: pinned,security,help wanted,good first issue + exempt-pr-labels: pinned,security diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000000..7a8301ef20 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,24 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [Unreleased] + +## [1.0.3] - 2026-03-01 + +### Added +- Docker image for one-click deploy (#126) + +### Fixed +- Performance metrics reset on tab switch (#137) +- Engine crash on malformed pipeline input (#134) + +## [1.0.2] and earlier + +See [GitHub Releases](https://github.com/rocketride-org/rocketride-server/releases) for previous release notes. + +[Unreleased]: https://github.com/rocketride-org/rocketride-server/compare/server-v1.0.3...HEAD +[1.0.3]: https://github.com/rocketride-org/rocketride-server/compare/server-v1.0.2...server-v1.0.3 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 8b38832d68..9d8571caa4 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -154,6 +154,28 @@ Feature requests are welcome! Please: 3. Explain the expected behavior 4. Consider implementation implications +## Developer Certificate of Origin (DCO) + +This project uses the [Developer Certificate of Origin](https://developercertificate.org/) (DCO) to certify that contributors have the right to submit their code. All commits must include a `Signed-off-by` line. + +### How to sign off + +Add `-s` (or `--signoff`) to your `git commit` command: + +```bash +git commit -s -m "feat: add new feature" +``` + +This adds a line like `Signed-off-by: Your Name ` to the commit message, using your configured `user.name` and `user.email` from git config. + +To sign off all commits in an existing branch retroactively: + +```bash +git rebase --signoff HEAD~N # where N is the number of commits to sign off +``` + +A CI check will verify that all commits in your pull request include this sign-off. + ## Questions? If you have questions, feel free to: diff --git a/GOVERNANCE.md b/GOVERNANCE.md new file mode 100644 index 0000000000..039fd6eb20 --- /dev/null +++ b/GOVERNANCE.md @@ -0,0 +1,41 @@ +# Governance + +This document describes the governance model for the RocketRide Engine project. + +## Roles + +### Contributor + +Anyone who submits a pull request, opens an issue, or participates in discussions. Contributors are expected to follow the [Contributing Guide](CONTRIBUTING.md) and the Code of Conduct. + +### Reviewer + +Trusted contributors who review pull requests for specific modules. Reviewers are listed in [CODEOWNERS](.github/CODEOWNERS) and are expected to provide timely, constructive feedback. + +To become a reviewer: +- Demonstrate sustained, quality contributions to a specific module +- Be nominated by an existing maintainer + +### Maintainer + +Maintainers have write access and are responsible for the overall direction of the project. They merge PRs, manage releases, and make architectural decisions. + +Current maintainers are members of the [@rocketride-org/maintainers](https://github.com/orgs/rocketride-org/teams/maintainers) team. + +## Decision Making + +- **Day-to-day decisions** (bug fixes, minor features) are made by the reviewer and maintainer who approve and merge the PR. +- **Significant changes** (new modules, breaking changes, architectural shifts) require discussion in a GitHub Issue or Discussion before implementation. At least two maintainers must approve. +- **Disputes** are resolved by maintainer consensus. If consensus cannot be reached, the project lead makes the final call. + +## Adding Maintainers + +New maintainers are nominated by existing maintainers and require unanimous approval from current maintainers. Nominations should be based on: + +- Consistent, high-quality contributions over an extended period +- Deep understanding of the project architecture +- Demonstrated good judgment in code review and technical decisions + +## Changes to Governance + +Changes to this document require approval from all current maintainers. diff --git a/README.md b/README.md index aea1109c02..5cfcd5cd75 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,7 @@ [![Build](https://github.com/rocketride-org/rocketride-server/actions/workflows/build.yaml/badge.svg)](https://github.com/rocketride-org/rocketride-server/actions/workflows/build.yaml) [![CodeQL](https://github.com/rocketride-org/rocketride-server/actions/workflows/codeql.yml/badge.svg)](https://github.com/rocketride-org/rocketride-server/actions/workflows/codeql.yml) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) +[![OpenSSF Scorecard](https://api.scorecard.dev/projects/github.com/rocketride-org/rocketride-server/badge)](https://scorecard.dev/viewer/?uri=github.com/rocketride-org/rocketride-server) [![Node.js 18+](https://img.shields.io/badge/Node.js-18%2B-green.svg)](https://nodejs.org/) A high-performance, modular data processing engine with extensible pipeline nodes, AI/ML capabilities, and cross-platform client libraries. diff --git a/docs/adr/0001-custom-build-system.md b/docs/adr/0001-custom-build-system.md new file mode 100644 index 0000000000..c0bf058934 --- /dev/null +++ b/docs/adr/0001-custom-build-system.md @@ -0,0 +1,52 @@ +# 0001: Custom Declarative Build System + +## Status + +Accepted + +## Context + +RocketRide Engine is a polyglot project spanning C++ (core engine), Python (pipeline nodes), TypeScript (client SDKs, UIs), and Java (Tika integration). The build process involves: + +- Compiling C++ with CMake and vcpkg dependencies +- Building TypeScript packages with tsc +- Packaging Python wheels +- Auto-installing toolchains (pnpm, Python, JDK, Maven, vcpkg) +- Downloading pre-built binaries when available +- Incremental builds with fingerprint-based change detection +- Cross-platform support (Linux, macOS, Windows) + +Standard build tools (npm scripts, Make, Bazel, Nx) were evaluated but each had significant drawbacks for this specific combination of requirements: + +- **npm scripts**: No native C++ or Python support, no incremental builds +- **Make**: Poor Windows support, no auto-installation of toolchains +- **Bazel**: High complexity overhead for the team size, steep learning curve +- **Nx**: Good for JS monorepos but limited C++/Python/Java support + +## Decision + +Build a custom declarative JS-based builder (`./builder`) with: + +- **Module registry**: Each module registers via a `scripts/tasks.js` file exporting `{ description, actions[] }` +- **Auto-discovery**: The registry scans for `scripts/tasks.js` files across the project +- **Incremental builds**: Fingerprint-based state tracking persisted in `build/state.json` +- **Toolchain management**: Auto-installs pnpm, Python, JDK, Maven, and vcpkg as needed +- **Uniform CLI**: `./builder :` for all languages and tools +- **Parallel execution**: Builds independent modules concurrently by default + +## Consequences + +### Positive + +- Single entry point (`./builder`) for all build operations across all languages +- Contributors only need Node.js 18+ installed; everything else is bootstrapped automatically +- Incremental builds significantly reduce iteration time during development +- Cross-platform support without platform-specific build scripts +- Pre-built binary download skips the C++ compilation step for most developers + +### Negative + +- Custom build system has a learning curve for new contributors (mitigated by documentation) +- Maintenance burden falls on the core team rather than an external community +- Build logic is project-specific and not reusable across other projects +- Debugging build issues requires understanding the custom orchestration layer diff --git a/docs/adr/README.md b/docs/adr/README.md new file mode 100644 index 0000000000..428fd74e01 --- /dev/null +++ b/docs/adr/README.md @@ -0,0 +1,41 @@ +# Architecture Decision Records + +This directory contains Architecture Decision Records (ADRs) for the RocketRide Engine project. ADRs document significant technical decisions made during the project's development. + +## Format + +We use [MADR](https://adr.github.io/madr/) (Markdown Any Decision Records) format. + +## Index + +| ADR | Title | Status | Date | +|-----|-------|--------|------| +| [0001](0001-custom-build-system.md) | Custom declarative build system | Accepted | 2026-03-02 | + +## Creating a New ADR + +1. Copy the template below into a new file named `NNNN-short-title.md` +2. Fill in the sections +3. Submit as a PR for review + +### Template + +```markdown +# NNNN: Title + +## Status + +Proposed | Accepted | Deprecated | Superseded by [NNNN](NNNN-title.md) + +## Context + +What is the issue that we're seeing that is motivating this decision or change? + +## Decision + +What is the change that we're proposing and/or doing? + +## Consequences + +What becomes easier or more difficult to do because of this change? +``` diff --git a/renovate.json b/renovate.json new file mode 100644 index 0000000000..f8c0354207 --- /dev/null +++ b/renovate.json @@ -0,0 +1,38 @@ +{ + "$schema": "https://docs.renovatebot.com/renovate-schema.json", + "extends": [ + "config:recommended", + "schedule:weekdays", + ":semanticCommits", + + "group:allNonMajor" + ], + "labels": ["dependencies"], + "rangeStrategy": "bump", + "packageRules": [ + { + "matchUpdateTypes": ["major"], + "groupName": null, + "automerge": false + }, + { + "matchUpdateTypes": ["patch"], + "automerge": true, + "automergeType": "pr", + "platformAutomerge": true + }, + { + "matchManagers": ["github-actions"], + "groupName": "GitHub Actions", + "automerge": true + }, + { + "matchManagers": ["pip_requirements", "pep621"], + "groupName": "Python dependencies" + }, + { + "matchManagers": ["npm"], + "groupName": "npm dependencies" + } + ] +}