# Contributing (/docs/contributing)



<Callout title="Important" type="warn">
  Before starting work on any new features or major changes, &#x2A;*please open an issue first to discuss
  your proposal and get approval.** We don't want you to **waste time** on work that might not align
  with the project's direction or get merged.
</Callout>

## Overview [#overview]

This project is a monorepo with two main apps:

* CLI: `apps/cli`
* Documentation site: `apps/web`

## Setup [#setup]

### Prerequisites [#prerequisites]

* Bun
* Git

### Install [#install]

```bash
git clone https://github.com/AbdullahMukadam/tristack.git
cd tristack
bun install
```

## Develop the CLI [#develop-the-cli]

```bash
cd apps/cli
# optional global link for testing anywhere
bun link
# run in watch mode (runs tsdown build in watch mode)
bun dev
```

Now go to anywhere else in your system (maybe like a test folder) and run:

```bash
create-tristack
```

This will run the locally installed CLI.

## Develop the Docs [#develop-the-docs]

```bash
# from repo root
bun install
bun dev:web
```

The web app uses `apps/web/.env` for build-time environment variables. Copy `.env.example` to `.env` and set any values (the site builds without them).

## Contribution Flow [#contribution-flow]

1. Open an issue/discussion before starting major work
2. Fork the repository
3. Create a feature branch
4. Make changes following existing code style
5. Update docs as needed
6. Test and format

```bash
# CLI
cd apps/cli && bun dev
cd apps/cli && bun run test

# Web
bun dev

# Lint + format checks
bun check
```

7. Commit and push

```bash
git add .
git commit -m "feat(web): ..." # or fix(cli): ...
git push origin <your-branch>
```

8. Open a Pull Request and link any related issues

## Commit Conventions [#commit-conventions]

Use conventional commit messages with the appropriate scope:

* `feat(cli): add new CLI feature`
* `fix(cli): fix CLI bug`
* `feat(web): add new web feature`
* `fix(web): fix web bug`
* `chore(web): update dependencies`
* `docs: update documentation`

## Help [#help]

* Issues and Discussions on GitHub

See full contributor guide in the repository: `.github/CONTRIBUTING.md`.
