Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# TreeAI funding link shown in the repository Sponsor button.
custom: "https://ifdian.net/a/anionex"
76 changes: 76 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
name: Bug report
description: Report a reproducible problem in TreeAI.
title: "[Bug] "
labels: [bug]
body:
- type: markdown
attributes:
value: |
Thanks for helping improve TreeAI. Remove API keys, Authorization headers, private conversations, and sensitive screenshots before submitting.
- type: dropdown
id: area
attributes:
label: Affected area
options:
- Conversation canvas or layout
- Chat node editing or streaming
- Model configuration or API compatibility
- Session persistence or browser storage
- TXT / Markdown import
- FreeMind export
- Documentation or setup
- Other
validations:
required: true
- type: input
id: environment
attributes:
label: Environment
description: Include operating system, browser version, and Node.js version if running locally.
placeholder: macOS 15, Chrome 140, Node.js 20.19
validations:
required: true
- type: input
id: provider
attributes:
label: Provider and model
description: Name the provider and model only. Never include the API key.
placeholder: OpenAI-compatible provider, model-name
- type: textarea
id: steps
attributes:
label: Reproduction steps
placeholder: |
1. Configure ...
2. Create ...
3. Observe ...
validations:
required: true
- type: textarea
id: expected
attributes:
label: Expected behavior
validations:
required: true
- type: textarea
id: actual
attributes:
label: Actual behavior
validations:
required: true
- type: textarea
id: logs
attributes:
label: Sanitized logs or screenshots
description: Remove credentials, request headers, private conversation content, and unrelated personal data.
- type: checkboxes
id: checks
attributes:
label: Pre-submission checks
options:
- label: I searched existing issues and pull requests for the same problem.
required: true
- label: I removed credentials and private data from everything included above.
required: true
- label: I reviewed the compatibility and support documentation.
required: true
8 changes: 8 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
blank_issues_enabled: false
contact_links:
- name: Support guide
url: https://github.com/Anionex/treeAI/blob/master/SUPPORT.md
about: Check setup, CORS, endpoint, streaming, storage, and file-import guidance first.
- name: Security policy
url: https://github.com/Anionex/treeAI/security/policy
about: Report suspected vulnerabilities privately instead of opening a public issue.
37 changes: 37 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Feature request
description: Propose a focused improvement that fits TreeAI's scope.
title: "[Feature] "
labels: [enhancement]
body:
- type: textarea
id: problem
attributes:
label: Problem
description: What workflow is difficult or impossible today?
validations:
required: true
- type: textarea
id: outcome
attributes:
label: Desired outcome
description: Describe the user-visible result rather than only an implementation.
validations:
required: true
- type: textarea
id: proposal
attributes:
label: Proposed approach
description: Include interface, persistence, protocol, or compatibility implications when known.
- type: textarea
id: alternatives
attributes:
label: Alternatives considered
- type: checkboxes
id: scope
attributes:
label: Scope checks
options:
- label: I searched existing issues and pull requests for related proposals.
required: true
- label: I described any effect on credentials, local storage, or provider compatibility.
required: true
37 changes: 37 additions & 0 deletions .github/ISSUE_TEMPLATE/question.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Setup or usage question
description: Ask a focused question after checking the support guide.
title: "[Question] "
labels: [question]
body:
- type: markdown
attributes:
value: |
Do not include API keys, Authorization headers, private conversation text, or sensitive screenshots.
- type: textarea
id: goal
attributes:
label: What are you trying to do?
validations:
required: true
- type: textarea
id: attempted
attributes:
label: What have you tried?
description: Include sanitized commands, browser/provider details, and the relevant support section.
validations:
required: true
- type: textarea
id: result
attributes:
label: What happened?
validations:
required: true
- type: checkboxes
id: checks
attributes:
label: Checks
options:
- label: I read SUPPORT.md and the README compatibility section.
required: true
- label: I removed credentials and private data.
required: true
19 changes: 19 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
## Summary

- What user problem does this change solve?
- What approach did you take?

## Verification

- [ ] `npm ci`
- [ ] `npm run lint`
- [ ] `npm run build`
- [ ] I exercised the affected UI or API flow.
- [ ] I included a sanitized screenshot for visual changes.

## Safety and Compatibility

- [ ] No API keys, private conversations, Authorization headers, or sensitive browser data are included.
- [ ] Existing IndexedDB data remains compatible, or a migration is included and documented.
- [ ] README, limitations, and changelog are updated for user-visible behavior.
- [ ] The pull request is focused and contains no unrelated refactor.
38 changes: 38 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: CI

on:
push:
branches: [master]
pull_request:
branches: [master]

permissions:
contents: read

concurrency:
group: ci-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
verify:
runs-on: ubuntu-latest
timeout-minutes: 10

steps:
- name: Check out repository
uses: actions/checkout@v4

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: npm

- name: Install dependencies
run: npm ci

- name: Lint
run: npm run lint

- name: Build
run: npm run build
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ lerna-debug.log*
node_modules
dist
dist-ssr
.playwright-cli
*.local

# Editor directories and files
Expand Down
30 changes: 30 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Changelog

All user-visible changes to TreeAI are documented here.

The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and the project uses semantic versioning for tagged releases.

## [Unreleased]

### Added

- Bilingual English and Chinese project documentation.
- Repository-owned hero, product screenshot, and social-preview assets.
- MIT license, funding guide, security policy, support guide, contribution guide, issue forms, pull-request template, and CI workflow.
- Browser metadata and a TreeAI favicon.

### Changed

- Unified the visible product name as TreeAI.
- Documented the client-only data boundary, provider compatibility, credential storage, and current limitations.
- Limited file import to the TXT and Markdown formats that are actually implemented.
- Removed unused PDF and DOCX dependencies.
- Cleaned up TypeScript and React code so ESLint passes.

## [0.1.0] - 2025-05-13

### Added

- Initial public preview of the React Flow conversation-tree workspace.
- Local session and model persistence with Dexie and IndexedDB.
- OpenAI-compatible streaming chat requests and FreeMind export.
55 changes: 55 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# TreeAI Code of Conduct

## Our Pledge

We as members, contributors, and maintainers pledge to make participation in the TreeAI community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socioeconomic status, nationality, personal appearance, race, caste, color, religion, or sexual identity and orientation.

We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.

## Our Standards

Examples of behavior that contributes to a positive environment include:

- demonstrating empathy and kindness toward other people;
- respecting differing opinions, viewpoints, and experiences;
- giving and gracefully accepting constructive feedback;
- accepting responsibility, apologizing to those affected by mistakes, and learning from the experience;
- focusing on what is best for the community and the project.

Examples of unacceptable behavior include:

- sexualized language or imagery and sexual attention or advances of any kind;
- trolling, insulting or derogatory comments, and personal or political attacks;
- public or private harassment;
- publishing another person's private information without explicit permission;
- sharing credentials, private conversations, or sensitive screenshots that do not belong to you;
- other conduct that could reasonably be considered inappropriate in a professional setting.

## Enforcement Responsibilities

Community maintainers are responsible for clarifying and enforcing standards of acceptable behavior. They may remove, edit, or reject comments, commits, code, issues, and other contributions that do not align with this Code of Conduct, and will communicate moderation reasons when appropriate.

## Scope

This Code of Conduct applies within all project spaces and when an individual officially represents the project in public spaces.

## Reporting

Report abusive, harassing, or otherwise unacceptable behavior privately to `davidyang042@gmail.com` with the subject `TreeAI conduct report`. Do not report conduct incidents through a public issue.

Reports will be reviewed and investigated as promptly and fairly as practical. Maintainers will respect the privacy and security of reporters and affected participants whenever possible.

## Enforcement Guidelines

Maintainers may use the following consequences based on the impact and pattern of behavior:

1. **Correction** - A private explanation of the violation and how to correct it.
2. **Warning** - A warning with consequences for continued behavior.
3. **Temporary restriction** - Time-limited restrictions on project participation or communication.
4. **Permanent ban** - Permanent removal from project spaces for sustained or severe violations.

The response may skip steps when necessary to protect the community.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant](https://www.contributor-covenant.org/), version 2.1, permanently available at [https://www.contributor-covenant.org/version/2/1/code_of_conduct.html](https://www.contributor-covenant.org/version/2/1/code_of_conduct.html). The enforcement guidelines draw on Mozilla's code-of-conduct enforcement ladder.
57 changes: 57 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# Contributing to TreeAI

Thanks for helping improve TreeAI. Focused bug fixes, compatibility work, tests, accessibility improvements, documentation, and carefully scoped features are welcome.

By participating, you agree to follow the [Code of Conduct](CODE_OF_CONDUCT.md).

## Before You Start

1. Read [README.md](README.md), especially compatibility, data boundaries, and limitations.
2. Search existing issues and pull requests before starting duplicate work.
3. Open an issue before broad architecture changes, persistence migrations, protocol changes, or new collaboration features.
4. Never include API keys, private conversations, Authorization headers, or unsanitized browser storage in an issue or pull request.

## Local Setup

Use Node.js 18 or newer:

```bash
git clone https://github.com/Anionex/treeAI.git
cd treeAI
npm ci
npm run dev
```

## Project Boundaries

- TreeAI is currently a client-only application. Discuss any backend, account, telemetry, or sync proposal before implementing it.
- Keep the browser-to-provider request boundary explicit. Do not proxy, log, or persist credentials in a new location without a security review.
- The IndexedDB database is still named `TreeChatDatabase` for compatibility with existing local data. Do not rename it without a versioned migration.
- Keep OpenAI-compatible streaming behavior backward compatible unless a change is explicitly scoped as a protocol migration.
- Publish only source-confirmed features. Partially implemented work belongs in project status or limitations.
- Keep pull requests narrow; do not combine unrelated refactors with a fix.

## Verification

Run all checks before opening a pull request:

```bash
npm ci
npm run lint
npm run build
```

For user-interface changes, also run the app, exercise the affected flow, and include a sanitized screenshot when visual behavior changes.

## Pull Requests

- Explain the user problem and the chosen solution.
- Link the relevant issue when one exists.
- Describe behavior changes and compatibility risks.
- Add or update tests when a practical test surface exists.
- Update README, changelog, screenshots, or limitations when user-facing behavior changes.
- Keep generated lockfile changes limited to dependency changes made by the pull request.

## Reporting Security Issues

Do not open a public issue for a suspected vulnerability. Follow [SECURITY.md](SECURITY.md).
Loading
Loading