Skip to content
Clement edited this page Aug 13, 2025 · 3 revisions

Tree Forge Wiki

Welcome to the Tree Forge Wiki!
This documentation will help contributors, maintainers, and users understand how the project works, how to set it up locally, and how to contribute effectively.


📜 Table of Contents

  1. Overview
  2. Architecture
  3. Getting Started
  4. Development Workflow
  5. Branching Strategy
  6. Testing
  7. Release Process
  8. CI/CD Pipelines
  9. Publishing to npm
  10. Contributing
  11. License

Overview

Tree Forge is a modular, high-performance system for generating and managing structured data in hierarchical formats. It provides a robust API, developer tooling, and automated release pipelines.

Core features:

  • Modular node-based architecture
  • Automated release workflows
  • CI/CD integration with GitHub Actions
  • npm package publishing
  • Semantic versioning and prerelease tagging

Architecture

tree-forge/
├── src/ # Core source code
├── tests/ # Unit and integration tests
├── package.json # Project metadata and scripts
├── .github/workflows/ # CI/CD workflows
└── docs/ # Additional documentation

Key Technologies:

  • Node.js (v20+)
  • TypeScript
  • npm for package management
  • GitHub Actions for CI/CD
  • Jest or Vitest for testing

Getting Started

1️⃣ Prerequisites

  • Node.js >= 20
  • npm >= 9
  • Git

2️⃣ Clone the repository

git clone https://github.com/your-org/tree-forge.git
cd tree-forge

3️⃣ Install dependencies

npm ci

4️⃣ Build the project

npm run build

5️⃣ Run tests

npm test

Development Workflow

  1. Create a new branch from staging for your feature or bug fix:
git checkout -b feature/my-feature staging
  1. Make your changes and commit:
git commit -m "feat: add my new feature"
  1. Push your branch and open a Pull Request into staging.

Branching Strategy

We use GitHub Flow with dedicated staging and main branches:

  • main → Production-ready code only.
  • staging → Pre-release integration branch.
  • feature/* → Individual features or fixes.
  • hotfix/* → Urgent production fixes.

Testing

We run automated tests before merging to staging or main.

npm run test

Test types:

  • Unit tests
  • Integration tests
  • E2E tests (where applicable)

Release Process

Prerelease (RC) to npm:

  • Triggered by push to staging
  • Bumps version with rc preid
  • Publishes to npm with next tag
  • Creates GitHub prerelease

Production Release

  • Triggered by push to main
  • Creates and pushes version tag
  • Publishes stable package to npm
  • Generates GitHub release notes

CI/CD Pipelines

We use GitHub Actions workflows:

  • build.yml → Lint, build, and test.
  • prerelease.yml → RC builds from staging.
  • release.yml → Stable builds from main.

Publishing to npm

RC Publish:

npm publish --tag next

Stable Publish:

npm publish --access public

Requires:

export NODE_AUTH_TOKEN=<npm_token>

Contributing

  1. Fork the repository
  2. Create a feature branch from staging
  3. Make your changes
  4. Submit a PUll Request with a clear description We follow Conventional Commits for commit messages.

License

This project is licensed under the MIT License.
See the LICENSE file for details.