diff --git a/.github/ISSUE_TEMPLATE/api.md b/.github/ISSUE_TEMPLATE/api.md deleted file mode 100644 index 7cb4395..0000000 --- a/.github/ISSUE_TEMPLATE/api.md +++ /dev/null @@ -1,25 +0,0 @@ ---- -name: API -about: Template for creating an API based task for an engineer -title: "[API]" -labels: api -assignees: '' - ---- - -### Done State - -- [ ] Task 1 -- [ ] Task 2 -- [ ] Task 3 - -### Technical Requirements - -- GraphQL 1st choice for API structure -- Only use native fetch for network requests -- Urql used as GraphQL client for both client and server - -### Resources - -- [Urql](https://commerce.nearform.com/open-source/urql/docs/) -- [GraphQL Queries ^ Mutations](https://graphql.org/learn/queries/) diff --git a/.github/ISSUE_TEMPLATE/bug.md b/.github/ISSUE_TEMPLATE/bug.md deleted file mode 100644 index 70b8934..0000000 --- a/.github/ISSUE_TEMPLATE/bug.md +++ /dev/null @@ -1,38 +0,0 @@ ---- -name: Bug -about: Create a report to help us improve -title: "[BUG]" -labels: bug -assignees: '' - ---- - -**Describe the bug** -A clear and concise description of what the bug is. - -**To Reproduce** -Steps to reproduce the behavior: -1. Go to '...' -2. Click on '....' -3. Scroll down to '....' -4. See error - -**Expected behavior** -A clear and concise description of what you expected to happen. - -**Screenshots** -If applicable, add screenshots to help explain your problem. - -**Desktop (please complete the following information):** - - OS: [e.g. iOS] - - Browser [e.g. chrome, safari] - - Version [e.g. 22] - -**Smartphone (please complete the following information):** - - Device: [e.g. iPhone6] - - OS: [e.g. iOS8.1] - - Browser [e.g. stock browser, safari] - - Version [e.g. 22] - -**Additional context** -Add any other context about the problem here. diff --git a/.github/ISSUE_TEMPLATE/bug.yml b/.github/ISSUE_TEMPLATE/bug.yml new file mode 100644 index 0000000..11bcccf --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug.yml @@ -0,0 +1,107 @@ +name: ๐Ÿ› Bug Report +description: Report a bug to help us improve +title: "[BUG]: " +labels: ["bug", "triage"] +assignees: [] +body: + - type: markdown + attributes: + value: | + Thanks for taking the time to report this bug! Please fill out the form below. + + - type: dropdown + id: package + attributes: + label: Affected Package + description: Which package(s) are affected? + multiple: true + options: + - client (PWA) + - admin (Dashboard) + - shared (Hooks/Utils) + - contracts (Solidity) + - indexer (GraphQL) + - agent (Bot) + - docs (Documentation) + validations: + required: true + + - type: textarea + id: description + attributes: + label: Bug Description + description: A clear description of what the bug is + placeholder: When I click the submit button, the form doesn't submit... + validations: + required: true + + - type: textarea + id: reproduction + attributes: + label: Steps to Reproduce + description: Detailed steps to reproduce the behavior + placeholder: | + 1. Go to '...' + 2. Click on '...' + 3. Scroll down to '...' + 4. See error + validations: + required: true + + - type: textarea + id: expected + attributes: + label: Expected Behavior + description: What should happen instead? + validations: + required: true + + - type: textarea + id: screenshots + attributes: + label: Screenshots/Recordings + description: Add screenshots or screen recordings if applicable + + - type: dropdown + id: environment + attributes: + label: Environment + options: + - Production + - Staging + - Local Development + validations: + required: true + + - type: input + id: browser + attributes: + label: Browser/OS + placeholder: "Chrome 120, macOS 14.2" + + - type: dropdown + id: offline + attributes: + label: Offline Related? + description: Does this occur when offline or during sync? + options: + - "No" + - "Yes - offline mode" + - "Yes - during sync" + - "Not sure" + + - type: textarea + id: ai-context + attributes: + label: Additional Context / AI Notes + description: | + Add any relevant code snippets, file paths, error messages, or investigation findings. + AI assistants can populate this section with investigation results. + placeholder: | + ## Files Involved + - `packages/client/src/views/...` + + ## Error Messages + ``` + Error stack trace here + ``` diff --git a/.github/ISSUE_TEMPLATE/component.md b/.github/ISSUE_TEMPLATE/component.md deleted file mode 100644 index d16013e..0000000 --- a/.github/ISSUE_TEMPLATE/component.md +++ /dev/null @@ -1,27 +0,0 @@ ---- -name: Component -about: Template for creating a component tasks for an engineer -title: "[Component]" -labels: component -assignees: '' - ---- - -### Done State - -- [ ] Task 1 -- [ ] Task 2 -- [ ] Task 3 - -### Technical Requirements - -- React used for creating functional components -- TailwindCSS used for styling components alongside traditional CSS -- React Hook Form used for form field validation -- No complex state stored inside component - -### Resources - -- [React Functional Components](https://react.dev/learn/your-first-component) -- [TailwindCSS](https://tailwindcss.com/) -- [React Hook Form](https://react-hook-form.com/get-started) diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 0000000..8aaf14f --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1,11 @@ +blank_issues_enabled: false +contact_links: + - name: ๐Ÿ’ฌ Ask a Question + url: https://t.me/greenpilldevguild + about: Get help from the Greenpill Dev Guild community + - name: ๐Ÿ“š Documentation + url: https://docs.greengoods.app + about: Check our developer documentation first + - name: ๐ŸŒฑ Green Goods App + url: https://app.greengoods.app + about: Visit the live application diff --git a/.github/ISSUE_TEMPLATE/contract.md b/.github/ISSUE_TEMPLATE/contract.md deleted file mode 100644 index 95c1d8f..0000000 --- a/.github/ISSUE_TEMPLATE/contract.md +++ /dev/null @@ -1,27 +0,0 @@ ---- -name: Contract -about: Writing a smart contract follow this format -title: "[CONTRACT]" -labels: '' -assignees: '' - ---- - -### Done State - -- [ ] Task 1 -- [ ] Task 2 -- [ ] Task 3 - -### Technical Requirements - -- Foundry used to create the contracts -- Avoid using submodules and do contract imports via package.json -- Build off base OpenZeppelin contracts as needed for standards (ERC-20, ERC-721) - -### Resources - -- [Foundry](https://getfoundry.sh/) -- [OpenZeppelin](https://docs.openzeppelin.com/contracts/5.x/) -- [EAS](https://docs.attest.org/docs/welcome) - diff --git a/.github/ISSUE_TEMPLATE/contract.yml b/.github/ISSUE_TEMPLATE/contract.yml new file mode 100644 index 0000000..8ddd4c8 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/contract.yml @@ -0,0 +1,93 @@ +name: ๐Ÿ“œ Smart Contract +description: Create or modify a smart contract +title: "[CONTRACT]: " +labels: ["contract"] +body: + - type: dropdown + id: type + attributes: + label: Contract Type + options: + - New Contract + - Upgrade (UUPS) + - Bug Fix + - Gas Optimization + - Security Fix + - Test Addition + validations: + required: true + + - type: textarea + id: summary + attributes: + label: Summary + description: What contract work is needed? + validations: + required: true + + - type: textarea + id: done-state + attributes: + label: Done State + description: Acceptance criteria for completion + placeholder: | + - [ ] Contract implemented + - [ ] Unit tests (100% coverage) + - [ ] Fuzz tests for parameters + - [ ] Gas snapshot updated + - [ ] NatSpec documentation + validations: + required: true + + - type: textarea + id: security + attributes: + label: Security Considerations + description: Security requirements and review needs + placeholder: | + - [ ] CEI pattern followed + - [ ] Reentrancy guards where needed + - [ ] Access control verified + - [ ] Events emitted for state changes + - [ ] No tx.origin for authorization + - [ ] Input validation + + - type: dropdown + id: upgrade + attributes: + label: Upgrade Impact + description: Does this affect existing deployments? + options: + - N/A - New contract + - Safe upgrade (storage compatible) + - Breaking change (migration needed) + - Gas-only change + validations: + required: true + + - type: textarea + id: implementation + attributes: + label: Implementation Notes + description: Contract locations, inheritance, patterns + placeholder: | + ## Contract Location + `packages/contracts/src/...` + + ## Inheritance + - Inherits from OpenZeppelin `...` + - Uses EAS schema `...` + + ## Testing + ```bash + cd packages/contracts && forge test --match-contract TestName + ``` + + - type: textarea + id: resources + attributes: + label: Resources + placeholder: | + - [Foundry](https://getfoundry.sh/) + - [OpenZeppelin](https://docs.openzeppelin.com/contracts/5.x/) + - [EAS](https://docs.attest.org/docs/welcome) diff --git a/.github/ISSUE_TEMPLATE/design.md b/.github/ISSUE_TEMPLATE/design.md deleted file mode 100644 index d6c4341..0000000 --- a/.github/ISSUE_TEMPLATE/design.md +++ /dev/null @@ -1,27 +0,0 @@ ---- -name: Design -about: Suggest an idea for this project -title: "[DESIGN]" -labels: design -assignees: '' - ---- - -### Done State - -- [ ] Task 1 -- [ ] Task 2 -- [ ] Task 3 - -### Design Requirements - -- Designs align with branding of project -- Components created, organized and optimized for export -- Screen layouted in a clear and easy to navigate manner - -### Resources - -- [Project Figma]() -- [Project Miro Board]() -- [Project PRD]() - diff --git a/.github/ISSUE_TEMPLATE/design.yml b/.github/ISSUE_TEMPLATE/design.yml new file mode 100644 index 0000000..0ada13e --- /dev/null +++ b/.github/ISSUE_TEMPLATE/design.yml @@ -0,0 +1,59 @@ +name: ๐ŸŽจ Design Request +description: Request design work for a feature or component +title: "[DESIGN]: " +labels: ["design"] +body: + - type: dropdown + id: type + attributes: + label: Design Type + options: + - New Feature Design + - Component Design + - Icon/Asset Design + - UX Flow + - Design System Update + - Visual Polish + validations: + required: true + + - type: textarea + id: description + attributes: + label: Description + description: What design work is needed? + validations: + required: true + + - type: textarea + id: requirements + attributes: + label: Design Requirements + description: Specific requirements for the design + placeholder: | + - Must align with existing design system + - Mobile-first responsive design + - Accessibility considerations (WCAG 2.1 AA) + validations: + required: true + + - type: textarea + id: done-state + attributes: + label: Done State + placeholder: | + - [ ] Designs created in Figma + - [ ] Components properly organized + - [ ] Assets optimized for export + - [ ] Design reviewed with engineering + validations: + required: true + + - type: textarea + id: resources + attributes: + label: Resources + placeholder: | + - [Project Figma](https://figma.com/...) + - [Design System](link) + - [Reference](link) diff --git a/.github/ISSUE_TEMPLATE/feature.yml b/.github/ISSUE_TEMPLATE/feature.yml new file mode 100644 index 0000000..bbbc494 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature.yml @@ -0,0 +1,92 @@ +name: โœจ Feature Request +description: Suggest a new feature or enhancement +title: "[FEATURE]: " +labels: ["enhancement"] +body: + - type: dropdown + id: package + attributes: + label: Target Package(s) + description: Which package(s) will this feature affect? + multiple: true + options: + - client (PWA) + - admin (Dashboard) + - shared (Hooks/Utils) + - contracts (Solidity) + - indexer (GraphQL) + - agent (Bot) + - docs (Documentation) + validations: + required: true + + - type: textarea + id: problem + attributes: + label: Problem Statement + description: What problem does this feature solve? + placeholder: "As a [user type], I want to [action] so that [benefit]..." + validations: + required: true + + - type: textarea + id: solution + attributes: + label: Proposed Solution + description: How should this work? + validations: + required: true + + - type: textarea + id: alternatives + attributes: + label: Alternatives Considered + description: What other solutions did you consider? + + - type: textarea + id: acceptance + attributes: + label: Acceptance Criteria + description: How do we know this is complete? + placeholder: | + - [ ] Criterion 1 + - [ ] Criterion 2 + - [ ] Criterion 3 + validations: + required: true + + - type: dropdown + id: offline + attributes: + label: Offline Behavior + description: How should this feature work offline? + options: + - Not applicable (online only) + - Should work offline (queue for sync) + - Read-only offline (sync on reconnect) + - Full offline support required + + - type: textarea + id: implementation + attributes: + label: Implementation Notes + description: | + Optional guidance for implementers: file paths, patterns to follow, dependencies. + AI assistants can populate this section with codebase analysis. + placeholder: | + ## Suggested Approach + 1. Create hook in `packages/shared/src/hooks/` + 2. Follow pattern from `useGarden.ts` + + ## Files to Create/Modify + - `packages/shared/src/hooks/useFeature.ts` + - `packages/client/src/views/Feature/index.tsx` + + - type: textarea + id: resources + attributes: + label: Resources + description: Links to designs, docs, or related issues + placeholder: | + - [Figma Design](link) + - Related to #123 diff --git a/.github/ISSUE_TEMPLATE/hook.yml b/.github/ISSUE_TEMPLATE/hook.yml new file mode 100644 index 0000000..5dad6ff --- /dev/null +++ b/.github/ISSUE_TEMPLATE/hook.yml @@ -0,0 +1,84 @@ +name: ๐Ÿช Shared Hook +description: Create a new hook in the shared package +title: "[HOOK]: " +labels: ["component"] +body: + - type: input + id: hook-name + attributes: + label: Hook Name + description: Name of the hook (e.g., useFeature) + placeholder: useFeatureName + validations: + required: true + + - type: textarea + id: purpose + attributes: + label: Purpose + description: What does this hook do? + validations: + required: true + + - type: textarea + id: api + attributes: + label: Hook API + description: Expected parameters and return values + placeholder: | + ```typescript + function useFeature(options?: { + enabled?: boolean; + }): { + data: FeatureData | undefined; + isLoading: boolean; + error: Error | null; + refetch: () => void; + } + ``` + validations: + required: true + + - type: dropdown + id: data-source + attributes: + label: Data Source + options: + - GraphQL (Indexer) + - Contract Read + - Local Storage / IndexedDB + - Zustand Store + - External API + - Computed (no external data) + validations: + required: true + + - type: textarea + id: done-state + attributes: + label: Done State + placeholder: | + - [ ] Hook implemented in `packages/shared/src/hooks/` + - [ ] TypeScript types exported + - [ ] Unit tests with 80%+ coverage + - [ ] Re-exported from package index + - [ ] Used in at least one view + validations: + required: true + + - type: textarea + id: implementation + attributes: + label: Implementation Notes + placeholder: | + ## Pattern Reference + Follow `packages/shared/src/hooks/useGarden.ts` + + ## TanStack Query Integration + - Query key: `['feature', id]` + - Stale time: 5 minutes + + ## Testing + ```bash + cd packages/shared && bun test useFeature + ``` diff --git a/.github/ISSUE_TEMPLATE/spike.yml b/.github/ISSUE_TEMPLATE/spike.yml new file mode 100644 index 0000000..90b8ebb --- /dev/null +++ b/.github/ISSUE_TEMPLATE/spike.yml @@ -0,0 +1,67 @@ +name: ๐Ÿ”ฌ Spike / Investigation +description: Research or investigation task +title: "[SPIKE]: " +labels: ["spike"] +body: + - type: textarea + id: question + attributes: + label: Research Question + description: What are we trying to learn or understand? + validations: + required: true + + - type: textarea + id: context + attributes: + label: Context + description: Why do we need this investigation? + validations: + required: true + + - type: textarea + id: scope + attributes: + label: Scope + description: What's in and out of scope for this investigation? + placeholder: | + **In Scope:** + - Area 1 + - Area 2 + + **Out of Scope:** + - Area 3 + validations: + required: true + + - type: input + id: timebox + attributes: + label: Timebox + description: Maximum time to spend on this investigation + placeholder: "2 hours / 1 day / 3 days" + validations: + required: true + + - type: textarea + id: deliverables + attributes: + label: Deliverables + description: What should come out of this spike? + placeholder: | + - [ ] Written summary of findings + - [ ] Recommendation for next steps + - [ ] POC code (if applicable) + - [ ] Follow-up issues created + validations: + required: true + + - type: textarea + id: resources + attributes: + label: Starting Resources + description: Any initial resources or leads to explore + placeholder: | + - [Documentation](link) + - [Related PR](link) + - [External resource](link) diff --git a/.github/ISSUE_TEMPLATE/state-logic.md b/.github/ISSUE_TEMPLATE/state-logic.md deleted file mode 100644 index 70efeeb..0000000 --- a/.github/ISSUE_TEMPLATE/state-logic.md +++ /dev/null @@ -1,26 +0,0 @@ ---- -name: State Logic -about: Template to create state management task for engineer -title: "[STATE]" -labels: state-logic -assignees: '' - ---- - -### Done State - -- [ ] Task 1 -- [ ] Task 2 -- [ ] Task 3 - -### Technical Requirements - -- State management with React context and providers -- State library XState may be used as needed -- Zustand may be used to hold global app state - -### Resources - -- [React Context](https://react.dev/reference/react/useContext) -- [XState Docs](https://stately.ai/docs/xstate) -- [Zustand](https://zustand.docs.pmnd.rs/getting-started/introduction) diff --git a/.github/ISSUE_TEMPLATE/story.md b/.github/ISSUE_TEMPLATE/story.md deleted file mode 100644 index 8ee653e..0000000 --- a/.github/ISSUE_TEMPLATE/story.md +++ /dev/null @@ -1,34 +0,0 @@ ---- -name: Story -about: Create a user story to complete for a project -title: "[STORY]" -labels: story -assignees: '' - ---- - -### Done State - -- ... -- ... -- ... - -### Tasks - -- [ ] Designs -- [ ] React Components -- [ ] State Management -- [ ] API -- [ ] Contracts - -### Requirements - -- ... -- ... -- ... - -### Resources - -- [Add PRD]() -- [Add Miro]() -- [Add Figma]() diff --git a/.github/ISSUE_TEMPLATE/story.yml b/.github/ISSUE_TEMPLATE/story.yml new file mode 100644 index 0000000..4002950 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/story.yml @@ -0,0 +1,63 @@ +name: ๐Ÿ“– User Story +description: Create a user story for product development +title: "[STORY]: " +labels: ["story"] +body: + - type: textarea + id: user-story + attributes: + label: User Story + description: The user story in standard format + placeholder: "As a [user type], I want to [action] so that [benefit]" + validations: + required: true + + - type: textarea + id: done-state + attributes: + label: Done State + description: What does "done" look like for this story? + placeholder: | + - [ ] User can perform action + - [ ] Feedback is shown + - [ ] Data is persisted + validations: + required: true + + - type: textarea + id: tasks + attributes: + label: Tasks + description: Break down into implementation tasks + placeholder: | + - [ ] Design (Figma) + - [ ] React Components + - [ ] Shared Hooks + - [ ] State Management + - [ ] API/Indexer + - [ ] Smart Contracts + - [ ] Tests + validations: + required: true + + - type: textarea + id: acceptance + attributes: + label: Acceptance Criteria + description: Specific criteria for acceptance + placeholder: | + **Given** [context] + **When** [action] + **Then** [expected result] + validations: + required: true + + - type: textarea + id: resources + attributes: + label: Resources + description: Links to PRD, designs, research + placeholder: | + - [PRD](link) + - [Figma Design](link) + - [Miro Board](link) diff --git a/.github/ISSUE_TEMPLATE/task.md b/.github/ISSUE_TEMPLATE/task.md deleted file mode 100644 index b43bb28..0000000 --- a/.github/ISSUE_TEMPLATE/task.md +++ /dev/null @@ -1,27 +0,0 @@ ---- -name: Task -about: Make a general task with the standard format -title: "[TASK]" -labels: '' -assignees: '' - ---- - -### Done State - -- [ ] Task 1 -- [ ] Task 2 -- [ ] Task 3 - -### Technical Requirements - -- ... -- ... -- ... - - -### Resources - -- []() -- []() -- []() diff --git a/.github/ISSUE_TEMPLATE/task.yml b/.github/ISSUE_TEMPLATE/task.yml new file mode 100644 index 0000000..c50dfc1 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/task.yml @@ -0,0 +1,89 @@ +name: ๐Ÿ”ง Engineering Task +description: Create a specific engineering task +title: "[TASK]: " +labels: ["task"] +body: + - type: dropdown + id: type + attributes: + label: Task Type + options: + - Implementation + - Refactor + - Performance + - Security + - Testing + - Documentation + - DevOps/Infrastructure + validations: + required: true + + - type: dropdown + id: package + attributes: + label: Affected Package(s) + multiple: true + options: + - client (PWA) + - admin (Dashboard) + - shared (Hooks/Utils) + - contracts (Solidity) + - indexer (GraphQL) + - agent (Bot) + - docs (Documentation) + validations: + required: true + + - type: textarea + id: summary + attributes: + label: Task Summary + description: What needs to be done? + validations: + required: true + + - type: textarea + id: done-state + attributes: + label: Done State + description: What does "done" look like? + placeholder: | + - [ ] Task completed + - [ ] Tests passing + - [ ] Code reviewed + validations: + required: true + + - type: textarea + id: technical-requirements + attributes: + label: Technical Requirements + description: Specific technical constraints or requirements + placeholder: | + - Must use existing patterns from... + - Performance budget: <100ms + - No new dependencies + + - type: textarea + id: implementation-notes + attributes: + label: Implementation Notes + description: Files to modify, patterns to follow, dependencies + placeholder: | + ## Files to Modify + - `packages/shared/src/...` + + ## Pattern Reference + See `packages/shared/src/hooks/useGarden.ts` + + ## Testing + - Add unit tests in `__tests__/` + + - type: textarea + id: resources + attributes: + label: Resources + description: Links to docs, designs, related issues + placeholder: | + - [Design in Figma](link) + - Related to #123 diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..d06bca6 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,43 @@ +## Summary + + +## Related Issues + +Closes # + +## Key Changes +- +- +- + +## Type of Change +- [ ] ๐Ÿ› Bug fix (non-breaking change that fixes an issue) +- [ ] โœจ New feature (non-breaking change that adds functionality) +- [ ] ๐Ÿ’ฅ Breaking change (fix or feature that would cause existing functionality to change) +- [ ] ๐Ÿ“š Documentation update +- [ ] ๐Ÿ”ง Refactor (no functional changes) +- [ ] โšก Performance improvement +- [ ] ๐Ÿงช Test addition/update + +## Testing +- [ ] TypeScript passes (`bun run tsc --noEmit`) +- [ ] Linting passes (`bun lint`) +- [ ] Tests pass (`bun test`) +- [ ] Build succeeds (`bun build`) +- [ ] Manual testing completed + +## Screenshots (if UI changes) + + +## Checklist +- [ ] My code follows the project's coding standards +- [ ] I have performed a self-review of my code +- [ ] I have added tests that prove my fix/feature works +- [ ] New and existing tests pass locally +- [ ] I have updated documentation (if applicable) + +### Green Goods Specific +- [ ] Hooks are in `@green-goods/shared` only +- [ ] i18n keys added for new UI strings (en.json, es.json, pt.json) +- [ ] No hardcoded contract addresses (uses deployment artifacts) +- [ ] Coverage targets met (Client/Admin: 70%, Shared: 80%, Contracts: 100%)