|
| 1 | +<div align="center"> |
| 2 | + <img src="public/logo.png" alt="AinzStack Logo" width="64" /> |
| 3 | + <br /> |
| 4 | + <h1>Contributing to AinzStack</h1> |
| 5 | +</div> |
| 6 | + |
| 7 | +<p align="center"> |
| 8 | + <strong>Engineering rigor and clear communication form the basis of our collaboration.</strong><br/> |
| 9 | + <em>Thank you for dedicating your time to improving AinzStack.</em> |
| 10 | +</p> |
| 11 | + |
| 12 | +--- |
| 13 | + |
| 14 | +## The Development Process |
| 15 | + |
| 16 | +To maintain architectural integrity and codebase quality, all contributions must adhere to the following workflow: |
| 17 | + |
| 18 | +### 1. Environment Setup |
| 19 | + |
| 20 | +Fork the repository and clone your fork locally. Ensure you meet the system prerequisites outlined in the `README.md` (Node.js v22+, pnpm v10+). |
| 21 | + |
| 22 | +```bash |
| 23 | +git clone https://github.com/[YOUR_USERNAME]/AinzStack.git |
| 24 | +cd AinzStack |
| 25 | +pnpm install |
| 26 | +``` |
| 27 | + |
| 28 | +### 2. Branching Strategy |
| 29 | + |
| 30 | +Never commit directly to the `main` branch. Create a feature branch scoped to the specific issue or feature you are addressing. |
| 31 | + |
| 32 | +```bash |
| 33 | +git checkout -b feature/brief-description |
| 34 | +# or |
| 35 | +git checkout -b fix/issue-description |
| 36 | +``` |
| 37 | + |
| 38 | +### 3. Making Changes |
| 39 | + |
| 40 | +When modifying the codebase, adhere to these principles: |
| 41 | + |
| 42 | +- **Consistency**: Match the existing architectural patterns (Next.js App Router conventions, Tailwind structure). |
| 43 | +- **TypeScript**: Rely on strict typing. Avoid `any` types. |
| 44 | +- **Modularity**: Keep UI components isolated within `src/components/ui/` or `src/components/shared/` where applicable. |
| 45 | + |
| 46 | +### 4. Validation |
| 47 | + |
| 48 | +Before staging your changes, ensure they pass the overarching quality control suite. Our Continuous Integration checks require zero errors. |
| 49 | + |
| 50 | +Run the validation suite locally: |
| 51 | + |
| 52 | +```bash |
| 53 | +pnpm ci |
| 54 | +``` |
| 55 | + |
| 56 | +Alternatively, run specific checks if you are isolating a failure: |
| 57 | + |
| 58 | +| Command | Target | |
| 59 | +| :--------------- | :------------------------------ | |
| 60 | +| `pnpm lint` | Static code analysis | |
| 61 | +| `pnpm typecheck` | TypeScript compiler validation | |
| 62 | +| `pnpm test` | Unit testing (Vitest) | |
| 63 | +| `pnpm test:e2e` | End-to-end testing (Playwright) | |
| 64 | + |
| 65 | +### 5. Committing Guidelines |
| 66 | + |
| 67 | +We adhere strictly to [Conventional Commits](https://www.conventionalcommits.org/). This standard dictates the semantic versioning and changelog generation of the project. |
| 68 | + |
| 69 | +**Format:** |
| 70 | + |
| 71 | +```text |
| 72 | +<type>(<optional scope>): <description> |
| 73 | +``` |
| 74 | + |
| 75 | +**Permitted Types:** |
| 76 | + |
| 77 | +- `feat`: A new feature |
| 78 | +- `fix`: A bug fix |
| 79 | +- `docs`: Documentation only changes |
| 80 | +- `style`: Changes that do not affect the meaning of the code (white-space, formatting, etc) |
| 81 | +- `refactor`: A code change that neither fixes a bug nor adds a feature |
| 82 | +- `test`: Adding missing tests or correcting existing tests |
| 83 | +- `chore`: Changes to the build process or auxiliary tools and libraries |
| 84 | + |
| 85 | +**Example:** |
| 86 | + |
| 87 | +```bash |
| 88 | +git commit -m "feat(auth): integrate multi-factor authentication layer" |
| 89 | +``` |
| 90 | + |
| 91 | +### 6. Pull Requests |
| 92 | + |
| 93 | +Push to your fork and submit a Pull Request to the `main` branch of the upstream repository. |
| 94 | + |
| 95 | +- Keep the PR highly scoped. Giant monolithic PRs are difficult to review and prone to rejection. |
| 96 | +- Fill out the PR template accurately. |
| 97 | +- Ensure the CI pipeline is passing (green checkmark). |
| 98 | + |
| 99 | +## Project Structure Reference |
| 100 | + |
| 101 | +When integrating new logic, please respect the established boundaries: |
| 102 | + |
| 103 | +- `src/app/api/`: Edge and serverless routes. Do not place business logic directly in generic UI files. |
| 104 | +- `src/lib/`: External service intialization (Supabase clients, Stripe configuration). |
| 105 | +- `src/actions/`: Next.js Server Actions intended for form submissions and data mutation. |
| 106 | + |
| 107 | +--- |
| 108 | + |
| 109 | +<div align="center"> |
| 110 | + <p> |
| 111 | + <a href="https://github.com/JCFcodex/AinzStack">Repository</a> • |
| 112 | + <a href="https://github.com/JCFcodex/AinzStack/issues">Issue Tracker</a> |
| 113 | + </p> |
| 114 | + <p> |
| 115 | + <em>Built by <a href="https://github.com/JCFcodex">JCFcodex</a> and Contributors</em> |
| 116 | + </p> |
| 117 | +</div> |
0 commit comments