|
1 | 1 | # Contributing Guide |
2 | 2 |
|
| 3 | +## Base Branch |
| 4 | + |
| 5 | +- Use `develop` for normal feature, fix, and documentation work. |
| 6 | +- Only target `main` when a maintainer explicitly asks for a release or hotfix PR. |
| 7 | + |
3 | 8 | ## Quick Setup |
4 | 9 |
|
5 | | -**Prerequisites**: Node.js 18.17+, pnpm 8.0+, Git |
| 10 | +### Prerequisites |
| 11 | + |
| 12 | +- Node.js 22+ |
| 13 | +- Corepack or pnpm `10.14.0` |
| 14 | +- Git |
| 15 | +- PostgreSQL, Redis, and MinIO if you want to run the full stack locally |
| 16 | + |
| 17 | +### Clone and Install |
6 | 18 |
|
7 | 19 | ```bash |
8 | | -# 1. Fork & Clone |
9 | | -git clone https://github.com/ifLabX/AgentifUI.git |
10 | | -cd AgentifUI |
11 | | -pnpm install |
| 20 | +git clone https://github.com/iflabx/agentifui.git |
| 21 | +cd agentifui |
| 22 | + |
| 23 | +corepack enable |
| 24 | +corepack prepare pnpm@10.14.0 --activate |
| 25 | +pnpm install --frozen-lockfile |
| 26 | +``` |
| 27 | + |
| 28 | +### Configure Local Runtime |
12 | 29 |
|
13 | | -# 2. Setup |
| 30 | +```bash |
14 | 31 | cp .env.example .env.dev |
15 | | -# Edit .env.dev |
| 32 | +# edit .env.dev for your local PostgreSQL / Redis / MinIO / auth settings |
| 33 | +``` |
| 34 | + |
| 35 | +### Create a Working Branch |
16 | 36 |
|
17 | | -# 3. Create Branch |
18 | | -git checkout -b feat/your-feature # or fix/issue-name |
| 37 | +```bash |
| 38 | +git switch develop |
| 39 | +git pull |
| 40 | +git switch -c feat/your-change |
| 41 | +``` |
| 42 | + |
| 43 | +## Daily Commands |
| 44 | + |
| 45 | +```bash |
| 46 | +pnpm dev:all # Next.js + Fastify together |
| 47 | +pnpm dev:web # Next.js only |
| 48 | +pnpm dev:api # Fastify only |
| 49 | +pnpm type-check |
| 50 | +pnpm lint |
| 51 | +pnpm test |
| 52 | +pnpm build:all |
| 53 | +pnpm gate:quality:verify |
19 | 54 | ``` |
20 | 55 |
|
21 | | -## Development Commands |
| 56 | +If you change translations, also run: |
22 | 57 |
|
23 | 58 | ```bash |
24 | | -pnpm dev # Start dev server |
25 | | -pnpm type-check # TypeScript check |
26 | | -pnpm format:check # Format check |
27 | | -pnpm lint # Lint check |
28 | | -pnpm build # Build test |
29 | | -pnpm i18n:check # Translation check |
| 59 | +pnpm i18n:check |
30 | 60 | ``` |
31 | 61 |
|
32 | | -## Before PR |
| 62 | +## Before Opening a PR |
33 | 63 |
|
34 | | -Required checks: |
| 64 | +Run the relevant checks locally: |
35 | 65 |
|
36 | 66 | ```bash |
37 | | -pnpm type-check && pnpm format:check && pnpm lint && pnpm build |
| 67 | +pnpm format:check |
| 68 | +pnpm gate:quality:verify |
| 69 | +pnpm test |
| 70 | +pnpm build:all |
38 | 71 | ``` |
39 | 72 |
|
40 | | -## Process |
| 73 | +Notes: |
41 | 74 |
|
42 | | -1. **Fork** → **Branch** → **Code** → **Test** → **PR** |
43 | | -2. **Commit format**: `type(scope): description` |
44 | | -3. **CLA**: Sign at https://cla.iflabx.com (required for external contributors) |
| 75 | +- `pnpm build` only covers the Next.js app. Use `pnpm build:all` before a PR so shared and Fastify packages are checked too. |
| 76 | +- If you only run targeted tests, explain that in the PR description. |
| 77 | +- If you change runtime behavior, public routes, configuration, or deployment flow, update `README.md` and the relevant files under `docs/` in the same PR. |
45 | 78 |
|
46 | | -## Issue Guidelines |
| 79 | +## Pull Request Expectations |
47 | 80 |
|
48 | | -**Bug reports**: Include environment, steps, expected vs actual |
49 | | -**Feature requests**: Include problem, solution, use cases |
| 81 | +1. Keep each PR focused on one change set. |
| 82 | +2. Link the issue or explain why the PR is needed. |
| 83 | +3. Call out database, environment-variable, deployment, or CI impact. |
| 84 | +4. Include screenshots for visible UI changes. |
| 85 | +5. Prefer follow-up PRs over mixing refactors and behavior changes into one large submission. |
| 86 | + |
| 87 | +## Commit Style |
| 88 | + |
| 89 | +Use Conventional Commits where practical: |
| 90 | + |
| 91 | +- `feat:` |
| 92 | +- `fix:` |
| 93 | +- `docs:` |
| 94 | +- `refactor:` |
| 95 | +- `test:` |
| 96 | +- `chore:` |
50 | 97 |
|
51 | 98 | ## Standards |
52 | 99 |
|
53 | | -- **Code**: TypeScript/React with Prettier |
54 | | -- **Commit types**: feat, fix, docs, style, refactor, perf, test |
55 | | -- **Dependencies**: Apache 2.0/MIT/BSD only, discuss in issues first |
| 100 | +- Use `pnpm`, not `npm` or `yarn`. |
| 101 | +- Keep TypeScript and ESLint warnings under control; do not bypass quality gates without a clear reason. |
| 102 | +- Update `.env*.example` when adding or renaming public runtime configuration. |
| 103 | +- Do not leave dead route paths or outdated docs behind after a cutover. |
56 | 104 |
|
57 | 105 | ## Support |
58 | 106 |
|
59 | | -- **Issues**: Bug reports & features |
60 | | -- **Discussions**: Questions & community |
61 | | -- **Docs**: Check [./docs/](./docs/) first |
62 | | - |
63 | | -**CLA**: By submitting code, you agree it may become part of future releases under the CLA terms. |
| 107 | +- Start with `README.md` and `docs/`. |
| 108 | +- Use GitHub Issues for bugs and feature requests. |
| 109 | +- External contributors must complete the CLA flow if the repository requests it. |
0 commit comments