Thank you for investing your time in contributing to this ResoBin! To ensure a smooth, transparent, and scalable development workflow, we strictly adhere to industry-standard Git conventions.
Please read this guide fully before starting your work.
Never work directly on the main or develop branches. All work must be isolated in a dedicated branch branched off from the target deployment branch.
<type>/<short-description-in-kebab-case>
feat/— A new feature or enhancement (e.g.,feat/user-jwt-auth)fix/— A bug fix (e.g.,fix/header-mobile-overflow)docs/— Documentation changes only (e.g.,docs/api-onboarding-guide)refactor/— Code restructuring without changing external behavior (e.g.,refactor/user-service-class)perf/— Changes that strictly improve performance (e.g.,perf/image-lazy-loading)test/— Adding or correcting automated tests (e.g.,test/checkout-flow-unit)chore/— Tooling, CI/CD, dependency upgrades, or configuration (e.g.,chore/upgrade-nextjs-14)hotfix/— Urgent patch intended directly for production (e.g.,hotfix/stripe-webhook-crash)
- Use lowercase exclusively.
- Separate words with hyphens (
-), never underscores (_) or camelCase. - Keep descriptions under 5 words.
- If your branch corresponds to an issue/ticket, append the ticket ID:
feat/ISSUE-402-oauth-login.
We follow the Conventional Commits Specification. This allows our CI/CD pipelines to automatically generate semver version bumps and changelogs.
<type>(<optional-scope>): <short summary>
[optional body explaining the 'why']
- Use the imperative present tense: Write "add auth service", never "added auth service" or "adds auth service".
- Do not capitalize the first letter of the summary.
- No period (
.) at the end of the summary. - Keep the top summary line under 50 characters.
- Good:
feat(cart): implement local storage persistence - Good:
fix(auth): resolve infinite redirect loop on expired token - Good:
chore(deps): bump tailwindcss from 3.4.0 to 3.4.1 - Bad:
(Wrong tense, capitalized, ends in period, missing type)Fixed the login bug. - Bad:
(Provides zero historical context)WIP
Your PR Title must follow the exact same format as a single Conventional Commit. If your PR introduces one main feature, mirror your primary commit message:
feat(dashboard): add revenue metric breakdown chart
When opening a PR, your description must be thorough. Copy the template below into your PR description box:
## Description
<!-- Provide a clear, concise overview of what this PR accomplishes and WHY it was necessary. -->
## Related Issue(s)
<!-- Link any tracked issues. Example: "Closes #142" or "Relates to #88" -->
## Type of Change
<!-- Mark the appropriate box with an 'x' -->
- [ ] **New Feature** (non-breaking change introducing new functionality)
- [ ] **Bug Fix** (non-breaking fix for a known issue)
- [ ] **Breaking Change** (fix or feature that causes existing functionality to break)
- [ ] **Refactor** (code change that neither fixes a bug nor adds a feature)
- [ ] **Documentation** (updates to README, inline docs, or contributor guides)
- [ ] **Chore / Tooling** (CI pipelines, package bumps, build scripts)
## Proposed Changes
<!-- Bullet point the technical implementations made under the hood -->
* Introduced `AuthGuard` middleware to protect `/app` routes.
* Stripped legacy session cookies in favor of Bearer tokens.
* Updated the Axios interceptor to catch `401 Unauthorized` states.
## Verification & QA Instructions
<!-- Step-by-step instructions for the Reviewer to manually test your code -->
1. Pull branch locally and run `npm run dev`.
2. Navigate to `http://localhost:3000/protected-route` while logged out.
3. **Expectation:** User should be instantly bounced to `/login?redirect=/protected-route`.
## Screenshots / Screen Recordings (If UI touched)
| Before | After |
| :---: | :---: |
| *Drop image here* | *Drop image here* |
***
### Codebase Impact Summary
* **Total Files Touched:** `[e.g., 6]`
* **Files Created:** `[Count]`
* **Files Modified:** `[Count]`
* **Files Deleted:** `[Count]`
* **Primary Sub-systems Affected:** `[e.g., Auth, Database Models, Frontend Navbar]`
- Size Matters: Keep PRs small. PRs touching
>15 filesor sitting at>500 net lines of codewill generally be asked to be reviewed and asked to be split up, as large diffs statistically result in rubber-stamp reviews that miss bugs. - Draft State: If your work is not ready for a pair of eyes, open the PR as a Draft. Do not tag reviewers until you mark it “Ready for Review”.
- Addressing Feedback: When a reviewer requests a change, make the fix in a new commit (do not rebase/force-push away the old commit while a review is active, as it breaks the reviewer's point of reference). Once resolved, re-request review.